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	//   "POSTGRES_13" - The database version is PostgreSQL 13.
772	//   "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019
773	// Standard.
774	//   "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server
775	// 2019 Enterprise.
776	//   "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019
777	// Express.
778	//   "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web.
779	DatabaseVersion string `json:"databaseVersion,omitempty"`
780
781	// IpAddresses: The assigned IP addresses for the instance.
782	IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
783
784	// Kind: This is always `sql#connectSettings`.
785	Kind string `json:"kind,omitempty"`
786
787	// Region: The cloud region for the instance. e.g. **us-central1**,
788	// **europe-west1**. The region cannot be changed after instance
789	// creation.
790	Region string `json:"region,omitempty"`
791
792	// ServerCaCert: SSL configuration.
793	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
794
795	// ServerResponse contains the HTTP response code and headers from the
796	// server.
797	googleapi.ServerResponse `json:"-"`
798
799	// ForceSendFields is a list of field names (e.g. "BackendType") to
800	// unconditionally include in API requests. By default, fields with
801	// empty or default values are omitted from API requests. However, any
802	// non-pointer, non-interface field appearing in ForceSendFields will be
803	// sent to the server regardless of whether the field is empty or not.
804	// This may be used to include empty fields in Patch requests.
805	ForceSendFields []string `json:"-"`
806
807	// NullFields is a list of field names (e.g. "BackendType") to include
808	// in API requests with the JSON null value. By default, fields with
809	// empty values are omitted from API requests. However, any field with
810	// an empty value appearing in NullFields will be sent to the server as
811	// null. It is an error if a field in this list has a non-empty value.
812	// This may be used to include null fields in Patch requests.
813	NullFields []string `json:"-"`
814}
815
816func (s *ConnectSettings) MarshalJSON() ([]byte, error) {
817	type NoMethod ConnectSettings
818	raw := NoMethod(*s)
819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
820}
821
822// Database: Represents a SQL database on the Cloud SQL instance.
823type Database struct {
824	// Charset: The Cloud SQL charset value.
825	Charset string `json:"charset,omitempty"`
826
827	// Collation: The Cloud SQL collation value.
828	Collation string `json:"collation,omitempty"`
829
830	// Etag: This field is deprecated and will be removed from a future
831	// version of the API.
832	Etag string `json:"etag,omitempty"`
833
834	// Instance: The name of the Cloud SQL instance. This does not include
835	// the project ID.
836	Instance string `json:"instance,omitempty"`
837
838	// Kind: This is always **sql#database**.
839	Kind string `json:"kind,omitempty"`
840
841	// Name: The name of the database in the Cloud SQL instance. This does
842	// not include the project ID or instance name.
843	Name string `json:"name,omitempty"`
844
845	// Project: The project ID of the project containing the Cloud SQL
846	// database. The Google apps domain is prefixed if applicable.
847	Project string `json:"project,omitempty"`
848
849	// SelfLink: The URI of this resource.
850	SelfLink string `json:"selfLink,omitempty"`
851
852	SqlserverDatabaseDetails *SqlServerDatabaseDetails `json:"sqlserverDatabaseDetails,omitempty"`
853
854	// ServerResponse contains the HTTP response code and headers from the
855	// server.
856	googleapi.ServerResponse `json:"-"`
857
858	// ForceSendFields is a list of field names (e.g. "Charset") to
859	// unconditionally include in API requests. By default, fields with
860	// empty or default values are omitted from API requests. However, any
861	// non-pointer, non-interface field appearing in ForceSendFields will be
862	// sent to the server regardless of whether the field is empty or not.
863	// This may be used to include empty fields in Patch requests.
864	ForceSendFields []string `json:"-"`
865
866	// NullFields is a list of field names (e.g. "Charset") to include in
867	// API requests with the JSON null value. By default, fields with empty
868	// values are omitted from API requests. However, any field with an
869	// empty value appearing in NullFields will be sent to the server as
870	// null. It is an error if a field in this list has a non-empty value.
871	// This may be used to include null fields in Patch requests.
872	NullFields []string `json:"-"`
873}
874
875func (s *Database) MarshalJSON() ([]byte, error) {
876	type NoMethod Database
877	raw := NoMethod(*s)
878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
879}
880
881// DatabaseFlags: Database flags for Cloud SQL instances.
882type DatabaseFlags struct {
883	// Name: The name of the flag. These flags are passed at instance
884	// startup, so include both server options and system variables. Flags
885	// are specified with underscores, not hyphens. For more information,
886	// see Configuring Database Flags
887	// (https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL
888	// documentation.
889	Name string `json:"name,omitempty"`
890
891	// Value: The value of the flag. Booleans are set to **on** for true and
892	// **off** for false. This field must be omitted if the flag doesn't
893	// take a value.
894	Value string `json:"value,omitempty"`
895
896	// ForceSendFields is a list of field names (e.g. "Name") to
897	// unconditionally include in API requests. By default, fields with
898	// empty or default values are omitted from API requests. However, any
899	// non-pointer, non-interface field appearing in ForceSendFields will be
900	// sent to the server regardless of whether the field is empty or not.
901	// This may be used to include empty fields in Patch requests.
902	ForceSendFields []string `json:"-"`
903
904	// NullFields is a list of field names (e.g. "Name") to include in API
905	// requests with the JSON null value. By default, fields with empty
906	// values are omitted from API requests. However, any field with an
907	// empty value appearing in NullFields will be sent to the server as
908	// null. It is an error if a field in this list has a non-empty value.
909	// This may be used to include null fields in Patch requests.
910	NullFields []string `json:"-"`
911}
912
913func (s *DatabaseFlags) MarshalJSON() ([]byte, error) {
914	type NoMethod DatabaseFlags
915	raw := NoMethod(*s)
916	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
917}
918
919// DatabaseInstance: A Cloud SQL instance resource.
920type DatabaseInstance struct {
921	// BackendType: The backend type. **SECOND_GEN**: Cloud SQL database
922	// instance. **EXTERNAL**: A database server that is not managed by
923	// Google. This property is read-only; use the **tier** property in the
924	// **settings** object to determine the database type.
925	//
926	// Possible values:
927	//   "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type
928	// for instance.
929	//   "FIRST_GEN" - V1 speckle instance.
930	//   "SECOND_GEN" - V2 speckle instance.
931	//   "EXTERNAL" - On premises instance.
932	BackendType string `json:"backendType,omitempty"`
933
934	// ConnectionName: Connection name of the Cloud SQL instance used in
935	// connection strings.
936	ConnectionName string `json:"connectionName,omitempty"`
937
938	// CreateTime: Output only. The time when the instance was created in
939	// RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
940	// **2012-11-15T16:19:00.094Z**.
941	CreateTime string `json:"createTime,omitempty"`
942
943	// CurrentDiskSize: The current disk usage of the instance in bytes.
944	// This property has been deprecated. Use the
945	// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
946	// Monitoring API instead. Please see this announcement
947	// (https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
948	// for details.
949	CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"`
950
951	// DatabaseVersion: The database engine type and version. The
952	// **databaseVersion** field cannot be changed after instance creation.
953	// * **MySQL instances**: MYSQL_8_0, MYSQL_5_7 (default), or MYSQL_5_6.
954	// * **PostgreSQL instances**: POSTGRES_9_6, POSTGRES_10, POSTGRES_11,
955	// POSTGRES_12, POSTGRES_13 (default), POSTGRES_14. * **SQL Server
956	// instances**: SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE,
957	// SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB,
958	// SQLSERVER_2017_STANDARD (default), SQLSERVER_2017_ENTERPRISE,
959	// SQLSERVER_2017_EXPRESS, or SQLSERVER_2017_WEB.
960	//
961	// Possible values:
962	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
963	// version.
964	//   "MYSQL_5_1" - The database version is MySQL 5.1.
965	//   "MYSQL_5_5" - The database version is MySQL 5.5.
966	//   "MYSQL_5_6" - The database version is MySQL 5.6.
967	//   "MYSQL_5_7" - The database version is MySQL 5.7.
968	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
969	//   "POSTGRES_11" - The database version is PostgreSQL 11.
970	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
971	// Standard.
972	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
973	// 2017 Enterprise.
974	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
975	// Express.
976	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
977	//   "POSTGRES_10" - The database version is PostgreSQL 10.
978	//   "POSTGRES_12" - The database version is PostgreSQL 12.
979	//   "MYSQL_8_0" - The database version is MySQL 8.
980	//   "POSTGRES_13" - The database version is PostgreSQL 13.
981	//   "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019
982	// Standard.
983	//   "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server
984	// 2019 Enterprise.
985	//   "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019
986	// Express.
987	//   "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web.
988	DatabaseVersion string `json:"databaseVersion,omitempty"`
989
990	// DiskEncryptionConfiguration: Disk encryption configuration specific
991	// to an instance.
992	DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
993
994	// DiskEncryptionStatus: Disk encryption status specific to an instance.
995	DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
996
997	// Etag: This field is deprecated and will be removed from a future
998	// version of the API. Use the **settings.settingsVersion** field
999	// instead.
1000	Etag string `json:"etag,omitempty"`
1001
1002	// FailoverReplica: The name and status of the failover replica.
1003	FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"`
1004
1005	// GceZone: The Compute Engine zone that the instance is currently
1006	// serving from. This value could be different from the zone that was
1007	// specified when the instance was created if the instance has failed
1008	// over to its secondary zone.
1009	GceZone string `json:"gceZone,omitempty"`
1010
1011	// InstanceType: The instance type. This can be one of the following: *
1012	// **CLOUD_SQL_INSTANCE**: A Cloud SQL instance that is not replicating
1013	// from a primary instance. * **ON_PREMISES_INSTANCE**: An instance
1014	// running on the customer's premises. * **READ_REPLICA_INSTANCE**: A
1015	// Cloud SQL instance configured as a read-replica.
1016	//
1017	// Possible values:
1018	//   "SQL_INSTANCE_TYPE_UNSPECIFIED" - This is an unknown Cloud SQL
1019	// instance type.
1020	//   "CLOUD_SQL_INSTANCE" - A regular Cloud SQL instance.
1021	//   "ON_PREMISES_INSTANCE" - An instance running on the customer's
1022	// premises that is not managed by Cloud SQL.
1023	//   "READ_REPLICA_INSTANCE" - A Cloud SQL instance acting as a
1024	// read-replica.
1025	InstanceType string `json:"instanceType,omitempty"`
1026
1027	// IpAddresses: The assigned IP addresses for the instance.
1028	IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
1029
1030	// Ipv6Address: The IPv6 address assigned to the instance. (Deprecated)
1031	// This property was applicable only to First Generation instances.
1032	Ipv6Address string `json:"ipv6Address,omitempty"`
1033
1034	// Kind: This is always **sql#instance**.
1035	Kind string `json:"kind,omitempty"`
1036
1037	// MasterInstanceName: The name of the instance which will act as
1038	// primary in the replication setup.
1039	MasterInstanceName string `json:"masterInstanceName,omitempty"`
1040
1041	// MaxDiskSize: The maximum disk size of the instance in bytes.
1042	MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"`
1043
1044	// Name: Name of the Cloud SQL instance. This does not include the
1045	// project ID.
1046	Name string `json:"name,omitempty"`
1047
1048	// OnPremisesConfiguration: Configuration specific to on-premises
1049	// instances.
1050	OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"`
1051
1052	// OutOfDiskReport: This field represents the report generated by the
1053	// proactive database wellness job for OutOfDisk issues. * Writers: *
1054	// the proactive database wellness job for OOD. * Readers: * the
1055	// proactive database wellness job
1056	OutOfDiskReport *SqlOutOfDiskReport `json:"outOfDiskReport,omitempty"`
1057
1058	// Project: The project ID of the project containing the Cloud SQL
1059	// instance. The Google apps domain is prefixed if applicable.
1060	Project string `json:"project,omitempty"`
1061
1062	// Region: The geographical region. Can be: * **us-central**
1063	// (**FIRST_GEN** instances only) * **us-central1** (**SECOND_GEN**
1064	// instances only) * **asia-east1** or **europe-west1**. Defaults to
1065	// **us-central** or **us-central1** depending on the instance type. The
1066	// region cannot be changed after instance creation.
1067	Region string `json:"region,omitempty"`
1068
1069	// ReplicaConfiguration: Configuration specific to failover replicas and
1070	// read replicas.
1071	ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"`
1072
1073	// ReplicaNames: The replicas of the instance.
1074	ReplicaNames []string `json:"replicaNames,omitempty"`
1075
1076	// RootPassword: Initial root password. Use only on creation.
1077	RootPassword string `json:"rootPassword,omitempty"`
1078
1079	// SatisfiesPzs: The status indicating if instance satisfiesPzs.
1080	// Reserved for future use.
1081	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
1082
1083	// ScheduledMaintenance: The start time of any upcoming scheduled
1084	// maintenance for this instance.
1085	ScheduledMaintenance *SqlScheduledMaintenance `json:"scheduledMaintenance,omitempty"`
1086
1087	// SecondaryGceZone: The Compute Engine zone that the failover instance
1088	// is currently serving from for a regional instance. This value could
1089	// be different from the zone that was specified when the instance was
1090	// created if the instance has failed over to its secondary/failover
1091	// zone. Reserved for future use.
1092	SecondaryGceZone string `json:"secondaryGceZone,omitempty"`
1093
1094	// SelfLink: The URI of this resource.
1095	SelfLink string `json:"selfLink,omitempty"`
1096
1097	// ServerCaCert: SSL configuration.
1098	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
1099
1100	// ServiceAccountEmailAddress: The service account email address
1101	// assigned to the instance. This property is read-only.
1102	ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`
1103
1104	// Settings: The user settings.
1105	Settings *Settings `json:"settings,omitempty"`
1106
1107	// State: The current serving state of the Cloud SQL instance. This can
1108	// be one of the following: * **SQL_INSTANCE_STATE_UNSPECIFIED**: The
1109	// state of the instance is unknown. * **RUNNABLE**: The instance is
1110	// running, or has been stopped by owner. * **SUSPENDED**: The instance
1111	// is not available, for example due to problems with billing. *
1112	// **PENDING_DELETE**: The instance is being deleted. *
1113	// **PENDING_CREATE**: The instance is being created. * **MAINTENANCE**:
1114	// The instance is down for maintenance. * **FAILED**: The instance
1115	// creation failed.
1116	//
1117	// Possible values:
1118	//   "SQL_INSTANCE_STATE_UNSPECIFIED" - The state of the instance is
1119	// unknown.
1120	//   "RUNNABLE" - The instance is running, or has been stopped by owner.
1121	//   "SUSPENDED" - The instance is not available, for example due to
1122	// problems with billing.
1123	//   "PENDING_DELETE" - The instance is being deleted.
1124	//   "PENDING_CREATE" - The instance is being created.
1125	//   "MAINTENANCE" - The instance is down for maintenance.
1126	//   "FAILED" - The creation of the instance failed or a fatal error
1127	// occurred during maintenance.
1128	//   "ONLINE_MAINTENANCE" - The instance is under maintenance operations
1129	// and the database is available.
1130	State string `json:"state,omitempty"`
1131
1132	// SuspensionReason: If the instance state is SUSPENDED, the reason for
1133	// the suspension.
1134	//
1135	// Possible values:
1136	//   "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension
1137	// reason.
1138	//   "BILLING_ISSUE" - The instance is suspended due to billing issues
1139	// (for example:, GCP account issue)
1140	//   "LEGAL_ISSUE" - The instance is suspended due to illegal content
1141	// (for example:, child pornography, copyrighted material, etc.).
1142	//   "OPERATIONAL_ISSUE" - The instance is causing operational issues
1143	// (for example:, causing the database to crash).
1144	//   "KMS_KEY_ISSUE" - The KMS key used by the instance is either
1145	// revoked or denied access to
1146	SuspensionReason []string `json:"suspensionReason,omitempty"`
1147
1148	// ServerResponse contains the HTTP response code and headers from the
1149	// server.
1150	googleapi.ServerResponse `json:"-"`
1151
1152	// ForceSendFields is a list of field names (e.g. "BackendType") to
1153	// unconditionally include in API requests. By default, fields with
1154	// empty or default values are omitted from API requests. However, any
1155	// non-pointer, non-interface field appearing in ForceSendFields will be
1156	// sent to the server regardless of whether the field is empty or not.
1157	// This may be used to include empty fields in Patch requests.
1158	ForceSendFields []string `json:"-"`
1159
1160	// NullFields is a list of field names (e.g. "BackendType") to include
1161	// in API requests with the JSON null value. By default, fields with
1162	// empty values are omitted from API requests. However, any field with
1163	// an empty value appearing in NullFields will be sent to the server as
1164	// null. It is an error if a field in this list has a non-empty value.
1165	// This may be used to include null fields in Patch requests.
1166	NullFields []string `json:"-"`
1167}
1168
1169func (s *DatabaseInstance) MarshalJSON() ([]byte, error) {
1170	type NoMethod DatabaseInstance
1171	raw := NoMethod(*s)
1172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1173}
1174
1175// DatabaseInstanceFailoverReplica: The name and status of the failover
1176// replica.
1177type DatabaseInstanceFailoverReplica struct {
1178	// Available: The availability status of the failover replica. A false
1179	// status indicates that the failover replica is out of sync. The
1180	// primary instance can only failover to the failover replica when the
1181	// status is true.
1182	Available bool `json:"available,omitempty"`
1183
1184	// Name: The name of the failover replica. If specified at instance
1185	// creation, a failover replica is created for the instance. The name
1186	// doesn't include the project ID.
1187	Name string `json:"name,omitempty"`
1188
1189	// ForceSendFields is a list of field names (e.g. "Available") to
1190	// unconditionally include in API requests. By default, fields with
1191	// empty or default values are omitted from API requests. However, any
1192	// non-pointer, non-interface field appearing in ForceSendFields will be
1193	// sent to the server regardless of whether the field is empty or not.
1194	// This may be used to include empty fields in Patch requests.
1195	ForceSendFields []string `json:"-"`
1196
1197	// NullFields is a list of field names (e.g. "Available") to include in
1198	// API requests with the JSON null value. By default, fields with empty
1199	// values are omitted from API requests. However, any field with an
1200	// empty value appearing in NullFields will be sent to the server as
1201	// null. It is an error if a field in this list has a non-empty value.
1202	// This may be used to include null fields in Patch requests.
1203	NullFields []string `json:"-"`
1204}
1205
1206func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) {
1207	type NoMethod DatabaseInstanceFailoverReplica
1208	raw := NoMethod(*s)
1209	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1210}
1211
1212// DatabasesListResponse: Database list response.
1213type DatabasesListResponse struct {
1214	// Items: List of database resources in the instance.
1215	Items []*Database `json:"items,omitempty"`
1216
1217	// Kind: This is always **sql#databasesList**.
1218	Kind string `json:"kind,omitempty"`
1219
1220	// ServerResponse contains the HTTP response code and headers from the
1221	// server.
1222	googleapi.ServerResponse `json:"-"`
1223
1224	// ForceSendFields is a list of field names (e.g. "Items") to
1225	// unconditionally include in API requests. By default, fields with
1226	// empty or default values are omitted from API requests. However, any
1227	// non-pointer, non-interface field appearing in ForceSendFields will be
1228	// sent to the server regardless of whether the field is empty or not.
1229	// This may be used to include empty fields in Patch requests.
1230	ForceSendFields []string `json:"-"`
1231
1232	// NullFields is a list of field names (e.g. "Items") to include in API
1233	// requests with the JSON null value. By default, fields with empty
1234	// values are omitted from API requests. However, any field with an
1235	// empty value appearing in NullFields will be sent to the server as
1236	// null. It is an error if a field in this list has a non-empty value.
1237	// This may be used to include null fields in Patch requests.
1238	NullFields []string `json:"-"`
1239}
1240
1241func (s *DatabasesListResponse) MarshalJSON() ([]byte, error) {
1242	type NoMethod DatabasesListResponse
1243	raw := NoMethod(*s)
1244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1245}
1246
1247// DemoteMasterConfiguration: Read-replica configuration for connecting
1248// to the on-premises primary instance.
1249type DemoteMasterConfiguration struct {
1250	// Kind: This is always **sql#demoteMasterConfiguration**.
1251	Kind string `json:"kind,omitempty"`
1252
1253	// MysqlReplicaConfiguration: MySQL specific configuration when
1254	// replicating from a MySQL on-premises primary instance. Replication
1255	// configuration information such as the username, password,
1256	// certificates, and keys are not stored in the instance metadata. The
1257	// configuration information is used only to set up the replication
1258	// connection and is stored by MySQL in a file named **master.info** in
1259	// the data directory.
1260	MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
1261
1262	// ForceSendFields is a list of field names (e.g. "Kind") to
1263	// unconditionally include in API requests. By default, fields with
1264	// empty or default values are omitted from API requests. However, any
1265	// non-pointer, non-interface field appearing in ForceSendFields will be
1266	// sent to the server regardless of whether the field is empty or not.
1267	// This may be used to include empty fields in Patch requests.
1268	ForceSendFields []string `json:"-"`
1269
1270	// NullFields is a list of field names (e.g. "Kind") to include in API
1271	// requests with the JSON null value. By default, fields with empty
1272	// values are omitted from API requests. However, any field with an
1273	// empty value appearing in NullFields will be sent to the server as
1274	// null. It is an error if a field in this list has a non-empty value.
1275	// This may be used to include null fields in Patch requests.
1276	NullFields []string `json:"-"`
1277}
1278
1279func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error) {
1280	type NoMethod DemoteMasterConfiguration
1281	raw := NoMethod(*s)
1282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1283}
1284
1285// DemoteMasterContext: Database instance demote primary instance
1286// context.
1287type DemoteMasterContext struct {
1288	// Kind: This is always **sql#demoteMasterContext**.
1289	Kind string `json:"kind,omitempty"`
1290
1291	// MasterInstanceName: The name of the instance which will act as
1292	// on-premises primary instance in the replication setup.
1293	MasterInstanceName string `json:"masterInstanceName,omitempty"`
1294
1295	// ReplicaConfiguration: Configuration specific to read-replicas
1296	// replicating from the on-premises primary instance.
1297	ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"`
1298
1299	// SkipReplicationSetup: Flag to skip replication setup on the instance.
1300	SkipReplicationSetup bool `json:"skipReplicationSetup,omitempty"`
1301
1302	// VerifyGtidConsistency: Verify GTID consistency for demote operation.
1303	// Default value: **True**. Setting this flag to false enables you to
1304	// bypass GTID consistency check between on-premises primary instance
1305	// and Cloud SQL instance during the demotion operation but also exposes
1306	// you to the risk of future replication failures. Change the value only
1307	// if you know the reason for the GTID divergence and are confident that
1308	// doing so will not cause any replication issues.
1309	VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"`
1310
1311	// ForceSendFields is a list of field names (e.g. "Kind") to
1312	// unconditionally include in API requests. By default, fields with
1313	// empty or default values are omitted from API requests. However, any
1314	// non-pointer, non-interface field appearing in ForceSendFields will be
1315	// sent to the server regardless of whether the field is empty or not.
1316	// This may be used to include empty fields in Patch requests.
1317	ForceSendFields []string `json:"-"`
1318
1319	// NullFields is a list of field names (e.g. "Kind") to include in API
1320	// requests with the JSON null value. By default, fields with empty
1321	// values are omitted from API requests. However, any field with an
1322	// empty value appearing in NullFields will be sent to the server as
1323	// null. It is an error if a field in this list has a non-empty value.
1324	// This may be used to include null fields in Patch requests.
1325	NullFields []string `json:"-"`
1326}
1327
1328func (s *DemoteMasterContext) MarshalJSON() ([]byte, error) {
1329	type NoMethod DemoteMasterContext
1330	raw := NoMethod(*s)
1331	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1332}
1333
1334// DemoteMasterMySqlReplicaConfiguration: Read-replica configuration
1335// specific to MySQL databases.
1336type DemoteMasterMySqlReplicaConfiguration struct {
1337	// CaCertificate: PEM representation of the trusted CA's x509
1338	// certificate.
1339	CaCertificate string `json:"caCertificate,omitempty"`
1340
1341	// ClientCertificate: PEM representation of the replica's x509
1342	// certificate.
1343	ClientCertificate string `json:"clientCertificate,omitempty"`
1344
1345	// ClientKey: PEM representation of the replica's private key. The
1346	// corresponsing public key is encoded in the client's certificate. The
1347	// format of the replica's private key can be either PKCS #1 or PKCS #8.
1348	ClientKey string `json:"clientKey,omitempty"`
1349
1350	// Kind: This is always **sql#demoteMasterMysqlReplicaConfiguration**.
1351	Kind string `json:"kind,omitempty"`
1352
1353	// Password: The password for the replication connection.
1354	Password string `json:"password,omitempty"`
1355
1356	// Username: The username for the replication connection.
1357	Username string `json:"username,omitempty"`
1358
1359	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
1360	// unconditionally include in API requests. By default, fields with
1361	// empty or default values are omitted from API requests. However, any
1362	// non-pointer, non-interface field appearing in ForceSendFields will be
1363	// sent to the server regardless of whether the field is empty or not.
1364	// This may be used to include empty fields in Patch requests.
1365	ForceSendFields []string `json:"-"`
1366
1367	// NullFields is a list of field names (e.g. "CaCertificate") to include
1368	// in API requests with the JSON null value. By default, fields with
1369	// empty values are omitted from API requests. However, any field with
1370	// an empty value appearing in NullFields will be sent to the server as
1371	// null. It is an error if a field in this list has a non-empty value.
1372	// This may be used to include null fields in Patch requests.
1373	NullFields []string `json:"-"`
1374}
1375
1376func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
1377	type NoMethod DemoteMasterMySqlReplicaConfiguration
1378	raw := NoMethod(*s)
1379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1380}
1381
1382// DenyMaintenancePeriod: Deny maintenance Periods. This specifies a
1383// date range during when all CSA rollout will be denied.
1384type DenyMaintenancePeriod struct {
1385	// EndDate: "deny maintenance period" end date. If the year of the end
1386	// date is empty, the year of the start date also must be empty. In this
1387	// case, it means the no maintenance interval recurs every year. The
1388	// date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1389	EndDate string `json:"endDate,omitempty"`
1390
1391	// StartDate: "deny maintenance period" start date. If the year of the
1392	// start date is empty, the year of the end date also must be empty. In
1393	// this case, it means the deny maintenance period recurs every year.
1394	// The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e.,
1395	// 11-01
1396	StartDate string `json:"startDate,omitempty"`
1397
1398	// Time: Time in UTC when the "deny maintenance period" starts on
1399	// start_date and ends on end_date. The time is in format: HH:mm:SS,
1400	// i.e., 00:00:00
1401	Time string `json:"time,omitempty"`
1402
1403	// ForceSendFields is a list of field names (e.g. "EndDate") to
1404	// unconditionally include in API requests. By default, fields with
1405	// empty or default values are omitted from API requests. However, any
1406	// non-pointer, non-interface field appearing in ForceSendFields will be
1407	// sent to the server regardless of whether the field is empty or not.
1408	// This may be used to include empty fields in Patch requests.
1409	ForceSendFields []string `json:"-"`
1410
1411	// NullFields is a list of field names (e.g. "EndDate") to include in
1412	// API requests with the JSON null value. By default, fields with empty
1413	// values are omitted from API requests. However, any field with an
1414	// empty value appearing in NullFields will be sent to the server as
1415	// null. It is an error if a field in this list has a non-empty value.
1416	// This may be used to include null fields in Patch requests.
1417	NullFields []string `json:"-"`
1418}
1419
1420func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) {
1421	type NoMethod DenyMaintenancePeriod
1422	raw := NoMethod(*s)
1423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1424}
1425
1426// DiskEncryptionConfiguration: Disk encryption configuration for an
1427// instance.
1428type DiskEncryptionConfiguration struct {
1429	// Kind: This is always **sql#diskEncryptionConfiguration**.
1430	Kind string `json:"kind,omitempty"`
1431
1432	// KmsKeyName: Resource name of KMS key for disk encryption
1433	KmsKeyName string `json:"kmsKeyName,omitempty"`
1434
1435	// ForceSendFields is a list of field names (e.g. "Kind") to
1436	// unconditionally include in API requests. By default, fields with
1437	// empty or default values are omitted from API requests. However, any
1438	// non-pointer, non-interface field appearing in ForceSendFields will be
1439	// sent to the server regardless of whether the field is empty or not.
1440	// This may be used to include empty fields in Patch requests.
1441	ForceSendFields []string `json:"-"`
1442
1443	// NullFields is a list of field names (e.g. "Kind") to include in API
1444	// requests with the JSON null value. By default, fields with empty
1445	// values are omitted from API requests. However, any field with an
1446	// empty value appearing in NullFields will be sent to the server as
1447	// null. It is an error if a field in this list has a non-empty value.
1448	// This may be used to include null fields in Patch requests.
1449	NullFields []string `json:"-"`
1450}
1451
1452func (s *DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) {
1453	type NoMethod DiskEncryptionConfiguration
1454	raw := NoMethod(*s)
1455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1456}
1457
1458// DiskEncryptionStatus: Disk encryption status for an instance.
1459type DiskEncryptionStatus struct {
1460	// Kind: This is always **sql#diskEncryptionStatus**.
1461	Kind string `json:"kind,omitempty"`
1462
1463	// KmsKeyVersionName: KMS key version used to encrypt the Cloud SQL
1464	// instance resource
1465	KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`
1466
1467	// ForceSendFields is a list of field names (e.g. "Kind") to
1468	// unconditionally include in API requests. By default, fields with
1469	// empty or default values are omitted from API requests. However, any
1470	// non-pointer, non-interface field appearing in ForceSendFields will be
1471	// sent to the server regardless of whether the field is empty or not.
1472	// This may be used to include empty fields in Patch requests.
1473	ForceSendFields []string `json:"-"`
1474
1475	// NullFields is a list of field names (e.g. "Kind") to include in API
1476	// requests with the JSON null value. By default, fields with empty
1477	// values are omitted from API requests. However, any field with an
1478	// empty value appearing in NullFields will be sent to the server as
1479	// null. It is an error if a field in this list has a non-empty value.
1480	// This may be used to include null fields in Patch requests.
1481	NullFields []string `json:"-"`
1482}
1483
1484func (s *DiskEncryptionStatus) MarshalJSON() ([]byte, error) {
1485	type NoMethod DiskEncryptionStatus
1486	raw := NoMethod(*s)
1487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1488}
1489
1490// ExportContext: Database instance export context.
1491type ExportContext struct {
1492	// CsvExportOptions: Options for exporting data as CSV. **MySQL** and
1493	// **PostgreSQL** instances only.
1494	CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"`
1495
1496	// Databases: Databases to be exported. * **MySQL instances:** If
1497	// **fileType** is **SQL** and no database is specified, all databases
1498	// are exported, except for the **mysql** system database. If
1499	// **fileType** is **CSV**, you can specify one database, either by
1500	// using this property or by using the **csvExportOptions.selectQuery**
1501	// property, which takes precedence over this property. * **PostgreSQL
1502	// instances:** You must specify one database to be exported. If
1503	// **fileType** is **CSV**, this database must match the one specified
1504	// in the **csvExportOptions.selectQuery** property. * **SQL Server
1505	// instances:** You must specify one database to be exported, and the
1506	// **fileType** must be **BAK**.
1507	Databases []string `json:"databases,omitempty"`
1508
1509	// FileType: The file type for the specified uri. * **SQL**: The file
1510	// contains SQL statements. * **CSV**: The file contains CSV data. *
1511	// **BAK**: The file contains backup data for a SQL Server instance.
1512	//
1513	// Possible values:
1514	//   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
1515	//   "SQL" - File containing SQL statements.
1516	//   "CSV" - File in CSV format.
1517	//   "BAK"
1518	FileType string `json:"fileType,omitempty"`
1519
1520	// Kind: This is always **sql#exportContext**.
1521	Kind string `json:"kind,omitempty"`
1522
1523	// Offload: Option for export offload.
1524	Offload bool `json:"offload,omitempty"`
1525
1526	// SqlExportOptions: Options for exporting data as SQL statements.
1527	SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"`
1528
1529	// Uri: The path to the file in Google Cloud Storage where the export
1530	// will be stored. The URI is in the form **gs://bucketName/fileName**.
1531	// If the file already exists, the request succeeds, but the operation
1532	// fails. If **fileType** is **SQL** and the filename ends with .gz, the
1533	// contents are compressed.
1534	Uri string `json:"uri,omitempty"`
1535
1536	// ForceSendFields is a list of field names (e.g. "CsvExportOptions") to
1537	// unconditionally include in API requests. By default, fields with
1538	// empty or default values are omitted from API requests. However, any
1539	// non-pointer, non-interface field appearing in ForceSendFields will be
1540	// sent to the server regardless of whether the field is empty or not.
1541	// This may be used to include empty fields in Patch requests.
1542	ForceSendFields []string `json:"-"`
1543
1544	// NullFields is a list of field names (e.g. "CsvExportOptions") to
1545	// include in API requests with the JSON null value. By default, fields
1546	// with empty values are omitted from API requests. However, any field
1547	// with an empty value appearing in NullFields will be sent to the
1548	// server as null. It is an error if a field in this list has a
1549	// non-empty value. This may be used to include null fields in Patch
1550	// requests.
1551	NullFields []string `json:"-"`
1552}
1553
1554func (s *ExportContext) MarshalJSON() ([]byte, error) {
1555	type NoMethod ExportContext
1556	raw := NoMethod(*s)
1557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1558}
1559
1560// ExportContextCsvExportOptions: Options for exporting data as CSV.
1561// **MySQL** and **PostgreSQL** instances only.
1562type ExportContextCsvExportOptions struct {
1563	// EscapeCharacter: Specifies the character that should appear before a
1564	// data character that needs to be escaped.
1565	EscapeCharacter string `json:"escapeCharacter,omitempty"`
1566
1567	// FieldsTerminatedBy: Specifies the character that separates columns
1568	// within each row (line) of the file.
1569	FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"`
1570
1571	// LinesTerminatedBy: This is used to separate lines. If a line does not
1572	// contain all fields, the rest of the columns are set to their default
1573	// values.
1574	LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"`
1575
1576	// QuoteCharacter: Specifies the quoting character to be used when a
1577	// data value is quoted.
1578	QuoteCharacter string `json:"quoteCharacter,omitempty"`
1579
1580	// SelectQuery: The select query used to extract the data.
1581	SelectQuery string `json:"selectQuery,omitempty"`
1582
1583	// ForceSendFields is a list of field names (e.g. "EscapeCharacter") to
1584	// unconditionally include in API requests. By default, fields with
1585	// empty or default values are omitted from API requests. However, any
1586	// non-pointer, non-interface field appearing in ForceSendFields will be
1587	// sent to the server regardless of whether the field is empty or not.
1588	// This may be used to include empty fields in Patch requests.
1589	ForceSendFields []string `json:"-"`
1590
1591	// NullFields is a list of field names (e.g. "EscapeCharacter") to
1592	// include in API requests with the JSON null value. By default, fields
1593	// with empty values are omitted from API requests. However, any field
1594	// with an empty value appearing in NullFields will be sent to the
1595	// server as null. It is an error if a field in this list has a
1596	// non-empty value. This may be used to include null fields in Patch
1597	// requests.
1598	NullFields []string `json:"-"`
1599}
1600
1601func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) {
1602	type NoMethod ExportContextCsvExportOptions
1603	raw := NoMethod(*s)
1604	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1605}
1606
1607// ExportContextSqlExportOptions: Options for exporting data as SQL
1608// statements.
1609type ExportContextSqlExportOptions struct {
1610	// MysqlExportOptions: Options for exporting from MySQL.
1611	MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"`
1612
1613	// SchemaOnly: Export only schemas.
1614	SchemaOnly bool `json:"schemaOnly,omitempty"`
1615
1616	// Tables: Tables to export, or that were exported, from the specified
1617	// database. If you specify tables, specify one and only one database.
1618	// For PostgreSQL instances, you can specify only one table.
1619	Tables []string `json:"tables,omitempty"`
1620
1621	// ForceSendFields is a list of field names (e.g. "MysqlExportOptions")
1622	// to unconditionally include in API requests. By default, fields with
1623	// empty or default values are omitted from API requests. However, any
1624	// non-pointer, non-interface field appearing in ForceSendFields will be
1625	// sent to the server regardless of whether the field is empty or not.
1626	// This may be used to include empty fields in Patch requests.
1627	ForceSendFields []string `json:"-"`
1628
1629	// NullFields is a list of field names (e.g. "MysqlExportOptions") to
1630	// include in API requests with the JSON null value. By default, fields
1631	// with empty values are omitted from API requests. However, any field
1632	// with an empty value appearing in NullFields will be sent to the
1633	// server as null. It is an error if a field in this list has a
1634	// non-empty value. This may be used to include null fields in Patch
1635	// requests.
1636	NullFields []string `json:"-"`
1637}
1638
1639func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) {
1640	type NoMethod ExportContextSqlExportOptions
1641	raw := NoMethod(*s)
1642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1643}
1644
1645// ExportContextSqlExportOptionsMysqlExportOptions: Options for
1646// exporting from MySQL.
1647type ExportContextSqlExportOptionsMysqlExportOptions struct {
1648	// MasterData: Option to include SQL statement required to set up
1649	// replication. * If set to **1**, the dump file includes a CHANGE
1650	// MASTER TO statement with the binary log coordinates, and
1651	// --set-gtid-purged is set to ON. * If set to **2**, the CHANGE MASTER
1652	// TO statement is written as a SQL comment and has no effect. * If set
1653	// to any value other than **1**, --set-gtid-purged is set to OFF.
1654	MasterData int64 `json:"masterData,omitempty"`
1655
1656	// ForceSendFields is a list of field names (e.g. "MasterData") to
1657	// unconditionally include in API requests. By default, fields with
1658	// empty or default values are omitted from API requests. However, any
1659	// non-pointer, non-interface field appearing in ForceSendFields will be
1660	// sent to the server regardless of whether the field is empty or not.
1661	// This may be used to include empty fields in Patch requests.
1662	ForceSendFields []string `json:"-"`
1663
1664	// NullFields is a list of field names (e.g. "MasterData") to include in
1665	// API requests with the JSON null value. By default, fields with empty
1666	// values are omitted from API requests. However, any field with an
1667	// empty value appearing in NullFields will be sent to the server as
1668	// null. It is an error if a field in this list has a non-empty value.
1669	// This may be used to include null fields in Patch requests.
1670	NullFields []string `json:"-"`
1671}
1672
1673func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error) {
1674	type NoMethod ExportContextSqlExportOptionsMysqlExportOptions
1675	raw := NoMethod(*s)
1676	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1677}
1678
1679// FailoverContext: Database instance failover context.
1680type FailoverContext struct {
1681	// Kind: This is always **sql#failoverContext**.
1682	Kind string `json:"kind,omitempty"`
1683
1684	// SettingsVersion: The current settings version of this instance.
1685	// Request will be rejected if this version doesn't match the current
1686	// settings version.
1687	SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
1688
1689	// ForceSendFields is a list of field names (e.g. "Kind") to
1690	// unconditionally include in API requests. By default, fields with
1691	// empty or default values are omitted from API requests. However, any
1692	// non-pointer, non-interface field appearing in ForceSendFields will be
1693	// sent to the server regardless of whether the field is empty or not.
1694	// This may be used to include empty fields in Patch requests.
1695	ForceSendFields []string `json:"-"`
1696
1697	// NullFields is a list of field names (e.g. "Kind") to include in API
1698	// requests with the JSON null value. By default, fields with empty
1699	// values are omitted from API requests. However, any field with an
1700	// empty value appearing in NullFields will be sent to the server as
1701	// null. It is an error if a field in this list has a non-empty value.
1702	// This may be used to include null fields in Patch requests.
1703	NullFields []string `json:"-"`
1704}
1705
1706func (s *FailoverContext) MarshalJSON() ([]byte, error) {
1707	type NoMethod FailoverContext
1708	raw := NoMethod(*s)
1709	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1710}
1711
1712// Flag: A flag resource.
1713type Flag struct {
1714	// AllowedIntValues: Use this field if only certain integers are
1715	// accepted. Can be combined with min_value and max_value to add
1716	// additional values.
1717	AllowedIntValues googleapi.Int64s `json:"allowedIntValues,omitempty"`
1718
1719	// AllowedStringValues: For **STRING** flags, a list of strings that the
1720	// value can be set to.
1721	AllowedStringValues []string `json:"allowedStringValues,omitempty"`
1722
1723	// AppliesTo: The database version this flag applies to. Can be
1724	// **MYSQL_8_0**, **MYSQL_5_6**, or **MYSQL_5_7**.
1725	//
1726	// Possible values:
1727	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
1728	// version.
1729	//   "MYSQL_5_1" - The database version is MySQL 5.1.
1730	//   "MYSQL_5_5" - The database version is MySQL 5.5.
1731	//   "MYSQL_5_6" - The database version is MySQL 5.6.
1732	//   "MYSQL_5_7" - The database version is MySQL 5.7.
1733	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
1734	//   "POSTGRES_11" - The database version is PostgreSQL 11.
1735	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
1736	// Standard.
1737	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
1738	// 2017 Enterprise.
1739	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
1740	// Express.
1741	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
1742	//   "POSTGRES_10" - The database version is PostgreSQL 10.
1743	//   "POSTGRES_12" - The database version is PostgreSQL 12.
1744	//   "MYSQL_8_0" - The database version is MySQL 8.
1745	//   "POSTGRES_13" - The database version is PostgreSQL 13.
1746	//   "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019
1747	// Standard.
1748	//   "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server
1749	// 2019 Enterprise.
1750	//   "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019
1751	// Express.
1752	//   "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web.
1753	AppliesTo []string `json:"appliesTo,omitempty"`
1754
1755	// InBeta: Whether or not the flag is considered in beta.
1756	InBeta bool `json:"inBeta,omitempty"`
1757
1758	// Kind: This is always **sql#flag**.
1759	Kind string `json:"kind,omitempty"`
1760
1761	// MaxValue: For **INTEGER** flags, the maximum allowed value.
1762	MaxValue int64 `json:"maxValue,omitempty,string"`
1763
1764	// MinValue: For **INTEGER** flags, the minimum allowed value.
1765	MinValue int64 `json:"minValue,omitempty,string"`
1766
1767	// Name: This is the name of the flag. Flag names always use
1768	// underscores, not hyphens, for example: **max_allowed_packet**
1769	Name string `json:"name,omitempty"`
1770
1771	// RequiresRestart: Indicates whether changing this flag will trigger a
1772	// database restart. Only applicable to Second Generation instances.
1773	RequiresRestart bool `json:"requiresRestart,omitempty"`
1774
1775	// Type: The type of the flag. Flags are typed to being **BOOLEAN**,
1776	// **STRING**, **INTEGER** or **NONE**. **NONE** is used for flags which
1777	// do not take a value, such as **skip_grant_tables**.
1778	//
1779	// Possible values:
1780	//   "SQL_FLAG_TYPE_UNSPECIFIED" - This is an unknown flag type.
1781	//   "BOOLEAN" - Boolean type flag.
1782	//   "STRING" - String type flag.
1783	//   "INTEGER" - Integer type flag.
1784	//   "NONE" - Flag type used for a server startup option.
1785	//   "MYSQL_TIMEZONE_OFFSET" - Type introduced specially for MySQL
1786	// TimeZone offset. Accept a string value with the format [-12:59,
1787	// 13:00].
1788	//   "FLOAT" - Float type flag.
1789	//   "REPEATED_STRING" - Comma-separated list of the strings in a
1790	// SqlFlagType enum.
1791	Type string `json:"type,omitempty"`
1792
1793	// ForceSendFields is a list of field names (e.g. "AllowedIntValues") to
1794	// unconditionally include in API requests. By default, fields with
1795	// empty or default values are omitted from API requests. However, any
1796	// non-pointer, non-interface field appearing in ForceSendFields will be
1797	// sent to the server regardless of whether the field is empty or not.
1798	// This may be used to include empty fields in Patch requests.
1799	ForceSendFields []string `json:"-"`
1800
1801	// NullFields is a list of field names (e.g. "AllowedIntValues") to
1802	// include in API requests with the JSON null value. By default, fields
1803	// with empty values are omitted from API requests. However, any field
1804	// with an empty value appearing in NullFields will be sent to the
1805	// server as null. It is an error if a field in this list has a
1806	// non-empty value. This may be used to include null fields in Patch
1807	// requests.
1808	NullFields []string `json:"-"`
1809}
1810
1811func (s *Flag) MarshalJSON() ([]byte, error) {
1812	type NoMethod Flag
1813	raw := NoMethod(*s)
1814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1815}
1816
1817// FlagsListResponse: Flags list response.
1818type FlagsListResponse struct {
1819	// Items: List of flags.
1820	Items []*Flag `json:"items,omitempty"`
1821
1822	// Kind: This is always **sql#flagsList**.
1823	Kind string `json:"kind,omitempty"`
1824
1825	// ServerResponse contains the HTTP response code and headers from the
1826	// server.
1827	googleapi.ServerResponse `json:"-"`
1828
1829	// ForceSendFields is a list of field names (e.g. "Items") to
1830	// unconditionally include in API requests. By default, fields with
1831	// empty or default values are omitted from API requests. However, any
1832	// non-pointer, non-interface field appearing in ForceSendFields will be
1833	// sent to the server regardless of whether the field is empty or not.
1834	// This may be used to include empty fields in Patch requests.
1835	ForceSendFields []string `json:"-"`
1836
1837	// NullFields is a list of field names (e.g. "Items") to include in API
1838	// requests with the JSON null value. By default, fields with empty
1839	// values are omitted from API requests. However, any field with an
1840	// empty value appearing in NullFields will be sent to the server as
1841	// null. It is an error if a field in this list has a non-empty value.
1842	// This may be used to include null fields in Patch requests.
1843	NullFields []string `json:"-"`
1844}
1845
1846func (s *FlagsListResponse) MarshalJSON() ([]byte, error) {
1847	type NoMethod FlagsListResponse
1848	raw := NoMethod(*s)
1849	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1850}
1851
1852// GenerateEphemeralCertRequest: Ephemeral certificate creation request.
1853type GenerateEphemeralCertRequest struct {
1854	// AccessToken: Optional. Access token to include in the signed
1855	// certificate.
1856	AccessToken string `json:"access_token,omitempty"`
1857
1858	// PublicKey: PEM encoded public key to include in the signed
1859	// certificate.
1860	PublicKey string `json:"public_key,omitempty"`
1861
1862	// ReadTime: Optional. Optional snapshot read timestamp to trade
1863	// freshness for performance.
1864	ReadTime string `json:"readTime,omitempty"`
1865
1866	// ValidDuration: Optional. If set, it will contain the cert valid
1867	// duration.
1868	ValidDuration string `json:"validDuration,omitempty"`
1869
1870	// ForceSendFields is a list of field names (e.g. "AccessToken") to
1871	// unconditionally include in API requests. By default, fields with
1872	// empty or default values are omitted from API requests. However, any
1873	// non-pointer, non-interface field appearing in ForceSendFields will be
1874	// sent to the server regardless of whether the field is empty or not.
1875	// This may be used to include empty fields in Patch requests.
1876	ForceSendFields []string `json:"-"`
1877
1878	// NullFields is a list of field names (e.g. "AccessToken") to include
1879	// in API requests with the JSON null value. By default, fields with
1880	// empty values are omitted from API requests. However, any field with
1881	// an empty value appearing in NullFields will be sent to the server as
1882	// null. It is an error if a field in this list has a non-empty value.
1883	// This may be used to include null fields in Patch requests.
1884	NullFields []string `json:"-"`
1885}
1886
1887func (s *GenerateEphemeralCertRequest) MarshalJSON() ([]byte, error) {
1888	type NoMethod GenerateEphemeralCertRequest
1889	raw := NoMethod(*s)
1890	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1891}
1892
1893// GenerateEphemeralCertResponse: Ephemeral certificate creation
1894// request.
1895type GenerateEphemeralCertResponse struct {
1896	// EphemeralCert: Generated cert
1897	EphemeralCert *SslCert `json:"ephemeralCert,omitempty"`
1898
1899	// ServerResponse contains the HTTP response code and headers from the
1900	// server.
1901	googleapi.ServerResponse `json:"-"`
1902
1903	// ForceSendFields is a list of field names (e.g. "EphemeralCert") to
1904	// unconditionally include in API requests. By default, fields with
1905	// empty or default values are omitted from API requests. However, any
1906	// non-pointer, non-interface field appearing in ForceSendFields will be
1907	// sent to the server regardless of whether the field is empty or not.
1908	// This may be used to include empty fields in Patch requests.
1909	ForceSendFields []string `json:"-"`
1910
1911	// NullFields is a list of field names (e.g. "EphemeralCert") to include
1912	// in API requests with the JSON null value. By default, fields with
1913	// empty values are omitted from API requests. However, any field with
1914	// an empty value appearing in NullFields will be sent to the server as
1915	// null. It is an error if a field in this list has a non-empty value.
1916	// This may be used to include null fields in Patch requests.
1917	NullFields []string `json:"-"`
1918}
1919
1920func (s *GenerateEphemeralCertResponse) MarshalJSON() ([]byte, error) {
1921	type NoMethod GenerateEphemeralCertResponse
1922	raw := NoMethod(*s)
1923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1924}
1925
1926// ImportContext: Database instance import context.
1927type ImportContext struct {
1928	// BakImportOptions: Import parameters specific to SQL Server .BAK files
1929	BakImportOptions *ImportContextBakImportOptions `json:"bakImportOptions,omitempty"`
1930
1931	// CsvImportOptions: Options for importing data as CSV.
1932	CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"`
1933
1934	// Database: The target database for the import. If **fileType** is
1935	// **SQL**, this field is required only if the import file does not
1936	// specify a database, and is overridden by any database specification
1937	// in the import file. If **fileType** is **CSV**, one database must be
1938	// specified.
1939	Database string `json:"database,omitempty"`
1940
1941	// FileType: The file type for the specified uri. **SQL**: The file
1942	// contains SQL statements. **CSV**: The file contains CSV data.
1943	//
1944	// Possible values:
1945	//   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
1946	//   "SQL" - File containing SQL statements.
1947	//   "CSV" - File in CSV format.
1948	//   "BAK"
1949	FileType string `json:"fileType,omitempty"`
1950
1951	// ImportUser: The PostgreSQL user for this import operation. PostgreSQL
1952	// instances only.
1953	ImportUser string `json:"importUser,omitempty"`
1954
1955	// Kind: This is always **sql#importContext**.
1956	Kind string `json:"kind,omitempty"`
1957
1958	// Uri: Path to the import file in Cloud Storage, in the form
1959	// **gs://bucketName/fileName**. Compressed gzip files (.gz) are
1960	// supported when **fileType** is **SQL**. The instance must have write
1961	// permissions to the bucket and read access to the file.
1962	Uri string `json:"uri,omitempty"`
1963
1964	// ForceSendFields is a list of field names (e.g. "BakImportOptions") to
1965	// unconditionally include in API requests. By default, fields with
1966	// empty or default values are omitted from API requests. However, any
1967	// non-pointer, non-interface field appearing in ForceSendFields will be
1968	// sent to the server regardless of whether the field is empty or not.
1969	// This may be used to include empty fields in Patch requests.
1970	ForceSendFields []string `json:"-"`
1971
1972	// NullFields is a list of field names (e.g. "BakImportOptions") to
1973	// include in API requests with the JSON null value. By default, fields
1974	// with empty values are omitted from API requests. However, any field
1975	// with an empty value appearing in NullFields will be sent to the
1976	// server as null. It is an error if a field in this list has a
1977	// non-empty value. This may be used to include null fields in Patch
1978	// requests.
1979	NullFields []string `json:"-"`
1980}
1981
1982func (s *ImportContext) MarshalJSON() ([]byte, error) {
1983	type NoMethod ImportContext
1984	raw := NoMethod(*s)
1985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1986}
1987
1988// ImportContextBakImportOptions: Import parameters specific to SQL
1989// Server .BAK files
1990type ImportContextBakImportOptions struct {
1991	EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"`
1992
1993	// ForceSendFields is a list of field names (e.g. "EncryptionOptions")
1994	// to unconditionally include in API requests. By default, fields with
1995	// empty or default values are omitted from API requests. However, any
1996	// non-pointer, non-interface field appearing in ForceSendFields will be
1997	// sent to the server regardless of whether the field is empty or not.
1998	// This may be used to include empty fields in Patch requests.
1999	ForceSendFields []string `json:"-"`
2000
2001	// NullFields is a list of field names (e.g. "EncryptionOptions") to
2002	// include in API requests with the JSON null value. By default, fields
2003	// with empty values are omitted from API requests. However, any field
2004	// with an empty value appearing in NullFields will be sent to the
2005	// server as null. It is an error if a field in this list has a
2006	// non-empty value. This may be used to include null fields in Patch
2007	// requests.
2008	NullFields []string `json:"-"`
2009}
2010
2011func (s *ImportContextBakImportOptions) MarshalJSON() ([]byte, error) {
2012	type NoMethod ImportContextBakImportOptions
2013	raw := NoMethod(*s)
2014	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2015}
2016
2017type ImportContextBakImportOptionsEncryptionOptions struct {
2018	// CertPath: Path to the Certificate (.cer) in Cloud Storage, in the
2019	// form **gs://bucketName/fileName**. The instance must have write
2020	// permissions to the bucket and read access to the file.
2021	CertPath string `json:"certPath,omitempty"`
2022
2023	// PvkPassword: Password that encrypts the private key
2024	PvkPassword string `json:"pvkPassword,omitempty"`
2025
2026	// PvkPath: Path to the Certificate Private Key (.pvk) in Cloud Storage,
2027	// in the form **gs://bucketName/fileName**. The instance must have
2028	// write permissions to the bucket and read access to the file.
2029	PvkPath string `json:"pvkPath,omitempty"`
2030
2031	// ForceSendFields is a list of field names (e.g. "CertPath") to
2032	// unconditionally include in API requests. By default, fields with
2033	// empty or default values are omitted from API requests. However, any
2034	// non-pointer, non-interface field appearing in ForceSendFields will be
2035	// sent to the server regardless of whether the field is empty or not.
2036	// This may be used to include empty fields in Patch requests.
2037	ForceSendFields []string `json:"-"`
2038
2039	// NullFields is a list of field names (e.g. "CertPath") to include in
2040	// API requests with the JSON null value. By default, fields with empty
2041	// values are omitted from API requests. However, any field with an
2042	// empty value appearing in NullFields will be sent to the server as
2043	// null. It is an error if a field in this list has a non-empty value.
2044	// This may be used to include null fields in Patch requests.
2045	NullFields []string `json:"-"`
2046}
2047
2048func (s *ImportContextBakImportOptionsEncryptionOptions) MarshalJSON() ([]byte, error) {
2049	type NoMethod ImportContextBakImportOptionsEncryptionOptions
2050	raw := NoMethod(*s)
2051	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2052}
2053
2054// ImportContextCsvImportOptions: Options for importing data as CSV.
2055type ImportContextCsvImportOptions struct {
2056	// Columns: The columns to which CSV data is imported. If not specified,
2057	// all columns of the database table are loaded with CSV data.
2058	Columns []string `json:"columns,omitempty"`
2059
2060	// EscapeCharacter: Specifies the character that should appear before a
2061	// data character that needs to be escaped.
2062	EscapeCharacter string `json:"escapeCharacter,omitempty"`
2063
2064	// FieldsTerminatedBy: Specifies the character that separates columns
2065	// within each row (line) of the file.
2066	FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"`
2067
2068	// LinesTerminatedBy: This is used to separate lines. If a line does not
2069	// contain all fields, the rest of the columns are set to their default
2070	// values.
2071	LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"`
2072
2073	// QuoteCharacter: Specifies the quoting character to be used when a
2074	// data value is quoted.
2075	QuoteCharacter string `json:"quoteCharacter,omitempty"`
2076
2077	// Table: The table to which CSV data is imported.
2078	Table string `json:"table,omitempty"`
2079
2080	// ForceSendFields is a list of field names (e.g. "Columns") to
2081	// unconditionally include in API requests. By default, fields with
2082	// empty or default values are omitted from API requests. However, any
2083	// non-pointer, non-interface field appearing in ForceSendFields will be
2084	// sent to the server regardless of whether the field is empty or not.
2085	// This may be used to include empty fields in Patch requests.
2086	ForceSendFields []string `json:"-"`
2087
2088	// NullFields is a list of field names (e.g. "Columns") to include in
2089	// API requests with the JSON null value. By default, fields with empty
2090	// values are omitted from API requests. However, any field with an
2091	// empty value appearing in NullFields will be sent to the server as
2092	// null. It is an error if a field in this list has a non-empty value.
2093	// This may be used to include null fields in Patch requests.
2094	NullFields []string `json:"-"`
2095}
2096
2097func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) {
2098	type NoMethod ImportContextCsvImportOptions
2099	raw := NoMethod(*s)
2100	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2101}
2102
2103// InsightsConfig: Insights configuration. This specifies when Cloud SQL
2104// Insights feature is enabled and optional configuration.
2105type InsightsConfig struct {
2106	// QueryInsightsEnabled: Whether Query Insights feature is enabled.
2107	QueryInsightsEnabled bool `json:"queryInsightsEnabled,omitempty"`
2108
2109	// QueryPlansPerMinute: Number of query execution plans captured by
2110	// Insights per minute for all queries combined. Default is 5.
2111	QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"`
2112
2113	// QueryStringLength: Maximum query length stored in bytes. Default
2114	// value: 1024 bytes. Range: 256-4500 bytes. Query length more than this
2115	// field value will be truncated to this value. When unset, query length
2116	// will be the default value. Changing query length will restart the
2117	// database.
2118	QueryStringLength int64 `json:"queryStringLength,omitempty"`
2119
2120	// RecordApplicationTags: Whether Query Insights will record application
2121	// tags from query when enabled.
2122	RecordApplicationTags bool `json:"recordApplicationTags,omitempty"`
2123
2124	// RecordClientAddress: Whether Query Insights will record client
2125	// address when enabled.
2126	RecordClientAddress bool `json:"recordClientAddress,omitempty"`
2127
2128	// ForceSendFields is a list of field names (e.g.
2129	// "QueryInsightsEnabled") to unconditionally include in API requests.
2130	// By default, fields with empty or default values are omitted from API
2131	// requests. However, any non-pointer, non-interface field appearing in
2132	// ForceSendFields will be sent to the server regardless of whether the
2133	// field is empty or not. This may be used to include empty fields in
2134	// Patch requests.
2135	ForceSendFields []string `json:"-"`
2136
2137	// NullFields is a list of field names (e.g. "QueryInsightsEnabled") to
2138	// include in API requests with the JSON null value. By default, fields
2139	// with empty values are omitted from API requests. However, any field
2140	// with an empty value appearing in NullFields will be sent to the
2141	// server as null. It is an error if a field in this list has a
2142	// non-empty value. This may be used to include null fields in Patch
2143	// requests.
2144	NullFields []string `json:"-"`
2145}
2146
2147func (s *InsightsConfig) MarshalJSON() ([]byte, error) {
2148	type NoMethod InsightsConfig
2149	raw := NoMethod(*s)
2150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2151}
2152
2153// InstanceReference: Reference to another Cloud SQL instance.
2154type InstanceReference struct {
2155	// Name: The name of the Cloud SQL instance being referenced. This does
2156	// not include the project ID.
2157	Name string `json:"name,omitempty"`
2158
2159	// Project: The project ID of the Cloud SQL instance being referenced.
2160	// The default is the same project ID as the instance references it.
2161	Project string `json:"project,omitempty"`
2162
2163	// Region: The region of the Cloud SQL instance being referenced.
2164	Region string `json:"region,omitempty"`
2165
2166	// ForceSendFields is a list of field names (e.g. "Name") to
2167	// unconditionally include in API requests. By default, fields with
2168	// empty or default values are omitted from API requests. However, any
2169	// non-pointer, non-interface field appearing in ForceSendFields will be
2170	// sent to the server regardless of whether the field is empty or not.
2171	// This may be used to include empty fields in Patch requests.
2172	ForceSendFields []string `json:"-"`
2173
2174	// NullFields is a list of field names (e.g. "Name") to include in API
2175	// requests with the JSON null value. By default, fields with empty
2176	// values are omitted from API requests. However, any field with an
2177	// empty value appearing in NullFields will be sent to the server as
2178	// null. It is an error if a field in this list has a non-empty value.
2179	// This may be used to include null fields in Patch requests.
2180	NullFields []string `json:"-"`
2181}
2182
2183func (s *InstanceReference) MarshalJSON() ([]byte, error) {
2184	type NoMethod InstanceReference
2185	raw := NoMethod(*s)
2186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2187}
2188
2189// InstancesCloneRequest: Database instance clone request.
2190type InstancesCloneRequest struct {
2191	// CloneContext: Contains details about the clone operation.
2192	CloneContext *CloneContext `json:"cloneContext,omitempty"`
2193
2194	// ForceSendFields is a list of field names (e.g. "CloneContext") to
2195	// unconditionally include in API requests. By default, fields with
2196	// empty or default values are omitted from API requests. However, any
2197	// non-pointer, non-interface field appearing in ForceSendFields will be
2198	// sent to the server regardless of whether the field is empty or not.
2199	// This may be used to include empty fields in Patch requests.
2200	ForceSendFields []string `json:"-"`
2201
2202	// NullFields is a list of field names (e.g. "CloneContext") to include
2203	// in API requests with the JSON null value. By default, fields with
2204	// empty values are omitted from API requests. However, any field with
2205	// an empty value appearing in NullFields will be sent to the server as
2206	// null. It is an error if a field in this list has a non-empty value.
2207	// This may be used to include null fields in Patch requests.
2208	NullFields []string `json:"-"`
2209}
2210
2211func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error) {
2212	type NoMethod InstancesCloneRequest
2213	raw := NoMethod(*s)
2214	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2215}
2216
2217// InstancesDemoteMasterRequest: Database demote primary instance
2218// request.
2219type InstancesDemoteMasterRequest struct {
2220	// DemoteMasterContext: Contains details about the demoteMaster
2221	// operation.
2222	DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"`
2223
2224	// ForceSendFields is a list of field names (e.g. "DemoteMasterContext")
2225	// to unconditionally include in API requests. By default, fields with
2226	// empty or default values are omitted from API requests. However, any
2227	// non-pointer, non-interface field appearing in ForceSendFields will be
2228	// sent to the server regardless of whether the field is empty or not.
2229	// This may be used to include empty fields in Patch requests.
2230	ForceSendFields []string `json:"-"`
2231
2232	// NullFields is a list of field names (e.g. "DemoteMasterContext") to
2233	// include in API requests with the JSON null value. By default, fields
2234	// with empty values are omitted from API requests. However, any field
2235	// with an empty value appearing in NullFields will be sent to the
2236	// server as null. It is an error if a field in this list has a
2237	// non-empty value. This may be used to include null fields in Patch
2238	// requests.
2239	NullFields []string `json:"-"`
2240}
2241
2242func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error) {
2243	type NoMethod InstancesDemoteMasterRequest
2244	raw := NoMethod(*s)
2245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2246}
2247
2248// InstancesExportRequest: Database instance export request.
2249type InstancesExportRequest struct {
2250	// ExportContext: Contains details about the export operation.
2251	ExportContext *ExportContext `json:"exportContext,omitempty"`
2252
2253	// ForceSendFields is a list of field names (e.g. "ExportContext") to
2254	// unconditionally include in API requests. By default, fields with
2255	// empty or default values are omitted from API requests. However, any
2256	// non-pointer, non-interface field appearing in ForceSendFields will be
2257	// sent to the server regardless of whether the field is empty or not.
2258	// This may be used to include empty fields in Patch requests.
2259	ForceSendFields []string `json:"-"`
2260
2261	// NullFields is a list of field names (e.g. "ExportContext") to include
2262	// in API requests with the JSON null value. By default, fields with
2263	// empty values are omitted from API requests. However, any field with
2264	// an empty value appearing in NullFields will be sent to the server as
2265	// null. It is an error if a field in this list has a non-empty value.
2266	// This may be used to include null fields in Patch requests.
2267	NullFields []string `json:"-"`
2268}
2269
2270func (s *InstancesExportRequest) MarshalJSON() ([]byte, error) {
2271	type NoMethod InstancesExportRequest
2272	raw := NoMethod(*s)
2273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2274}
2275
2276// InstancesFailoverRequest: Instance failover request.
2277type InstancesFailoverRequest struct {
2278	// FailoverContext: Failover Context.
2279	FailoverContext *FailoverContext `json:"failoverContext,omitempty"`
2280
2281	// ForceSendFields is a list of field names (e.g. "FailoverContext") to
2282	// unconditionally include in API requests. By default, fields with
2283	// empty or default values are omitted from API requests. However, any
2284	// non-pointer, non-interface field appearing in ForceSendFields will be
2285	// sent to the server regardless of whether the field is empty or not.
2286	// This may be used to include empty fields in Patch requests.
2287	ForceSendFields []string `json:"-"`
2288
2289	// NullFields is a list of field names (e.g. "FailoverContext") to
2290	// include in API requests with the JSON null value. By default, fields
2291	// with empty values are omitted from API requests. However, any field
2292	// with an empty value appearing in NullFields will be sent to the
2293	// server as null. It is an error if a field in this list has a
2294	// non-empty value. This may be used to include null fields in Patch
2295	// requests.
2296	NullFields []string `json:"-"`
2297}
2298
2299func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error) {
2300	type NoMethod InstancesFailoverRequest
2301	raw := NoMethod(*s)
2302	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2303}
2304
2305// InstancesImportRequest: Database instance import request.
2306type InstancesImportRequest struct {
2307	// ImportContext: Contains details about the import operation.
2308	ImportContext *ImportContext `json:"importContext,omitempty"`
2309
2310	// ForceSendFields is a list of field names (e.g. "ImportContext") to
2311	// unconditionally include in API requests. By default, fields with
2312	// empty or default values are omitted from API requests. However, any
2313	// non-pointer, non-interface field appearing in ForceSendFields will be
2314	// sent to the server regardless of whether the field is empty or not.
2315	// This may be used to include empty fields in Patch requests.
2316	ForceSendFields []string `json:"-"`
2317
2318	// NullFields is a list of field names (e.g. "ImportContext") to include
2319	// in API requests with the JSON null value. By default, fields with
2320	// empty values are omitted from API requests. However, any field with
2321	// an empty value appearing in NullFields will be sent to the server as
2322	// null. It is an error if a field in this list has a non-empty value.
2323	// This may be used to include null fields in Patch requests.
2324	NullFields []string `json:"-"`
2325}
2326
2327func (s *InstancesImportRequest) MarshalJSON() ([]byte, error) {
2328	type NoMethod InstancesImportRequest
2329	raw := NoMethod(*s)
2330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2331}
2332
2333// InstancesListResponse: Database instances list response.
2334type InstancesListResponse struct {
2335	// Items: List of database instance resources.
2336	Items []*DatabaseInstance `json:"items,omitempty"`
2337
2338	// Kind: This is always **sql#instancesList**.
2339	Kind string `json:"kind,omitempty"`
2340
2341	// NextPageToken: The continuation token, used to page through large
2342	// result sets. Provide this value in a subsequent request to return the
2343	// next page of results.
2344	NextPageToken string `json:"nextPageToken,omitempty"`
2345
2346	// Warnings: List of warnings that occurred while handling the request.
2347	Warnings []*ApiWarning `json:"warnings,omitempty"`
2348
2349	// ServerResponse contains the HTTP response code and headers from the
2350	// server.
2351	googleapi.ServerResponse `json:"-"`
2352
2353	// ForceSendFields is a list of field names (e.g. "Items") to
2354	// unconditionally include in API requests. By default, fields with
2355	// empty or default values are omitted from API requests. However, any
2356	// non-pointer, non-interface field appearing in ForceSendFields will be
2357	// sent to the server regardless of whether the field is empty or not.
2358	// This may be used to include empty fields in Patch requests.
2359	ForceSendFields []string `json:"-"`
2360
2361	// NullFields is a list of field names (e.g. "Items") to include in API
2362	// requests with the JSON null value. By default, fields with empty
2363	// values are omitted from API requests. However, any field with an
2364	// empty value appearing in NullFields will be sent to the server as
2365	// null. It is an error if a field in this list has a non-empty value.
2366	// This may be used to include null fields in Patch requests.
2367	NullFields []string `json:"-"`
2368}
2369
2370func (s *InstancesListResponse) MarshalJSON() ([]byte, error) {
2371	type NoMethod InstancesListResponse
2372	raw := NoMethod(*s)
2373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2374}
2375
2376// InstancesListServerCasResponse: Instances ListServerCas response.
2377type InstancesListServerCasResponse struct {
2378	ActiveVersion string `json:"activeVersion,omitempty"`
2379
2380	// Certs: List of server CA certificates for the instance.
2381	Certs []*SslCert `json:"certs,omitempty"`
2382
2383	// Kind: This is always **sql#instancesListServerCas**.
2384	Kind string `json:"kind,omitempty"`
2385
2386	// ServerResponse contains the HTTP response code and headers from the
2387	// server.
2388	googleapi.ServerResponse `json:"-"`
2389
2390	// ForceSendFields is a list of field names (e.g. "ActiveVersion") to
2391	// unconditionally include in API requests. By default, fields with
2392	// empty or default values are omitted from API requests. However, any
2393	// non-pointer, non-interface field appearing in ForceSendFields will be
2394	// sent to the server regardless of whether the field is empty or not.
2395	// This may be used to include empty fields in Patch requests.
2396	ForceSendFields []string `json:"-"`
2397
2398	// NullFields is a list of field names (e.g. "ActiveVersion") to include
2399	// in API requests with the JSON null value. By default, fields with
2400	// empty values are omitted from API requests. However, any field with
2401	// an empty value appearing in NullFields will be sent to the server as
2402	// null. It is an error if a field in this list has a non-empty value.
2403	// This may be used to include null fields in Patch requests.
2404	NullFields []string `json:"-"`
2405}
2406
2407func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error) {
2408	type NoMethod InstancesListServerCasResponse
2409	raw := NoMethod(*s)
2410	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2411}
2412
2413// InstancesRestoreBackupRequest: Database instance restore backup
2414// request.
2415type InstancesRestoreBackupRequest struct {
2416	// RestoreBackupContext: Parameters required to perform the restore
2417	// backup operation.
2418	RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"`
2419
2420	// ForceSendFields is a list of field names (e.g.
2421	// "RestoreBackupContext") to unconditionally include in API requests.
2422	// By default, fields with empty or default values are omitted from API
2423	// requests. However, any non-pointer, non-interface field appearing in
2424	// ForceSendFields will be sent to the server regardless of whether the
2425	// field is empty or not. This may be used to include empty fields in
2426	// Patch requests.
2427	ForceSendFields []string `json:"-"`
2428
2429	// NullFields is a list of field names (e.g. "RestoreBackupContext") to
2430	// include in API requests with the JSON null value. By default, fields
2431	// with empty values are omitted from API requests. However, any field
2432	// with an empty value appearing in NullFields will be sent to the
2433	// server as null. It is an error if a field in this list has a
2434	// non-empty value. This may be used to include null fields in Patch
2435	// requests.
2436	NullFields []string `json:"-"`
2437}
2438
2439func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) {
2440	type NoMethod InstancesRestoreBackupRequest
2441	raw := NoMethod(*s)
2442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2443}
2444
2445// InstancesRotateServerCaRequest: Rotate server CA request.
2446type InstancesRotateServerCaRequest struct {
2447	// RotateServerCaContext: Contains details about the rotate server CA
2448	// operation.
2449	RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"`
2450
2451	// ForceSendFields is a list of field names (e.g.
2452	// "RotateServerCaContext") to unconditionally include in API requests.
2453	// By default, fields with empty or default values are omitted from API
2454	// requests. However, any non-pointer, non-interface field appearing in
2455	// ForceSendFields will be sent to the server regardless of whether the
2456	// field is empty or not. This may be used to include empty fields in
2457	// Patch requests.
2458	ForceSendFields []string `json:"-"`
2459
2460	// NullFields is a list of field names (e.g. "RotateServerCaContext") to
2461	// include in API requests with the JSON null value. By default, fields
2462	// with empty values are omitted from API requests. However, any field
2463	// with an empty value appearing in NullFields will be sent to the
2464	// server as null. It is an error if a field in this list has a
2465	// non-empty value. This may be used to include null fields in Patch
2466	// requests.
2467	NullFields []string `json:"-"`
2468}
2469
2470func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error) {
2471	type NoMethod InstancesRotateServerCaRequest
2472	raw := NoMethod(*s)
2473	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2474}
2475
2476// InstancesTruncateLogRequest: Instance truncate log request.
2477type InstancesTruncateLogRequest struct {
2478	// TruncateLogContext: Contains details about the truncate log
2479	// operation.
2480	TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"`
2481
2482	// ForceSendFields is a list of field names (e.g. "TruncateLogContext")
2483	// to unconditionally include in API requests. By default, fields with
2484	// empty or default values are omitted from API requests. However, any
2485	// non-pointer, non-interface field appearing in ForceSendFields will be
2486	// sent to the server regardless of whether the field is empty or not.
2487	// This may be used to include empty fields in Patch requests.
2488	ForceSendFields []string `json:"-"`
2489
2490	// NullFields is a list of field names (e.g. "TruncateLogContext") to
2491	// include in API requests with the JSON null value. By default, fields
2492	// with empty values are omitted from API requests. However, any field
2493	// with an empty value appearing in NullFields will be sent to the
2494	// server as null. It is an error if a field in this list has a
2495	// non-empty value. This may be used to include null fields in Patch
2496	// requests.
2497	NullFields []string `json:"-"`
2498}
2499
2500func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error) {
2501	type NoMethod InstancesTruncateLogRequest
2502	raw := NoMethod(*s)
2503	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2504}
2505
2506// IpConfiguration: IP Management configuration.
2507type IpConfiguration struct {
2508	// AllocatedIpRange: The name of the allocated ip range for the private
2509	// ip CloudSQL instance. For example: "google-managed-services-default".
2510	// If set, the instance ip will be created in the allocated range. The
2511	// range name must comply with RFC 1035
2512	// (https://tools.ietf.org/html/rfc1035). Specifically, the name must be
2513	// 1-63 characters long and match the regular expression
2514	// `[a-z]([-a-z0-9]*[a-z0-9])?.` Reserved for future use.
2515	AllocatedIpRange string `json:"allocatedIpRange,omitempty"`
2516
2517	// AuthorizedNetworks: The list of external networks that are allowed to
2518	// connect to the instance using the IP. In 'CIDR' notation, also known
2519	// as 'slash' notation (for example: **192.168.100.0/24**).
2520	AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"`
2521
2522	// Ipv4Enabled: Whether the instance is assigned a public IP address or
2523	// not.
2524	Ipv4Enabled bool `json:"ipv4Enabled,omitempty"`
2525
2526	// PrivateNetwork: The resource link for the VPC network from which the
2527	// Cloud SQL instance is accessible for private IP. For example,
2528	// **/projects/myProject/global/networks/default**. This setting can be
2529	// updated, but it cannot be removed after it is set.
2530	PrivateNetwork string `json:"privateNetwork,omitempty"`
2531
2532	// RequireSsl: Whether SSL connections over IP are enforced or not.
2533	RequireSsl bool `json:"requireSsl,omitempty"`
2534
2535	// ForceSendFields is a list of field names (e.g. "AllocatedIpRange") to
2536	// unconditionally include in API requests. By default, fields with
2537	// empty or default values are omitted from API requests. However, any
2538	// non-pointer, non-interface field appearing in ForceSendFields will be
2539	// sent to the server regardless of whether the field is empty or not.
2540	// This may be used to include empty fields in Patch requests.
2541	ForceSendFields []string `json:"-"`
2542
2543	// NullFields is a list of field names (e.g. "AllocatedIpRange") to
2544	// include in API requests with the JSON null value. By default, fields
2545	// with empty values are omitted from API requests. However, any field
2546	// with an empty value appearing in NullFields will be sent to the
2547	// server as null. It is an error if a field in this list has a
2548	// non-empty value. This may be used to include null fields in Patch
2549	// requests.
2550	NullFields []string `json:"-"`
2551}
2552
2553func (s *IpConfiguration) MarshalJSON() ([]byte, error) {
2554	type NoMethod IpConfiguration
2555	raw := NoMethod(*s)
2556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2557}
2558
2559// IpMapping: Database instance IP Mapping.
2560type IpMapping struct {
2561	// IpAddress: The IP address assigned.
2562	IpAddress string `json:"ipAddress,omitempty"`
2563
2564	// TimeToRetire: The due time for this IP to be retired in RFC 3339
2565	// (https://tools.ietf.org/html/rfc3339) format, for example
2566	// **2012-11-15T16:19:00.094Z**. This field is only available when the
2567	// IP is scheduled to be retired.
2568	TimeToRetire string `json:"timeToRetire,omitempty"`
2569
2570	// Type: The type of this IP address. A **PRIMARY** address is a public
2571	// address that can accept incoming connections. A **PRIVATE** address
2572	// is a private address that can accept incoming connections. An
2573	// **OUTGOING** address is the source address of connections originating
2574	// from the instance, if supported.
2575	//
2576	// Possible values:
2577	//   "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" - This is an unknown IP address
2578	// type.
2579	//   "PRIMARY" - IP address the customer is supposed to connect to.
2580	// Usually this is the load balancer's IP address
2581	//   "OUTGOING" - Source IP address of the connection a read replica
2582	// establishes to its external primary instance. This IP address can be
2583	// allowlisted by the customer in case it has a firewall that filters
2584	// incoming connection to its on premises primary instance.
2585	//   "PRIVATE" - Private IP used when using private IPs and network
2586	// peering.
2587	//   "MIGRATED_1ST_GEN" - V1 IP of a migrated instance. We want the user
2588	// to decommission this IP as soon as the migration is complete. Note:
2589	// V1 instances with V1 ip addresses will be counted as PRIMARY.
2590	Type string `json:"type,omitempty"`
2591
2592	// ForceSendFields is a list of field names (e.g. "IpAddress") to
2593	// unconditionally include in API requests. By default, fields with
2594	// empty or default values are omitted from API requests. However, any
2595	// non-pointer, non-interface field appearing in ForceSendFields will be
2596	// sent to the server regardless of whether the field is empty or not.
2597	// This may be used to include empty fields in Patch requests.
2598	ForceSendFields []string `json:"-"`
2599
2600	// NullFields is a list of field names (e.g. "IpAddress") to include in
2601	// API requests with the JSON null value. By default, fields with empty
2602	// values are omitted from API requests. However, any field with an
2603	// empty value appearing in NullFields will be sent to the server as
2604	// null. It is an error if a field in this list has a non-empty value.
2605	// This may be used to include null fields in Patch requests.
2606	NullFields []string `json:"-"`
2607}
2608
2609func (s *IpMapping) MarshalJSON() ([]byte, error) {
2610	type NoMethod IpMapping
2611	raw := NoMethod(*s)
2612	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2613}
2614
2615// LocationPreference: Preferred location. This specifies where a Cloud
2616// SQL instance is located. Note that if the preferred location is not
2617// available, the instance will be located as close as possible within
2618// the region. Only one location may be specified.
2619type LocationPreference struct {
2620	// FollowGaeApplication: The App Engine application to follow, it must
2621	// be in the same region as the Cloud SQL instance.
2622	FollowGaeApplication string `json:"followGaeApplication,omitempty"`
2623
2624	// Kind: This is always **sql#locationPreference**.
2625	Kind string `json:"kind,omitempty"`
2626
2627	// SecondaryZone: The preferred Compute Engine zone for the
2628	// secondary/failover (for example: us-central1-a, us-central1-b, etc.).
2629	// Reserved for future use.
2630	SecondaryZone string `json:"secondaryZone,omitempty"`
2631
2632	// Zone: The preferred Compute Engine zone (for example: us-central1-a,
2633	// us-central1-b, etc.).
2634	Zone string `json:"zone,omitempty"`
2635
2636	// ForceSendFields is a list of field names (e.g.
2637	// "FollowGaeApplication") to unconditionally include in API requests.
2638	// By default, fields with empty or default values are omitted from API
2639	// requests. However, any non-pointer, non-interface field appearing in
2640	// ForceSendFields will be sent to the server regardless of whether the
2641	// field is empty or not. This may be used to include empty fields in
2642	// Patch requests.
2643	ForceSendFields []string `json:"-"`
2644
2645	// NullFields is a list of field names (e.g. "FollowGaeApplication") to
2646	// include in API requests with the JSON null value. By default, fields
2647	// with empty values are omitted from API requests. However, any field
2648	// with an empty value appearing in NullFields will be sent to the
2649	// server as null. It is an error if a field in this list has a
2650	// non-empty value. This may be used to include null fields in Patch
2651	// requests.
2652	NullFields []string `json:"-"`
2653}
2654
2655func (s *LocationPreference) MarshalJSON() ([]byte, error) {
2656	type NoMethod LocationPreference
2657	raw := NoMethod(*s)
2658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2659}
2660
2661// MaintenanceWindow: Maintenance window. This specifies when a Cloud
2662// SQL instance is restarted for system maintenance purposes.
2663type MaintenanceWindow struct {
2664	// Day: day of week (1-7), starting on Monday.
2665	Day int64 `json:"day,omitempty"`
2666
2667	// Hour: hour of day - 0 to 23.
2668	Hour int64 `json:"hour,omitempty"`
2669
2670	// Kind: This is always **sql#maintenanceWindow**.
2671	Kind string `json:"kind,omitempty"`
2672
2673	// UpdateTrack: Maintenance timing setting: **canary** (Earlier) or
2674	// **stable** (Later). Learn more
2675	// (https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).
2676	//
2677	// Possible values:
2678	//   "SQL_UPDATE_TRACK_UNSPECIFIED" - This is an unknown maintenance
2679	// timing preference.
2680	//   "canary" - For instance update that requires a restart, this update
2681	// track indicates your instance prefer to restart for new version early
2682	// in maintenance window.
2683	//   "stable" - For instance update that requires a restart, this update
2684	// track indicates your instance prefer to let Cloud SQL choose the
2685	// timing of restart (within its Maintenance window, if applicable).
2686	UpdateTrack string `json:"updateTrack,omitempty"`
2687
2688	// ForceSendFields is a list of field names (e.g. "Day") to
2689	// unconditionally include in API requests. By default, fields with
2690	// empty or default values are omitted from API requests. However, any
2691	// non-pointer, non-interface field appearing in ForceSendFields will be
2692	// sent to the server regardless of whether the field is empty or not.
2693	// This may be used to include empty fields in Patch requests.
2694	ForceSendFields []string `json:"-"`
2695
2696	// NullFields is a list of field names (e.g. "Day") to include in API
2697	// requests with the JSON null value. By default, fields with empty
2698	// values are omitted from API requests. However, any field with an
2699	// empty value appearing in NullFields will be sent to the server as
2700	// null. It is an error if a field in this list has a non-empty value.
2701	// This may be used to include null fields in Patch requests.
2702	NullFields []string `json:"-"`
2703}
2704
2705func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
2706	type NoMethod MaintenanceWindow
2707	raw := NoMethod(*s)
2708	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2709}
2710
2711// MySqlReplicaConfiguration: Read-replica configuration specific to
2712// MySQL databases.
2713type MySqlReplicaConfiguration struct {
2714	// CaCertificate: PEM representation of the trusted CA's x509
2715	// certificate.
2716	CaCertificate string `json:"caCertificate,omitempty"`
2717
2718	// ClientCertificate: PEM representation of the replica's x509
2719	// certificate.
2720	ClientCertificate string `json:"clientCertificate,omitempty"`
2721
2722	// ClientKey: PEM representation of the replica's private key. The
2723	// corresponsing public key is encoded in the client's certificate.
2724	ClientKey string `json:"clientKey,omitempty"`
2725
2726	// ConnectRetryInterval: Seconds to wait between connect retries.
2727	// MySQL's default is 60 seconds.
2728	ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"`
2729
2730	// DumpFilePath: Path to a SQL dump file in Google Cloud Storage from
2731	// which the replica instance is to be created. The URI is in the form
2732	// gs://bucketName/fileName. Compressed gzip files (.gz) are also
2733	// supported. Dumps have the binlog co-ordinates from which replication
2734	// begins. This can be accomplished by setting --master-data to 1 when
2735	// using mysqldump.
2736	DumpFilePath string `json:"dumpFilePath,omitempty"`
2737
2738	// Kind: This is always **sql#mysqlReplicaConfiguration**.
2739	Kind string `json:"kind,omitempty"`
2740
2741	// MasterHeartbeatPeriod: Interval in milliseconds between replication
2742	// heartbeats.
2743	MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"`
2744
2745	// Password: The password for the replication connection.
2746	Password string `json:"password,omitempty"`
2747
2748	// SslCipher: A list of permissible ciphers to use for SSL encryption.
2749	SslCipher string `json:"sslCipher,omitempty"`
2750
2751	// Username: The username for the replication connection.
2752	Username string `json:"username,omitempty"`
2753
2754	// VerifyServerCertificate: Whether or not to check the primary
2755	// instance's Common Name value in the certificate that it sends during
2756	// the SSL handshake.
2757	VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"`
2758
2759	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
2760	// unconditionally include in API requests. By default, fields with
2761	// empty or default values are omitted from API requests. However, any
2762	// non-pointer, non-interface field appearing in ForceSendFields will be
2763	// sent to the server regardless of whether the field is empty or not.
2764	// This may be used to include empty fields in Patch requests.
2765	ForceSendFields []string `json:"-"`
2766
2767	// NullFields is a list of field names (e.g. "CaCertificate") to include
2768	// in API requests with the JSON null value. By default, fields with
2769	// empty values are omitted from API requests. However, any field with
2770	// an empty value appearing in NullFields will be sent to the server as
2771	// null. It is an error if a field in this list has a non-empty value.
2772	// This may be used to include null fields in Patch requests.
2773	NullFields []string `json:"-"`
2774}
2775
2776func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
2777	type NoMethod MySqlReplicaConfiguration
2778	raw := NoMethod(*s)
2779	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2780}
2781
2782// MySqlSyncConfig: MySQL-specific external server sync settings.
2783type MySqlSyncConfig struct {
2784	// InitialSyncFlags: Flags to use for the initial dump.
2785	InitialSyncFlags []*SyncFlags `json:"initialSyncFlags,omitempty"`
2786
2787	// ForceSendFields is a list of field names (e.g. "InitialSyncFlags") to
2788	// unconditionally include in API requests. By default, fields with
2789	// empty or default values are omitted from API requests. However, any
2790	// non-pointer, non-interface field appearing in ForceSendFields will be
2791	// sent to the server regardless of whether the field is empty or not.
2792	// This may be used to include empty fields in Patch requests.
2793	ForceSendFields []string `json:"-"`
2794
2795	// NullFields is a list of field names (e.g. "InitialSyncFlags") to
2796	// include in API requests with the JSON null value. By default, fields
2797	// with empty values are omitted from API requests. However, any field
2798	// with an empty value appearing in NullFields will be sent to the
2799	// server as null. It is an error if a field in this list has a
2800	// non-empty value. This may be used to include null fields in Patch
2801	// requests.
2802	NullFields []string `json:"-"`
2803}
2804
2805func (s *MySqlSyncConfig) MarshalJSON() ([]byte, error) {
2806	type NoMethod MySqlSyncConfig
2807	raw := NoMethod(*s)
2808	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2809}
2810
2811// OnPremisesConfiguration: On-premises instance configuration.
2812type OnPremisesConfiguration struct {
2813	// CaCertificate: PEM representation of the trusted CA's x509
2814	// certificate.
2815	CaCertificate string `json:"caCertificate,omitempty"`
2816
2817	// ClientCertificate: PEM representation of the replica's x509
2818	// certificate.
2819	ClientCertificate string `json:"clientCertificate,omitempty"`
2820
2821	// ClientKey: PEM representation of the replica's private key. The
2822	// corresponsing public key is encoded in the client's certificate.
2823	ClientKey string `json:"clientKey,omitempty"`
2824
2825	// DumpFilePath: The dump file to create the Cloud SQL replica.
2826	DumpFilePath string `json:"dumpFilePath,omitempty"`
2827
2828	// HostPort: The host and port of the on-premises instance in host:port
2829	// format
2830	HostPort string `json:"hostPort,omitempty"`
2831
2832	// Kind: This is always **sql#onPremisesConfiguration**.
2833	Kind string `json:"kind,omitempty"`
2834
2835	// Password: The password for connecting to on-premises instance.
2836	Password string `json:"password,omitempty"`
2837
2838	// SourceInstance: The reference to Cloud SQL instance if the source is
2839	// Cloud SQL.
2840	SourceInstance *InstanceReference `json:"sourceInstance,omitempty"`
2841
2842	// Username: The username for connecting to on-premises instance.
2843	Username string `json:"username,omitempty"`
2844
2845	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
2846	// unconditionally include in API requests. By default, fields with
2847	// empty or default values are omitted from API requests. However, any
2848	// non-pointer, non-interface field appearing in ForceSendFields will be
2849	// sent to the server regardless of whether the field is empty or not.
2850	// This may be used to include empty fields in Patch requests.
2851	ForceSendFields []string `json:"-"`
2852
2853	// NullFields is a list of field names (e.g. "CaCertificate") to include
2854	// in API requests with the JSON null value. By default, fields with
2855	// empty values are omitted from API requests. However, any field with
2856	// an empty value appearing in NullFields will be sent to the server as
2857	// null. It is an error if a field in this list has a non-empty value.
2858	// This may be used to include null fields in Patch requests.
2859	NullFields []string `json:"-"`
2860}
2861
2862func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error) {
2863	type NoMethod OnPremisesConfiguration
2864	raw := NoMethod(*s)
2865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2866}
2867
2868// Operation: An Operation resource. For successful operations that
2869// return an Operation resource, only the fields relevant to the
2870// operation are populated in the resource.
2871type Operation struct {
2872	// BackupContext: The context for backup operation, if applicable.
2873	BackupContext *BackupContext `json:"backupContext,omitempty"`
2874
2875	// EndTime: The time this operation finished in UTC timezone in RFC 3339
2876	// (https://tools.ietf.org/html/rfc3339) format, for example
2877	// **2012-11-15T16:19:00.094Z**.
2878	EndTime string `json:"endTime,omitempty"`
2879
2880	// Error: If errors occurred during processing of this operation, this
2881	// field will be populated.
2882	Error *OperationErrors `json:"error,omitempty"`
2883
2884	// ExportContext: The context for export operation, if applicable.
2885	ExportContext *ExportContext `json:"exportContext,omitempty"`
2886
2887	// ImportContext: The context for import operation, if applicable.
2888	ImportContext *ImportContext `json:"importContext,omitempty"`
2889
2890	// InsertTime: The time this operation was enqueued in UTC timezone in
2891	// RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
2892	// **2012-11-15T16:19:00.094Z**.
2893	InsertTime string `json:"insertTime,omitempty"`
2894
2895	// Kind: This is always **sql#operation**.
2896	Kind string `json:"kind,omitempty"`
2897
2898	// Name: An identifier that uniquely identifies the operation. You can
2899	// use this identifier to retrieve the Operations resource that has
2900	// information about the operation.
2901	Name string `json:"name,omitempty"`
2902
2903	// OperationType: The type of the operation. Valid values are: *
2904	// **CREATE** * **DELETE** * **UPDATE** * **RESTART** * **IMPORT** *
2905	// **EXPORT** * **BACKUP_VOLUME** * **RESTORE_VOLUME** * **CREATE_USER**
2906	// * **DELETE_USER** * **CREATE_DATABASE** * **DELETE_DATABASE**
2907	//
2908	// Possible values:
2909	//   "SQL_OPERATION_TYPE_UNSPECIFIED" - Unknown operation type.
2910	//   "IMPORT" - Imports data into a Cloud SQL instance.
2911	//   "EXPORT" - Exports data from a Cloud SQL instance to a Cloud
2912	// Storage bucket.
2913	//   "CREATE" - Creates a new Cloud SQL instance.
2914	//   "UPDATE" - Updates the settings of a Cloud SQL instance.
2915	//   "DELETE" - Deletes a Cloud SQL instance.
2916	//   "RESTART" - Restarts the Cloud SQL instance.
2917	//   "BACKUP"
2918	//   "SNAPSHOT"
2919	//   "BACKUP_VOLUME" - Performs instance backup.
2920	//   "DELETE_VOLUME" - Deletes an instance backup.
2921	//   "RESTORE_VOLUME" - Restores an instance backup.
2922	//   "INJECT_USER" - Injects a privileged user in mysql for MOB
2923	// instances.
2924	//   "CLONE" - Clones a Cloud SQL instance.
2925	//   "STOP_REPLICA" - Stops replication on a Cloud SQL read replica
2926	// instance.
2927	//   "START_REPLICA" - Starts replication on a Cloud SQL read replica
2928	// instance.
2929	//   "PROMOTE_REPLICA" - Promotes a Cloud SQL replica instance.
2930	//   "CREATE_REPLICA" - Creates a Cloud SQL replica instance.
2931	//   "CREATE_USER" - Creates a new user in a Cloud SQL instance.
2932	//   "DELETE_USER" - Deletes a user from a Cloud SQL instance.
2933	//   "UPDATE_USER" - Updates an existing user in a Cloud SQL instance.
2934	//   "CREATE_DATABASE" - Creates a database in the Cloud SQL instance.
2935	//   "DELETE_DATABASE" - Deletes a database in the Cloud SQL instance.
2936	//   "UPDATE_DATABASE" - Updates a database in the Cloud SQL instance.
2937	//   "FAILOVER" - Performs failover of an HA-enabled Cloud SQL failover
2938	// replica.
2939	//   "DELETE_BACKUP" - Deletes the backup taken by a backup run.
2940	//   "RECREATE_REPLICA"
2941	//   "TRUNCATE_LOG" - Truncates a general or slow log table in MySQL.
2942	//   "DEMOTE_MASTER" - Demotes the stand-alone instance to be a Cloud
2943	// SQL read replica for an external database server.
2944	//   "MAINTENANCE" - Indicates that the instance is currently in
2945	// maintenance. Maintenance typically causes the instance to be
2946	// unavailable for 1-3 minutes.
2947	//   "ENABLE_PRIVATE_IP" - This field is deprecated, and will be removed
2948	// in future version of API.
2949	//   "DEFER_MAINTENANCE"
2950	//   "CREATE_CLONE" - Creates clone instance.
2951	//   "RESCHEDULE_MAINTENANCE" - Reschedule maintenance to another time.
2952	//   "START_EXTERNAL_SYNC" - Starts external sync of a Cloud SQL EM
2953	// replica to an external primary instance.
2954	OperationType string `json:"operationType,omitempty"`
2955
2956	// SelfLink: The URI of this resource.
2957	SelfLink string `json:"selfLink,omitempty"`
2958
2959	// StartTime: The time this operation actually started in UTC timezone
2960	// in RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
2961	// **2012-11-15T16:19:00.094Z**.
2962	StartTime string `json:"startTime,omitempty"`
2963
2964	// Status: The status of an operation. Valid values are: * **PENDING** *
2965	// **RUNNING** * **DONE** * **SQL_OPERATION_STATUS_UNSPECIFIED**
2966	//
2967	// Possible values:
2968	//   "SQL_OPERATION_STATUS_UNSPECIFIED" - The state of the operation is
2969	// unknown.
2970	//   "PENDING" - The operation has been queued, but has not started yet.
2971	//   "RUNNING" - The operation is running.
2972	//   "DONE" - The operation completed.
2973	Status string `json:"status,omitempty"`
2974
2975	// TargetId: Name of the database instance related to this operation.
2976	TargetId string `json:"targetId,omitempty"`
2977
2978	TargetLink string `json:"targetLink,omitempty"`
2979
2980	// TargetProject: The project ID of the target instance related to this
2981	// operation.
2982	TargetProject string `json:"targetProject,omitempty"`
2983
2984	// User: The email address of the user who initiated this operation.
2985	User string `json:"user,omitempty"`
2986
2987	// ServerResponse contains the HTTP response code and headers from the
2988	// server.
2989	googleapi.ServerResponse `json:"-"`
2990
2991	// ForceSendFields is a list of field names (e.g. "BackupContext") to
2992	// unconditionally include in API requests. By default, fields with
2993	// empty or default values are omitted from API requests. However, any
2994	// non-pointer, non-interface field appearing in ForceSendFields will be
2995	// sent to the server regardless of whether the field is empty or not.
2996	// This may be used to include empty fields in Patch requests.
2997	ForceSendFields []string `json:"-"`
2998
2999	// NullFields is a list of field names (e.g. "BackupContext") to include
3000	// in API requests with the JSON null value. By default, fields with
3001	// empty values are omitted from API requests. However, any field with
3002	// an empty value appearing in NullFields will be sent to the server as
3003	// null. It is an error if a field in this list has a non-empty value.
3004	// This may be used to include null fields in Patch requests.
3005	NullFields []string `json:"-"`
3006}
3007
3008func (s *Operation) MarshalJSON() ([]byte, error) {
3009	type NoMethod Operation
3010	raw := NoMethod(*s)
3011	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3012}
3013
3014// OperationError: Database instance operation error.
3015type OperationError struct {
3016	// Code: Identifies the specific error that occurred.
3017	Code string `json:"code,omitempty"`
3018
3019	// Kind: This is always **sql#operationError**.
3020	Kind string `json:"kind,omitempty"`
3021
3022	// Message: Additional information about the error encountered.
3023	Message string `json:"message,omitempty"`
3024
3025	// ForceSendFields is a list of field names (e.g. "Code") to
3026	// unconditionally include in API requests. By default, fields with
3027	// empty or default values are omitted from API requests. However, any
3028	// non-pointer, non-interface field appearing in ForceSendFields will be
3029	// sent to the server regardless of whether the field is empty or not.
3030	// This may be used to include empty fields in Patch requests.
3031	ForceSendFields []string `json:"-"`
3032
3033	// NullFields is a list of field names (e.g. "Code") to include in API
3034	// requests with the JSON null value. By default, fields with empty
3035	// values are omitted from API requests. However, any field with an
3036	// empty value appearing in NullFields will be sent to the server as
3037	// null. It is an error if a field in this list has a non-empty value.
3038	// This may be used to include null fields in Patch requests.
3039	NullFields []string `json:"-"`
3040}
3041
3042func (s *OperationError) MarshalJSON() ([]byte, error) {
3043	type NoMethod OperationError
3044	raw := NoMethod(*s)
3045	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3046}
3047
3048// OperationErrors: Database instance operation errors list wrapper.
3049type OperationErrors struct {
3050	// Errors: The list of errors encountered while processing this
3051	// operation.
3052	Errors []*OperationError `json:"errors,omitempty"`
3053
3054	// Kind: This is always **sql#operationErrors**.
3055	Kind string `json:"kind,omitempty"`
3056
3057	// ForceSendFields is a list of field names (e.g. "Errors") to
3058	// unconditionally include in API requests. By default, fields with
3059	// empty or default values are omitted from API requests. However, any
3060	// non-pointer, non-interface field appearing in ForceSendFields will be
3061	// sent to the server regardless of whether the field is empty or not.
3062	// This may be used to include empty fields in Patch requests.
3063	ForceSendFields []string `json:"-"`
3064
3065	// NullFields is a list of field names (e.g. "Errors") to include in API
3066	// requests with the JSON null value. By default, fields with empty
3067	// values are omitted from API requests. However, any field with an
3068	// empty value appearing in NullFields will be sent to the server as
3069	// null. It is an error if a field in this list has a non-empty value.
3070	// This may be used to include null fields in Patch requests.
3071	NullFields []string `json:"-"`
3072}
3073
3074func (s *OperationErrors) MarshalJSON() ([]byte, error) {
3075	type NoMethod OperationErrors
3076	raw := NoMethod(*s)
3077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3078}
3079
3080// OperationsListResponse: Operations list response.
3081type OperationsListResponse struct {
3082	// Items: List of operation resources.
3083	Items []*Operation `json:"items,omitempty"`
3084
3085	// Kind: This is always **sql#operationsList**.
3086	Kind string `json:"kind,omitempty"`
3087
3088	// NextPageToken: The continuation token, used to page through large
3089	// result sets. Provide this value in a subsequent request to return the
3090	// next page of results.
3091	NextPageToken string `json:"nextPageToken,omitempty"`
3092
3093	// ServerResponse contains the HTTP response code and headers from the
3094	// server.
3095	googleapi.ServerResponse `json:"-"`
3096
3097	// ForceSendFields is a list of field names (e.g. "Items") to
3098	// unconditionally include in API requests. By default, fields with
3099	// empty or default values are omitted from API requests. However, any
3100	// non-pointer, non-interface field appearing in ForceSendFields will be
3101	// sent to the server regardless of whether the field is empty or not.
3102	// This may be used to include empty fields in Patch requests.
3103	ForceSendFields []string `json:"-"`
3104
3105	// NullFields is a list of field names (e.g. "Items") to include in API
3106	// requests with the JSON null value. By default, fields with empty
3107	// values are omitted from API requests. However, any field with an
3108	// empty value appearing in NullFields will be sent to the server as
3109	// null. It is an error if a field in this list has a non-empty value.
3110	// This may be used to include null fields in Patch requests.
3111	NullFields []string `json:"-"`
3112}
3113
3114func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
3115	type NoMethod OperationsListResponse
3116	raw := NoMethod(*s)
3117	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3118}
3119
3120// ReplicaConfiguration: Read-replica configuration for connecting to
3121// the primary instance.
3122type ReplicaConfiguration struct {
3123	// FailoverTarget: Specifies if the replica is the failover target. If
3124	// the field is set to **true** the replica will be designated as a
3125	// failover replica. In case the primary instance fails, the replica
3126	// instance will be promoted as the new primary instance. Only one
3127	// replica can be specified as failover target, and the replica has to
3128	// be in different zone with the primary instance.
3129	FailoverTarget bool `json:"failoverTarget,omitempty"`
3130
3131	// Kind: This is always **sql#replicaConfiguration**.
3132	Kind string `json:"kind,omitempty"`
3133
3134	// MysqlReplicaConfiguration: MySQL specific configuration when
3135	// replicating from a MySQL on-premises primary instance. Replication
3136	// configuration information such as the username, password,
3137	// certificates, and keys are not stored in the instance metadata. The
3138	// configuration information is used only to set up the replication
3139	// connection and is stored by MySQL in a file named **master.info** in
3140	// the data directory.
3141	MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
3142
3143	// ForceSendFields is a list of field names (e.g. "FailoverTarget") to
3144	// unconditionally include in API requests. By default, fields with
3145	// empty or default values are omitted from API requests. However, any
3146	// non-pointer, non-interface field appearing in ForceSendFields will be
3147	// sent to the server regardless of whether the field is empty or not.
3148	// This may be used to include empty fields in Patch requests.
3149	ForceSendFields []string `json:"-"`
3150
3151	// NullFields is a list of field names (e.g. "FailoverTarget") to
3152	// include in API requests with the JSON null value. By default, fields
3153	// with empty values are omitted from API requests. However, any field
3154	// with an empty value appearing in NullFields will be sent to the
3155	// server as null. It is an error if a field in this list has a
3156	// non-empty value. This may be used to include null fields in Patch
3157	// requests.
3158	NullFields []string `json:"-"`
3159}
3160
3161func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error) {
3162	type NoMethod ReplicaConfiguration
3163	raw := NoMethod(*s)
3164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3165}
3166
3167type Reschedule struct {
3168	// RescheduleType: Required. The type of the reschedule.
3169	//
3170	// Possible values:
3171	//   "RESCHEDULE_TYPE_UNSPECIFIED"
3172	//   "IMMEDIATE" - Reschedules maintenance to happen now (within 5
3173	// minutes).
3174	//   "NEXT_AVAILABLE_WINDOW" - Reschedules maintenance to occur within
3175	// one week from the originally scheduled day and time.
3176	//   "SPECIFIC_TIME" - Reschedules maintenance to a specific time and
3177	// day.
3178	RescheduleType string `json:"rescheduleType,omitempty"`
3179
3180	// ScheduleTime: Optional. Timestamp when the maintenance shall be
3181	// rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339
3182	// (https://tools.ietf.org/html/rfc3339) format, for example
3183	// **2012-11-15T16:19:00.094Z**.
3184	ScheduleTime string `json:"scheduleTime,omitempty"`
3185
3186	// ForceSendFields is a list of field names (e.g. "RescheduleType") to
3187	// unconditionally include in API requests. By default, fields with
3188	// empty or default values are omitted from API requests. However, any
3189	// non-pointer, non-interface field appearing in ForceSendFields will be
3190	// sent to the server regardless of whether the field is empty or not.
3191	// This may be used to include empty fields in Patch requests.
3192	ForceSendFields []string `json:"-"`
3193
3194	// NullFields is a list of field names (e.g. "RescheduleType") to
3195	// include in API requests with the JSON null value. By default, fields
3196	// with empty values are omitted from API requests. However, any field
3197	// with an empty value appearing in NullFields will be sent to the
3198	// server as null. It is an error if a field in this list has a
3199	// non-empty value. This may be used to include null fields in Patch
3200	// requests.
3201	NullFields []string `json:"-"`
3202}
3203
3204func (s *Reschedule) MarshalJSON() ([]byte, error) {
3205	type NoMethod Reschedule
3206	raw := NoMethod(*s)
3207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3208}
3209
3210// RestoreBackupContext: Database instance restore from backup context.
3211// Backup context contains source instance id and project id.
3212type RestoreBackupContext struct {
3213	// BackupRunId: The ID of the backup run to restore from.
3214	BackupRunId int64 `json:"backupRunId,omitempty,string"`
3215
3216	// InstanceId: The ID of the instance that the backup was taken from.
3217	InstanceId string `json:"instanceId,omitempty"`
3218
3219	// Kind: This is always **sql#restoreBackupContext**.
3220	Kind string `json:"kind,omitempty"`
3221
3222	// Project: The full project ID of the source instance.
3223	Project string `json:"project,omitempty"`
3224
3225	// ForceSendFields is a list of field names (e.g. "BackupRunId") to
3226	// unconditionally include in API requests. By default, fields with
3227	// empty or default values are omitted from API requests. However, any
3228	// non-pointer, non-interface field appearing in ForceSendFields will be
3229	// sent to the server regardless of whether the field is empty or not.
3230	// This may be used to include empty fields in Patch requests.
3231	ForceSendFields []string `json:"-"`
3232
3233	// NullFields is a list of field names (e.g. "BackupRunId") to include
3234	// in API requests with the JSON null value. By default, fields with
3235	// empty values are omitted from API requests. However, any field with
3236	// an empty value appearing in NullFields will be sent to the server as
3237	// null. It is an error if a field in this list has a non-empty value.
3238	// This may be used to include null fields in Patch requests.
3239	NullFields []string `json:"-"`
3240}
3241
3242func (s *RestoreBackupContext) MarshalJSON() ([]byte, error) {
3243	type NoMethod RestoreBackupContext
3244	raw := NoMethod(*s)
3245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3246}
3247
3248// RotateServerCaContext: Instance rotate server CA context.
3249type RotateServerCaContext struct {
3250	// Kind: This is always **sql#rotateServerCaContext**.
3251	Kind string `json:"kind,omitempty"`
3252
3253	// NextVersion: The fingerprint of the next version to be rotated to. If
3254	// left unspecified, will be rotated to the most recently added server
3255	// CA version.
3256	NextVersion string `json:"nextVersion,omitempty"`
3257
3258	// ForceSendFields is a list of field names (e.g. "Kind") to
3259	// unconditionally include in API requests. By default, fields with
3260	// empty or default values are omitted from API requests. However, any
3261	// non-pointer, non-interface field appearing in ForceSendFields will be
3262	// sent to the server regardless of whether the field is empty or not.
3263	// This may be used to include empty fields in Patch requests.
3264	ForceSendFields []string `json:"-"`
3265
3266	// NullFields is a list of field names (e.g. "Kind") to include in API
3267	// requests with the JSON null value. By default, fields with empty
3268	// values are omitted from API requests. However, any field with an
3269	// empty value appearing in NullFields will be sent to the server as
3270	// null. It is an error if a field in this list has a non-empty value.
3271	// This may be used to include null fields in Patch requests.
3272	NullFields []string `json:"-"`
3273}
3274
3275func (s *RotateServerCaContext) MarshalJSON() ([]byte, error) {
3276	type NoMethod RotateServerCaContext
3277	raw := NoMethod(*s)
3278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3279}
3280
3281// Settings: Database instance settings.
3282type Settings struct {
3283	// ActivationPolicy: The activation policy specifies when the instance
3284	// is activated; it is applicable only when the instance state is
3285	// RUNNABLE. Valid values: * **ALWAYS**: The instance is on, and remains
3286	// so even in the absence of connection requests. * **NEVER**: The
3287	// instance is off; it is not activated, even if a connection request
3288	// arrives.
3289	//
3290	// Possible values:
3291	//   "SQL_ACTIVATION_POLICY_UNSPECIFIED" - Unknown activation plan.
3292	//   "ALWAYS" - The instance is always up and running.
3293	//   "NEVER" - The instance never starts.
3294	//   "ON_DEMAND" - The instance starts upon receiving requests.
3295	ActivationPolicy string `json:"activationPolicy,omitempty"`
3296
3297	// ActiveDirectoryConfig: Active Directory configuration, relevant only
3298	// for Cloud SQL for SQL Server.
3299	ActiveDirectoryConfig *SqlActiveDirectoryConfig `json:"activeDirectoryConfig,omitempty"`
3300
3301	// AuthorizedGaeApplications: The App Engine app IDs that can access
3302	// this instance. (Deprecated) Applied to First Generation instances
3303	// only.
3304	AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"`
3305
3306	// AvailabilityType: Availability type. Potential values: * **ZONAL**:
3307	// The instance serves data from only one zone. Outages in that zone
3308	// affect data accessibility. * **REGIONAL**: The instance can serve
3309	// data from more than one zone in a region (it is highly available)./
3310	// For more information, see Overview of the High Availability
3311	// Configuration
3312	// (https://cloud.google.com/sql/docs/mysql/high-availability).
3313	//
3314	// Possible values:
3315	//   "SQL_AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown
3316	// Availability type.
3317	//   "ZONAL" - Zonal available instance.
3318	//   "REGIONAL" - Regional available instance.
3319	AvailabilityType string `json:"availabilityType,omitempty"`
3320
3321	// BackupConfiguration: The daily backup configuration for the instance.
3322	BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
3323
3324	// Collation: The name of server Instance collation.
3325	Collation string `json:"collation,omitempty"`
3326
3327	// CrashSafeReplicationEnabled: Configuration specific to read replica
3328	// instances. Indicates whether database flags for crash-safe
3329	// replication are enabled. This property was only applicable to First
3330	// Generation instances.
3331	CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"`
3332
3333	// DataDiskSizeGb: The size of data disk, in GB. The data disk size
3334	// minimum is 10GB.
3335	DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
3336
3337	// DataDiskType: The type of data disk: **PD_SSD** (default) or
3338	// **PD_HDD**. Not used for First Generation instances.
3339	//
3340	// Possible values:
3341	//   "SQL_DATA_DISK_TYPE_UNSPECIFIED" - This is an unknown data disk
3342	// type.
3343	//   "PD_SSD" - An SSD data disk.
3344	//   "PD_HDD" - An HDD data disk.
3345	//   "OBSOLETE_LOCAL_SSD" - This field is deprecated and will be removed
3346	// from a future version of the API.
3347	DataDiskType string `json:"dataDiskType,omitempty"`
3348
3349	// DatabaseFlags: The database flags passed to the instance at startup.
3350	DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"`
3351
3352	// DatabaseReplicationEnabled: Configuration specific to read replica
3353	// instances. Indicates whether replication is enabled or not.
3354	DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"`
3355
3356	// DenyMaintenancePeriods: Deny maintenance periods
3357	DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"`
3358
3359	// InsightsConfig: Insights configuration, for now relevant only for
3360	// Postgres.
3361	InsightsConfig *InsightsConfig `json:"insightsConfig,omitempty"`
3362
3363	// IpConfiguration: The settings for IP Management. This allows to
3364	// enable or disable the instance IP and manage which external networks
3365	// can connect to the instance. The IPv4 address cannot be disabled for
3366	// Second Generation instances.
3367	IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"`
3368
3369	// Kind: This is always **sql#settings**.
3370	Kind string `json:"kind,omitempty"`
3371
3372	// LocationPreference: The location preference settings. This allows the
3373	// instance to be located as near as possible to either an App Engine
3374	// app or Compute Engine zone for better performance. App Engine
3375	// co-location was only applicable to First Generation instances.
3376	LocationPreference *LocationPreference `json:"locationPreference,omitempty"`
3377
3378	// MaintenanceWindow: The maintenance window for this instance. This
3379	// specifies when the instance can be restarted for maintenance
3380	// purposes.
3381	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
3382
3383	// PricingPlan: The pricing plan for this instance. This can be either
3384	// **PER_USE** or **PACKAGE**. Only **PER_USE** is supported for Second
3385	// Generation instances.
3386	//
3387	// Possible values:
3388	//   "SQL_PRICING_PLAN_UNSPECIFIED" - This is an unknown pricing plan
3389	// for this instance.
3390	//   "PACKAGE" - The instance is billed at a monthly flat rate.
3391	//   "PER_USE" - The instance is billed per usage.
3392	PricingPlan string `json:"pricingPlan,omitempty"`
3393
3394	// ReplicationType: The type of replication this instance uses. This can
3395	// be either **ASYNCHRONOUS** or **SYNCHRONOUS**. (Deprecated) This
3396	// property was only applicable to First Generation instances.
3397	//
3398	// Possible values:
3399	//   "SQL_REPLICATION_TYPE_UNSPECIFIED" - This is an unknown replication
3400	// type for a Cloud SQL instance.
3401	//   "SYNCHRONOUS" - The synchronous replication mode for First
3402	// Generation instances. It is the default value.
3403	//   "ASYNCHRONOUS" - The asynchronous replication mode for First
3404	// Generation instances. It provides a slight performance gain, but if
3405	// an outage occurs while this option is set to asynchronous, you can
3406	// lose up to a few seconds of updates to your data.
3407	ReplicationType string `json:"replicationType,omitempty"`
3408
3409	// SettingsVersion: The version of instance settings. This is a required
3410	// field for update method to make sure concurrent updates are handled
3411	// properly. During update, use the most recent settingsVersion value
3412	// for this instance and do not try to update this value.
3413	SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
3414
3415	// SqlServerAuditConfig: SQL Server specific audit configuration.
3416	SqlServerAuditConfig *SqlServerAuditConfig `json:"sqlServerAuditConfig,omitempty"`
3417
3418	// StorageAutoResize: Configuration to increase storage size
3419	// automatically. The default value is true.
3420	StorageAutoResize *bool `json:"storageAutoResize,omitempty"`
3421
3422	// StorageAutoResizeLimit: The maximum size to which storage capacity
3423	// can be automatically increased. The default value is 0, which
3424	// specifies that there is no limit.
3425	StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`
3426
3427	// Tier: The tier (or machine type) for this instance, for example
3428	// **db-custom-1-3840**.
3429	Tier string `json:"tier,omitempty"`
3430
3431	// UserLabels: User-provided labels, represented as a dictionary where
3432	// each label is a single key value pair.
3433	UserLabels map[string]string `json:"userLabels,omitempty"`
3434
3435	// ForceSendFields is a list of field names (e.g. "ActivationPolicy") to
3436	// unconditionally include in API requests. By default, fields with
3437	// empty or default values are omitted from API requests. However, any
3438	// non-pointer, non-interface field appearing in ForceSendFields will be
3439	// sent to the server regardless of whether the field is empty or not.
3440	// This may be used to include empty fields in Patch requests.
3441	ForceSendFields []string `json:"-"`
3442
3443	// NullFields is a list of field names (e.g. "ActivationPolicy") to
3444	// include in API requests with the JSON null value. By default, fields
3445	// with empty values are omitted from API requests. However, any field
3446	// with an empty value appearing in NullFields will be sent to the
3447	// server as null. It is an error if a field in this list has a
3448	// non-empty value. This may be used to include null fields in Patch
3449	// requests.
3450	NullFields []string `json:"-"`
3451}
3452
3453func (s *Settings) MarshalJSON() ([]byte, error) {
3454	type NoMethod Settings
3455	raw := NoMethod(*s)
3456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3457}
3458
3459// SqlActiveDirectoryConfig: Active Directory configuration, relevant
3460// only for Cloud SQL for SQL Server.
3461type SqlActiveDirectoryConfig struct {
3462	// Domain: The name of the domain (e.g., mydomain.com).
3463	Domain string `json:"domain,omitempty"`
3464
3465	// Kind: This is always sql#activeDirectoryConfig.
3466	Kind string `json:"kind,omitempty"`
3467
3468	// ForceSendFields is a list of field names (e.g. "Domain") to
3469	// unconditionally include in API requests. By default, fields with
3470	// empty or default values are omitted from API requests. However, any
3471	// non-pointer, non-interface field appearing in ForceSendFields will be
3472	// sent to the server regardless of whether the field is empty or not.
3473	// This may be used to include empty fields in Patch requests.
3474	ForceSendFields []string `json:"-"`
3475
3476	// NullFields is a list of field names (e.g. "Domain") to include in API
3477	// requests with the JSON null value. By default, fields with empty
3478	// values are omitted from API requests. However, any field with an
3479	// empty value appearing in NullFields will be sent to the server as
3480	// null. It is an error if a field in this list has a non-empty value.
3481	// This may be used to include null fields in Patch requests.
3482	NullFields []string `json:"-"`
3483}
3484
3485func (s *SqlActiveDirectoryConfig) MarshalJSON() ([]byte, error) {
3486	type NoMethod SqlActiveDirectoryConfig
3487	raw := NoMethod(*s)
3488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3489}
3490
3491// SqlExternalSyncSettingError: External primary instance migration
3492// setting error/warning.
3493type SqlExternalSyncSettingError struct {
3494	// Detail: Additional information about the error encountered.
3495	Detail string `json:"detail,omitempty"`
3496
3497	// Kind: Can be **sql#externalSyncSettingError** or
3498	// **sql#externalSyncSettingWarning**.
3499	Kind string `json:"kind,omitempty"`
3500
3501	// Type: Identifies the specific error that occurred.
3502	//
3503	// Possible values:
3504	//   "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED"
3505	//   "CONNECTION_FAILURE"
3506	//   "BINLOG_NOT_ENABLED"
3507	//   "INCOMPATIBLE_DATABASE_VERSION"
3508	//   "REPLICA_ALREADY_SETUP"
3509	//   "INSUFFICIENT_PRIVILEGE"
3510	//   "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type.
3511	//   "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on
3512	// databases, applicable for postgres.
3513	//   "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on
3514	// databases, applicable for postgres.
3515	//   "INVALID_WAL_LEVEL" - The value of parameter wal_level is not set
3516	// to logical.
3517	//   "INVALID_SHARED_PRELOAD_LIBRARY" - The value of parameter
3518	// shared_preload_libraries does not include pglogical.
3519	//   "INSUFFICIENT_MAX_REPLICATION_SLOTS" - The value of parameter
3520	// max_replication_slots is not sufficient.
3521	//   "INSUFFICIENT_MAX_WAL_SENDERS" - The value of parameter
3522	// max_wal_senders is not sufficient.
3523	//   "INSUFFICIENT_MAX_WORKER_PROCESSES" - The value of parameter
3524	// max_worker_processes is not sufficient.
3525	//   "UNSUPPORTED_EXTENSIONS" - Extensions installed are either not
3526	// supported or having unsupported versions
3527	//   "INVALID_RDS_LOGICAL_REPLICATION" - The value of parameter
3528	// rds.logical_replication is not set to 1.
3529	//   "INVALID_LOGGING_SETUP" - The primary instance logging setup
3530	// doesn't allow EM sync.
3531	//   "INVALID_DB_PARAM" - The primary instance database parameter setup
3532	// doesn't allow EM sync.
3533	//   "UNSUPPORTED_GTID_MODE" - The gtid_mode is not supported,
3534	// applicable for MySQL.
3535	//   "SQLSERVER_AGENT_NOT_RUNNING" - SQL Server Agent is not running.
3536	//   "UNSUPPORTED_TABLE_DEFINITION" - The table definition is not
3537	// support due to missing primary key or replica identity, applicable
3538	// for postgres.
3539	//   "UNSUPPORTED_DEFINER" - The customer has a definer that will break
3540	// EM setup.
3541	//   "SQLSERVER_SERVERNAME_MISMATCH" - SQL Server @@SERVERNAME does not
3542	// match actual host name
3543	//   "PRIMARY_ALREADY_SETUP" - The primary instance has been setup and
3544	// will fail the setup.
3545	//   "UNSUPPORTED_BINLOG_FORMAT" - The primary instance has unsupported
3546	// binary log format.
3547	//   "BINLOG_RETENTION_SETTING" - The primary instance's binary log
3548	// retention setting.
3549	Type string `json:"type,omitempty"`
3550
3551	// ForceSendFields is a list of field names (e.g. "Detail") to
3552	// unconditionally include in API requests. By default, fields with
3553	// empty or default values are omitted from API requests. However, any
3554	// non-pointer, non-interface field appearing in ForceSendFields will be
3555	// sent to the server regardless of whether the field is empty or not.
3556	// This may be used to include empty fields in Patch requests.
3557	ForceSendFields []string `json:"-"`
3558
3559	// NullFields is a list of field names (e.g. "Detail") to include in API
3560	// requests with the JSON null value. By default, fields with empty
3561	// values are omitted from API requests. However, any field with an
3562	// empty value appearing in NullFields will be sent to the server as
3563	// null. It is an error if a field in this list has a non-empty value.
3564	// This may be used to include null fields in Patch requests.
3565	NullFields []string `json:"-"`
3566}
3567
3568func (s *SqlExternalSyncSettingError) MarshalJSON() ([]byte, error) {
3569	type NoMethod SqlExternalSyncSettingError
3570	raw := NoMethod(*s)
3571	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3572}
3573
3574// SqlInstancesRescheduleMaintenanceRequestBody: Reschedule options for
3575// maintenance windows.
3576type SqlInstancesRescheduleMaintenanceRequestBody struct {
3577	// Reschedule: Required. The type of the reschedule the user wants.
3578	Reschedule *Reschedule `json:"reschedule,omitempty"`
3579
3580	// ForceSendFields is a list of field names (e.g. "Reschedule") to
3581	// unconditionally include in API requests. By default, fields with
3582	// empty or default values are omitted from API requests. However, any
3583	// non-pointer, non-interface field appearing in ForceSendFields will be
3584	// sent to the server regardless of whether the field is empty or not.
3585	// This may be used to include empty fields in Patch requests.
3586	ForceSendFields []string `json:"-"`
3587
3588	// NullFields is a list of field names (e.g. "Reschedule") to include in
3589	// API requests with the JSON null value. By default, fields with empty
3590	// values are omitted from API requests. However, any field with an
3591	// empty value appearing in NullFields will be sent to the server as
3592	// null. It is an error if a field in this list has a non-empty value.
3593	// This may be used to include null fields in Patch requests.
3594	NullFields []string `json:"-"`
3595}
3596
3597func (s *SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON() ([]byte, error) {
3598	type NoMethod SqlInstancesRescheduleMaintenanceRequestBody
3599	raw := NoMethod(*s)
3600	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3601}
3602
3603// SqlInstancesStartExternalSyncRequest: Instance start external sync
3604// request.
3605type SqlInstancesStartExternalSyncRequest struct {
3606	// MysqlSyncConfig: MySQL-specific settings for start external sync.
3607	MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"`
3608
3609	// SkipVerification: Whether to skip the verification step (VESS).
3610	SkipVerification bool `json:"skipVerification,omitempty"`
3611
3612	// SyncMode: External sync mode.
3613	//
3614	// Possible values:
3615	//   "EXTERNAL_SYNC_MODE_UNSPECIFIED" - Unknown external sync mode, will
3616	// be defaulted to ONLINE mode
3617	//   "ONLINE" - Online external sync will set up replication after
3618	// initial data external sync
3619	//   "OFFLINE" - Offline external sync only dumps and loads a one-time
3620	// snapshot of the primary instance's data
3621	SyncMode string `json:"syncMode,omitempty"`
3622
3623	// ForceSendFields is a list of field names (e.g. "MysqlSyncConfig") to
3624	// unconditionally include in API requests. By default, fields with
3625	// empty or default values are omitted from API requests. However, any
3626	// non-pointer, non-interface field appearing in ForceSendFields will be
3627	// sent to the server regardless of whether the field is empty or not.
3628	// This may be used to include empty fields in Patch requests.
3629	ForceSendFields []string `json:"-"`
3630
3631	// NullFields is a list of field names (e.g. "MysqlSyncConfig") to
3632	// include in API requests with the JSON null value. By default, fields
3633	// with empty values are omitted from API requests. However, any field
3634	// with an empty value appearing in NullFields will be sent to the
3635	// server as null. It is an error if a field in this list has a
3636	// non-empty value. This may be used to include null fields in Patch
3637	// requests.
3638	NullFields []string `json:"-"`
3639}
3640
3641func (s *SqlInstancesStartExternalSyncRequest) MarshalJSON() ([]byte, error) {
3642	type NoMethod SqlInstancesStartExternalSyncRequest
3643	raw := NoMethod(*s)
3644	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3645}
3646
3647// SqlInstancesVerifyExternalSyncSettingsRequest: Instance verify
3648// external sync settings request.
3649type SqlInstancesVerifyExternalSyncSettingsRequest struct {
3650	// MysqlSyncConfig: Optional. MySQL-specific settings for start external
3651	// sync.
3652	MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"`
3653
3654	// SyncMode: External sync mode
3655	//
3656	// Possible values:
3657	//   "EXTERNAL_SYNC_MODE_UNSPECIFIED" - Unknown external sync mode, will
3658	// be defaulted to ONLINE mode
3659	//   "ONLINE" - Online external sync will set up replication after
3660	// initial data external sync
3661	//   "OFFLINE" - Offline external sync only dumps and loads a one-time
3662	// snapshot of the primary instance's data
3663	SyncMode string `json:"syncMode,omitempty"`
3664
3665	// VerifyConnectionOnly: Flag to enable verifying connection only
3666	VerifyConnectionOnly bool `json:"verifyConnectionOnly,omitempty"`
3667
3668	// VerifyReplicationOnly: Optional. Flag to verify settings required by
3669	// replication setup only
3670	VerifyReplicationOnly bool `json:"verifyReplicationOnly,omitempty"`
3671
3672	// ForceSendFields is a list of field names (e.g. "MysqlSyncConfig") to
3673	// unconditionally include in API requests. By default, fields with
3674	// empty or default values are omitted from API requests. However, any
3675	// non-pointer, non-interface field appearing in ForceSendFields will be
3676	// sent to the server regardless of whether the field is empty or not.
3677	// This may be used to include empty fields in Patch requests.
3678	ForceSendFields []string `json:"-"`
3679
3680	// NullFields is a list of field names (e.g. "MysqlSyncConfig") to
3681	// include in API requests with the JSON null value. By default, fields
3682	// with empty values are omitted from API requests. However, any field
3683	// with an empty value appearing in NullFields will be sent to the
3684	// server as null. It is an error if a field in this list has a
3685	// non-empty value. This may be used to include null fields in Patch
3686	// requests.
3687	NullFields []string `json:"-"`
3688}
3689
3690func (s *SqlInstancesVerifyExternalSyncSettingsRequest) MarshalJSON() ([]byte, error) {
3691	type NoMethod SqlInstancesVerifyExternalSyncSettingsRequest
3692	raw := NoMethod(*s)
3693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3694}
3695
3696// SqlInstancesVerifyExternalSyncSettingsResponse: Instance verify
3697// external sync settings response.
3698type SqlInstancesVerifyExternalSyncSettingsResponse struct {
3699	// Errors: List of migration violations.
3700	Errors []*SqlExternalSyncSettingError `json:"errors,omitempty"`
3701
3702	// Kind: This is always **sql#migrationSettingErrorList**.
3703	Kind string `json:"kind,omitempty"`
3704
3705	// Warnings: List of migration warnings.
3706	Warnings []*SqlExternalSyncSettingError `json:"warnings,omitempty"`
3707
3708	// ServerResponse contains the HTTP response code and headers from the
3709	// server.
3710	googleapi.ServerResponse `json:"-"`
3711
3712	// ForceSendFields is a list of field names (e.g. "Errors") to
3713	// unconditionally include in API requests. By default, fields with
3714	// empty or default values are omitted from API requests. However, any
3715	// non-pointer, non-interface field appearing in ForceSendFields will be
3716	// sent to the server regardless of whether the field is empty or not.
3717	// This may be used to include empty fields in Patch requests.
3718	ForceSendFields []string `json:"-"`
3719
3720	// NullFields is a list of field names (e.g. "Errors") to include in API
3721	// requests with the JSON null value. By default, fields with empty
3722	// values are omitted from API requests. However, any field with an
3723	// empty value appearing in NullFields will be sent to the server as
3724	// null. It is an error if a field in this list has a non-empty value.
3725	// This may be used to include null fields in Patch requests.
3726	NullFields []string `json:"-"`
3727}
3728
3729func (s *SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON() ([]byte, error) {
3730	type NoMethod SqlInstancesVerifyExternalSyncSettingsResponse
3731	raw := NoMethod(*s)
3732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3733}
3734
3735// SqlOutOfDiskReport: This message wraps up the information written by
3736// out-of-disk detection job.
3737type SqlOutOfDiskReport struct {
3738	// SqlMinRecommendedIncreaseSizeGb: The minimum recommended increase
3739	// size in GigaBytes This field is consumed by the frontend * Writers: *
3740	// the proactive database wellness job for OOD. * Readers:
3741	SqlMinRecommendedIncreaseSizeGb int64 `json:"sqlMinRecommendedIncreaseSizeGb,omitempty"`
3742
3743	// SqlOutOfDiskState: This field represents the state generated by the
3744	// proactive database wellness job for OutOfDisk issues. * Writers: *
3745	// the proactive database wellness job for OOD. * Readers: * the
3746	// proactive database wellness job
3747	//
3748	// Possible values:
3749	//   "SQL_OUT_OF_DISK_STATE_UNSPECIFIED" - Unspecified state
3750	//   "NORMAL" - The instance has plenty space on data disk
3751	//   "SOFT_SHUTDOWN" - Data disk is almost used up. It is shutdown to
3752	// prevent data corruption.
3753	SqlOutOfDiskState string `json:"sqlOutOfDiskState,omitempty"`
3754
3755	// ForceSendFields is a list of field names (e.g.
3756	// "SqlMinRecommendedIncreaseSizeGb") to unconditionally include in API
3757	// requests. By default, fields with empty or default values are omitted
3758	// from API requests. However, any non-pointer, non-interface field
3759	// appearing in ForceSendFields will be sent to the server regardless of
3760	// whether the field is empty or not. This may be used to include empty
3761	// fields in Patch requests.
3762	ForceSendFields []string `json:"-"`
3763
3764	// NullFields is a list of field names (e.g.
3765	// "SqlMinRecommendedIncreaseSizeGb") to include in API requests with
3766	// the JSON null value. By default, fields with empty values are omitted
3767	// from API requests. However, any field with an empty value appearing
3768	// in NullFields will be sent to the server as null. It is an error if a
3769	// field in this list has a non-empty value. This may be used to include
3770	// null fields in Patch requests.
3771	NullFields []string `json:"-"`
3772}
3773
3774func (s *SqlOutOfDiskReport) MarshalJSON() ([]byte, error) {
3775	type NoMethod SqlOutOfDiskReport
3776	raw := NoMethod(*s)
3777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3778}
3779
3780// SqlScheduledMaintenance: Any scheduled maintenancce for this
3781// instance.
3782type SqlScheduledMaintenance struct {
3783	CanDefer bool `json:"canDefer,omitempty"`
3784
3785	// CanReschedule: If the scheduled maintenance can be rescheduled.
3786	CanReschedule bool `json:"canReschedule,omitempty"`
3787
3788	// ScheduleDeadlineTime: Maintenance cannot be rescheduled to start
3789	// beyond this deadline.
3790	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
3791
3792	// StartTime: The start time of any upcoming scheduled maintenance for
3793	// this instance.
3794	StartTime string `json:"startTime,omitempty"`
3795
3796	// ForceSendFields is a list of field names (e.g. "CanDefer") to
3797	// unconditionally include in API requests. By default, fields with
3798	// empty or default values are omitted from API requests. However, any
3799	// non-pointer, non-interface field appearing in ForceSendFields will be
3800	// sent to the server regardless of whether the field is empty or not.
3801	// This may be used to include empty fields in Patch requests.
3802	ForceSendFields []string `json:"-"`
3803
3804	// NullFields is a list of field names (e.g. "CanDefer") to include in
3805	// API requests with the JSON null value. By default, fields with empty
3806	// values are omitted from API requests. However, any field with an
3807	// empty value appearing in NullFields will be sent to the server as
3808	// null. It is an error if a field in this list has a non-empty value.
3809	// This may be used to include null fields in Patch requests.
3810	NullFields []string `json:"-"`
3811}
3812
3813func (s *SqlScheduledMaintenance) MarshalJSON() ([]byte, error) {
3814	type NoMethod SqlScheduledMaintenance
3815	raw := NoMethod(*s)
3816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3817}
3818
3819// SqlServerAuditConfig: SQL Server specific audit configuration.
3820type SqlServerAuditConfig struct {
3821	// Bucket: The name of the destination bucket (e.g., gs://mybucket).
3822	Bucket string `json:"bucket,omitempty"`
3823
3824	// Kind: This is always sql#sqlServerAuditConfig
3825	Kind string `json:"kind,omitempty"`
3826
3827	// ForceSendFields is a list of field names (e.g. "Bucket") to
3828	// unconditionally include in API requests. By default, fields with
3829	// empty or default values are omitted from API requests. However, any
3830	// non-pointer, non-interface field appearing in ForceSendFields will be
3831	// sent to the server regardless of whether the field is empty or not.
3832	// This may be used to include empty fields in Patch requests.
3833	ForceSendFields []string `json:"-"`
3834
3835	// NullFields is a list of field names (e.g. "Bucket") to include in API
3836	// requests with the JSON null value. By default, fields with empty
3837	// values are omitted from API requests. However, any field with an
3838	// empty value appearing in NullFields will be sent to the server as
3839	// null. It is an error if a field in this list has a non-empty value.
3840	// This may be used to include null fields in Patch requests.
3841	NullFields []string `json:"-"`
3842}
3843
3844func (s *SqlServerAuditConfig) MarshalJSON() ([]byte, error) {
3845	type NoMethod SqlServerAuditConfig
3846	raw := NoMethod(*s)
3847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3848}
3849
3850// SqlServerDatabaseDetails: Represents a Sql Server database on the
3851// Cloud SQL instance.
3852type SqlServerDatabaseDetails struct {
3853	// CompatibilityLevel: The version of SQL Server with which the database
3854	// is to be made compatible
3855	CompatibilityLevel int64 `json:"compatibilityLevel,omitempty"`
3856
3857	// RecoveryModel: The recovery model of a SQL Server database
3858	RecoveryModel string `json:"recoveryModel,omitempty"`
3859
3860	// ForceSendFields is a list of field names (e.g. "CompatibilityLevel")
3861	// to unconditionally include in API requests. By default, fields with
3862	// empty or default values are omitted from API requests. However, any
3863	// non-pointer, non-interface field appearing in ForceSendFields will be
3864	// sent to the server regardless of whether the field is empty or not.
3865	// This may be used to include empty fields in Patch requests.
3866	ForceSendFields []string `json:"-"`
3867
3868	// NullFields is a list of field names (e.g. "CompatibilityLevel") to
3869	// include in API requests with the JSON null value. By default, fields
3870	// with empty values are omitted from API requests. However, any field
3871	// with an empty value appearing in NullFields will be sent to the
3872	// server as null. It is an error if a field in this list has a
3873	// non-empty value. This may be used to include null fields in Patch
3874	// requests.
3875	NullFields []string `json:"-"`
3876}
3877
3878func (s *SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) {
3879	type NoMethod SqlServerDatabaseDetails
3880	raw := NoMethod(*s)
3881	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3882}
3883
3884// SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL
3885// instance.
3886type SqlServerUserDetails struct {
3887	// Disabled: If the user has been disabled
3888	Disabled bool `json:"disabled,omitempty"`
3889
3890	// ServerRoles: The server roles for this user
3891	ServerRoles []string `json:"serverRoles,omitempty"`
3892
3893	// ForceSendFields is a list of field names (e.g. "Disabled") to
3894	// unconditionally include in API requests. By default, fields with
3895	// empty or default values are omitted from API requests. However, any
3896	// non-pointer, non-interface field appearing in ForceSendFields will be
3897	// sent to the server regardless of whether the field is empty or not.
3898	// This may be used to include empty fields in Patch requests.
3899	ForceSendFields []string `json:"-"`
3900
3901	// NullFields is a list of field names (e.g. "Disabled") to include in
3902	// API requests with the JSON null value. By default, fields with empty
3903	// values are omitted from API requests. However, any field with an
3904	// empty value appearing in NullFields will be sent to the server as
3905	// null. It is an error if a field in this list has a non-empty value.
3906	// This may be used to include null fields in Patch requests.
3907	NullFields []string `json:"-"`
3908}
3909
3910func (s *SqlServerUserDetails) MarshalJSON() ([]byte, error) {
3911	type NoMethod SqlServerUserDetails
3912	raw := NoMethod(*s)
3913	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3914}
3915
3916// SslCert: SslCerts Resource
3917type SslCert struct {
3918	// Cert: PEM representation.
3919	Cert string `json:"cert,omitempty"`
3920
3921	// CertSerialNumber: Serial number, as extracted from the certificate.
3922	CertSerialNumber string `json:"certSerialNumber,omitempty"`
3923
3924	// CommonName: User supplied name. Constrained to [a-zA-Z.-_ ]+.
3925	CommonName string `json:"commonName,omitempty"`
3926
3927	// CreateTime: The time when the certificate was created in RFC 3339
3928	// (https://tools.ietf.org/html/rfc3339) format, for example
3929	// **2012-11-15T16:19:00.094Z**
3930	CreateTime string `json:"createTime,omitempty"`
3931
3932	// ExpirationTime: The time when the certificate expires in RFC 3339
3933	// (https://tools.ietf.org/html/rfc3339) format, for example
3934	// **2012-11-15T16:19:00.094Z**.
3935	ExpirationTime string `json:"expirationTime,omitempty"`
3936
3937	// Instance: Name of the database instance.
3938	Instance string `json:"instance,omitempty"`
3939
3940	// Kind: This is always **sql#sslCert**.
3941	Kind string `json:"kind,omitempty"`
3942
3943	// SelfLink: The URI of this resource.
3944	SelfLink string `json:"selfLink,omitempty"`
3945
3946	// Sha1Fingerprint: Sha1 Fingerprint.
3947	Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
3948
3949	// ServerResponse contains the HTTP response code and headers from the
3950	// server.
3951	googleapi.ServerResponse `json:"-"`
3952
3953	// ForceSendFields is a list of field names (e.g. "Cert") to
3954	// unconditionally include in API requests. By default, fields with
3955	// empty or default values are omitted from API requests. However, any
3956	// non-pointer, non-interface field appearing in ForceSendFields will be
3957	// sent to the server regardless of whether the field is empty or not.
3958	// This may be used to include empty fields in Patch requests.
3959	ForceSendFields []string `json:"-"`
3960
3961	// NullFields is a list of field names (e.g. "Cert") to include in API
3962	// requests with the JSON null value. By default, fields with empty
3963	// values are omitted from API requests. However, any field with an
3964	// empty value appearing in NullFields will be sent to the server as
3965	// null. It is an error if a field in this list has a non-empty value.
3966	// This may be used to include null fields in Patch requests.
3967	NullFields []string `json:"-"`
3968}
3969
3970func (s *SslCert) MarshalJSON() ([]byte, error) {
3971	type NoMethod SslCert
3972	raw := NoMethod(*s)
3973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3974}
3975
3976// SslCertDetail: SslCertDetail.
3977type SslCertDetail struct {
3978	// CertInfo: The public information about the cert.
3979	CertInfo *SslCert `json:"certInfo,omitempty"`
3980
3981	// CertPrivateKey: The private key for the client cert, in pem format.
3982	// Keep private in order to protect your security.
3983	CertPrivateKey string `json:"certPrivateKey,omitempty"`
3984
3985	// ForceSendFields is a list of field names (e.g. "CertInfo") to
3986	// unconditionally include in API requests. By default, fields with
3987	// empty or default values are omitted from API requests. However, any
3988	// non-pointer, non-interface field appearing in ForceSendFields will be
3989	// sent to the server regardless of whether the field is empty or not.
3990	// This may be used to include empty fields in Patch requests.
3991	ForceSendFields []string `json:"-"`
3992
3993	// NullFields is a list of field names (e.g. "CertInfo") to include in
3994	// API requests with the JSON null value. By default, fields with empty
3995	// values are omitted from API requests. However, any field with an
3996	// empty value appearing in NullFields will be sent to the server as
3997	// null. It is an error if a field in this list has a non-empty value.
3998	// This may be used to include null fields in Patch requests.
3999	NullFields []string `json:"-"`
4000}
4001
4002func (s *SslCertDetail) MarshalJSON() ([]byte, error) {
4003	type NoMethod SslCertDetail
4004	raw := NoMethod(*s)
4005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4006}
4007
4008// SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate
4009// request.
4010type SslCertsCreateEphemeralRequest struct {
4011	// AccessToken: Access token to include in the signed certificate.
4012	AccessToken string `json:"access_token,omitempty"`
4013
4014	// PublicKey: PEM encoded public key to include in the signed
4015	// certificate.
4016	PublicKey string `json:"public_key,omitempty"`
4017
4018	// ForceSendFields is a list of field names (e.g. "AccessToken") to
4019	// unconditionally include in API requests. By default, fields with
4020	// empty or default values are omitted from API requests. However, any
4021	// non-pointer, non-interface field appearing in ForceSendFields will be
4022	// sent to the server regardless of whether the field is empty or not.
4023	// This may be used to include empty fields in Patch requests.
4024	ForceSendFields []string `json:"-"`
4025
4026	// NullFields is a list of field names (e.g. "AccessToken") to include
4027	// in API requests with the JSON null value. By default, fields with
4028	// empty values are omitted from API requests. However, any field with
4029	// an empty value appearing in NullFields will be sent to the server as
4030	// null. It is an error if a field in this list has a non-empty value.
4031	// This may be used to include null fields in Patch requests.
4032	NullFields []string `json:"-"`
4033}
4034
4035func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) {
4036	type NoMethod SslCertsCreateEphemeralRequest
4037	raw := NoMethod(*s)
4038	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4039}
4040
4041// SslCertsInsertRequest: SslCerts insert request.
4042type SslCertsInsertRequest struct {
4043	// CommonName: User supplied name. Must be a distinct name from the
4044	// other certificates for this instance.
4045	CommonName string `json:"commonName,omitempty"`
4046
4047	// ForceSendFields is a list of field names (e.g. "CommonName") to
4048	// unconditionally include in API requests. By default, fields with
4049	// empty or default values are omitted from API requests. However, any
4050	// non-pointer, non-interface field appearing in ForceSendFields will be
4051	// sent to the server regardless of whether the field is empty or not.
4052	// This may be used to include empty fields in Patch requests.
4053	ForceSendFields []string `json:"-"`
4054
4055	// NullFields is a list of field names (e.g. "CommonName") to include in
4056	// API requests with the JSON null value. By default, fields with empty
4057	// values are omitted from API requests. However, any field with an
4058	// empty value appearing in NullFields will be sent to the server as
4059	// null. It is an error if a field in this list has a non-empty value.
4060	// This may be used to include null fields in Patch requests.
4061	NullFields []string `json:"-"`
4062}
4063
4064func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error) {
4065	type NoMethod SslCertsInsertRequest
4066	raw := NoMethod(*s)
4067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4068}
4069
4070// SslCertsInsertResponse: SslCert insert response.
4071type SslCertsInsertResponse struct {
4072	// ClientCert: The new client certificate and private key.
4073	ClientCert *SslCertDetail `json:"clientCert,omitempty"`
4074
4075	// Kind: This is always **sql#sslCertsInsert**.
4076	Kind string `json:"kind,omitempty"`
4077
4078	// Operation: The operation to track the ssl certs insert request.
4079	Operation *Operation `json:"operation,omitempty"`
4080
4081	// ServerCaCert: The server Certificate Authority's certificate. If this
4082	// is missing you can force a new one to be generated by calling
4083	// resetSslConfig method on instances resource.
4084	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
4085
4086	// ServerResponse contains the HTTP response code and headers from the
4087	// server.
4088	googleapi.ServerResponse `json:"-"`
4089
4090	// ForceSendFields is a list of field names (e.g. "ClientCert") to
4091	// unconditionally include in API requests. By default, fields with
4092	// empty or default values are omitted from API requests. However, any
4093	// non-pointer, non-interface field appearing in ForceSendFields will be
4094	// sent to the server regardless of whether the field is empty or not.
4095	// This may be used to include empty fields in Patch requests.
4096	ForceSendFields []string `json:"-"`
4097
4098	// NullFields is a list of field names (e.g. "ClientCert") to include in
4099	// API requests with the JSON null value. By default, fields with empty
4100	// values are omitted from API requests. However, any field with an
4101	// empty value appearing in NullFields will be sent to the server as
4102	// null. It is an error if a field in this list has a non-empty value.
4103	// This may be used to include null fields in Patch requests.
4104	NullFields []string `json:"-"`
4105}
4106
4107func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error) {
4108	type NoMethod SslCertsInsertResponse
4109	raw := NoMethod(*s)
4110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4111}
4112
4113// SslCertsListResponse: SslCerts list response.
4114type SslCertsListResponse struct {
4115	// Items: List of client certificates for the instance.
4116	Items []*SslCert `json:"items,omitempty"`
4117
4118	// Kind: This is always **sql#sslCertsList**.
4119	Kind string `json:"kind,omitempty"`
4120
4121	// ServerResponse contains the HTTP response code and headers from the
4122	// server.
4123	googleapi.ServerResponse `json:"-"`
4124
4125	// ForceSendFields is a list of field names (e.g. "Items") to
4126	// unconditionally include in API requests. By default, fields with
4127	// empty or default values are omitted from API requests. However, any
4128	// non-pointer, non-interface field appearing in ForceSendFields will be
4129	// sent to the server regardless of whether the field is empty or not.
4130	// This may be used to include empty fields in Patch requests.
4131	ForceSendFields []string `json:"-"`
4132
4133	// NullFields is a list of field names (e.g. "Items") to include in API
4134	// requests with the JSON null value. By default, fields with empty
4135	// values are omitted from API requests. However, any field with an
4136	// empty value appearing in NullFields will be sent to the server as
4137	// null. It is an error if a field in this list has a non-empty value.
4138	// This may be used to include null fields in Patch requests.
4139	NullFields []string `json:"-"`
4140}
4141
4142func (s *SslCertsListResponse) MarshalJSON() ([]byte, error) {
4143	type NoMethod SslCertsListResponse
4144	raw := NoMethod(*s)
4145	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4146}
4147
4148// SyncFlags: Initial sync flags for certain Cloud SQL APIs. Currently
4149// used for the MySQL external server initial dump.
4150type SyncFlags struct {
4151	// Name: The name of the flag.
4152	Name string `json:"name,omitempty"`
4153
4154	// Value: The value of the flag. This field must be omitted if the flag
4155	// doesn't take a value.
4156	Value string `json:"value,omitempty"`
4157
4158	// ForceSendFields is a list of field names (e.g. "Name") to
4159	// unconditionally include in API requests. By default, fields with
4160	// empty or default values are omitted from API requests. However, any
4161	// non-pointer, non-interface field appearing in ForceSendFields will be
4162	// sent to the server regardless of whether the field is empty or not.
4163	// This may be used to include empty fields in Patch requests.
4164	ForceSendFields []string `json:"-"`
4165
4166	// NullFields is a list of field names (e.g. "Name") to include in API
4167	// requests with the JSON null value. By default, fields with empty
4168	// values are omitted from API requests. However, any field with an
4169	// empty value appearing in NullFields will be sent to the server as
4170	// null. It is an error if a field in this list has a non-empty value.
4171	// This may be used to include null fields in Patch requests.
4172	NullFields []string `json:"-"`
4173}
4174
4175func (s *SyncFlags) MarshalJSON() ([]byte, error) {
4176	type NoMethod SyncFlags
4177	raw := NoMethod(*s)
4178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4179}
4180
4181// Tier: A Google Cloud SQL service tier resource.
4182type Tier struct {
4183	// DiskQuota: The maximum disk size of this tier in bytes.
4184	DiskQuota int64 `json:"DiskQuota,omitempty,string"`
4185
4186	// RAM: The maximum RAM usage of this tier in bytes.
4187	RAM int64 `json:"RAM,omitempty,string"`
4188
4189	// Kind: This is always **sql#tier**.
4190	Kind string `json:"kind,omitempty"`
4191
4192	// Region: The applicable regions for this tier.
4193	Region []string `json:"region,omitempty"`
4194
4195	// Tier: An identifier for the machine type, for example,
4196	// db-custom-1-3840. For related information, see Pricing
4197	// (/sql/pricing).
4198	Tier string `json:"tier,omitempty"`
4199
4200	// ForceSendFields is a list of field names (e.g. "DiskQuota") to
4201	// unconditionally include in API requests. By default, fields with
4202	// empty or default values are omitted from API requests. However, any
4203	// non-pointer, non-interface field appearing in ForceSendFields will be
4204	// sent to the server regardless of whether the field is empty or not.
4205	// This may be used to include empty fields in Patch requests.
4206	ForceSendFields []string `json:"-"`
4207
4208	// NullFields is a list of field names (e.g. "DiskQuota") to include in
4209	// API requests with the JSON null value. By default, fields with empty
4210	// values are omitted from API requests. However, any field with an
4211	// empty value appearing in NullFields will be sent to the server as
4212	// null. It is an error if a field in this list has a non-empty value.
4213	// This may be used to include null fields in Patch requests.
4214	NullFields []string `json:"-"`
4215}
4216
4217func (s *Tier) MarshalJSON() ([]byte, error) {
4218	type NoMethod Tier
4219	raw := NoMethod(*s)
4220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4221}
4222
4223// TiersListResponse: Tiers list response.
4224type TiersListResponse struct {
4225	// Items: List of tiers.
4226	Items []*Tier `json:"items,omitempty"`
4227
4228	// Kind: This is always **sql#tiersList**.
4229	Kind string `json:"kind,omitempty"`
4230
4231	// ServerResponse contains the HTTP response code and headers from the
4232	// server.
4233	googleapi.ServerResponse `json:"-"`
4234
4235	// ForceSendFields is a list of field names (e.g. "Items") to
4236	// unconditionally include in API requests. By default, fields with
4237	// empty or default values are omitted from API requests. However, any
4238	// non-pointer, non-interface field appearing in ForceSendFields will be
4239	// sent to the server regardless of whether the field is empty or not.
4240	// This may be used to include empty fields in Patch requests.
4241	ForceSendFields []string `json:"-"`
4242
4243	// NullFields is a list of field names (e.g. "Items") to include in API
4244	// requests with the JSON null value. By default, fields with empty
4245	// values are omitted from API requests. However, any field with an
4246	// empty value appearing in NullFields will be sent to the server as
4247	// null. It is an error if a field in this list has a non-empty value.
4248	// This may be used to include null fields in Patch requests.
4249	NullFields []string `json:"-"`
4250}
4251
4252func (s *TiersListResponse) MarshalJSON() ([]byte, error) {
4253	type NoMethod TiersListResponse
4254	raw := NoMethod(*s)
4255	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4256}
4257
4258// TruncateLogContext: Database Instance truncate log context.
4259type TruncateLogContext struct {
4260	// Kind: This is always **sql#truncateLogContext**.
4261	Kind string `json:"kind,omitempty"`
4262
4263	// LogType: The type of log to truncate. Valid values are
4264	// **MYSQL_GENERAL_TABLE** and **MYSQL_SLOW_TABLE**.
4265	LogType string `json:"logType,omitempty"`
4266
4267	// ForceSendFields is a list of field names (e.g. "Kind") to
4268	// unconditionally include in API requests. By default, fields with
4269	// empty or default values are omitted from API requests. However, any
4270	// non-pointer, non-interface field appearing in ForceSendFields will be
4271	// sent to the server regardless of whether the field is empty or not.
4272	// This may be used to include empty fields in Patch requests.
4273	ForceSendFields []string `json:"-"`
4274
4275	// NullFields is a list of field names (e.g. "Kind") to include in API
4276	// requests with the JSON null value. By default, fields with empty
4277	// values are omitted from API requests. However, any field with an
4278	// empty value appearing in NullFields will be sent to the server as
4279	// null. It is an error if a field in this list has a non-empty value.
4280	// This may be used to include null fields in Patch requests.
4281	NullFields []string `json:"-"`
4282}
4283
4284func (s *TruncateLogContext) MarshalJSON() ([]byte, error) {
4285	type NoMethod TruncateLogContext
4286	raw := NoMethod(*s)
4287	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4288}
4289
4290// User: A Cloud SQL user resource.
4291type User struct {
4292	// Etag: This field is deprecated and will be removed from a future
4293	// version of the API.
4294	Etag string `json:"etag,omitempty"`
4295
4296	// Host: The host name from which the user can connect. For **insert**
4297	// operations, host defaults to an empty string. For **update**
4298	// operations, host is specified as part of the request URL. The host
4299	// name cannot be updated after insertion.
4300	Host string `json:"host,omitempty"`
4301
4302	// Instance: The name of the Cloud SQL instance. This does not include
4303	// the project ID. Can be omitted for **update** since it is already
4304	// specified on the URL.
4305	Instance string `json:"instance,omitempty"`
4306
4307	// Kind: This is always **sql#user**.
4308	Kind string `json:"kind,omitempty"`
4309
4310	// Name: The name of the user in the Cloud SQL instance. Can be omitted
4311	// for **update** since it is already specified in the URL.
4312	Name string `json:"name,omitempty"`
4313
4314	// Password: The password for the user.
4315	Password string `json:"password,omitempty"`
4316
4317	// Project: The project ID of the project containing the Cloud SQL
4318	// database. The Google apps domain is prefixed if applicable. Can be
4319	// omitted for **update** since it is already specified on the URL.
4320	Project string `json:"project,omitempty"`
4321
4322	SqlserverUserDetails *SqlServerUserDetails `json:"sqlserverUserDetails,omitempty"`
4323
4324	// Type: The user type. It determines the method to authenticate the
4325	// user during login. The default is the database's built-in user type.
4326	//
4327	// Possible values:
4328	//   "BUILT_IN" - The database's built-in user type.
4329	//   "CLOUD_IAM_USER" - Cloud IAM user.
4330	//   "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account.
4331	Type string `json:"type,omitempty"`
4332
4333	// ForceSendFields is a list of field names (e.g. "Etag") to
4334	// unconditionally include in API requests. By default, fields with
4335	// empty or default values are omitted from API requests. However, any
4336	// non-pointer, non-interface field appearing in ForceSendFields will be
4337	// sent to the server regardless of whether the field is empty or not.
4338	// This may be used to include empty fields in Patch requests.
4339	ForceSendFields []string `json:"-"`
4340
4341	// NullFields is a list of field names (e.g. "Etag") to include in API
4342	// requests with the JSON null value. By default, fields with empty
4343	// values are omitted from API requests. However, any field with an
4344	// empty value appearing in NullFields will be sent to the server as
4345	// null. It is an error if a field in this list has a non-empty value.
4346	// This may be used to include null fields in Patch requests.
4347	NullFields []string `json:"-"`
4348}
4349
4350func (s *User) MarshalJSON() ([]byte, error) {
4351	type NoMethod User
4352	raw := NoMethod(*s)
4353	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4354}
4355
4356// UsersListResponse: User list response.
4357type UsersListResponse struct {
4358	// Items: List of user resources in the instance.
4359	Items []*User `json:"items,omitempty"`
4360
4361	// Kind: This is always **sql#usersList**.
4362	Kind string `json:"kind,omitempty"`
4363
4364	// NextPageToken: An identifier that uniquely identifies the operation.
4365	// You can use this identifier to retrieve the Operations resource that
4366	// has information about the operation.
4367	NextPageToken string `json:"nextPageToken,omitempty"`
4368
4369	// ServerResponse contains the HTTP response code and headers from the
4370	// server.
4371	googleapi.ServerResponse `json:"-"`
4372
4373	// ForceSendFields is a list of field names (e.g. "Items") to
4374	// unconditionally include in API requests. By default, fields with
4375	// empty or default values are omitted from API requests. However, any
4376	// non-pointer, non-interface field appearing in ForceSendFields will be
4377	// sent to the server regardless of whether the field is empty or not.
4378	// This may be used to include empty fields in Patch requests.
4379	ForceSendFields []string `json:"-"`
4380
4381	// NullFields is a list of field names (e.g. "Items") to include in API
4382	// requests with the JSON null value. By default, fields with empty
4383	// values are omitted from API requests. However, any field with an
4384	// empty value appearing in NullFields will be sent to the server as
4385	// null. It is an error if a field in this list has a non-empty value.
4386	// This may be used to include null fields in Patch requests.
4387	NullFields []string `json:"-"`
4388}
4389
4390func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
4391	type NoMethod UsersListResponse
4392	raw := NoMethod(*s)
4393	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4394}
4395
4396// method id "sql.backupRuns.delete":
4397
4398type BackupRunsDeleteCall struct {
4399	s          *Service
4400	project    string
4401	instance   string
4402	id         int64
4403	urlParams_ gensupport.URLParams
4404	ctx_       context.Context
4405	header_    http.Header
4406}
4407
4408// Delete: Deletes the backup taken by a backup run.
4409//
4410// - id: The ID of the backup run to delete. To find a backup run ID,
4411//   use the list
4412//   (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list)
4413//   method.
4414// - instance: Cloud SQL instance ID. This does not include the project
4415//   ID.
4416// - project: Project ID of the project that contains the instance.
4417func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall {
4418	c := &BackupRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4419	c.project = project
4420	c.instance = instance
4421	c.id = id
4422	return c
4423}
4424
4425// Fields allows partial responses to be retrieved. See
4426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4427// for more information.
4428func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall {
4429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4430	return c
4431}
4432
4433// Context sets the context to be used in this call's Do method. Any
4434// pending HTTP request will be aborted if the provided context is
4435// canceled.
4436func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall {
4437	c.ctx_ = ctx
4438	return c
4439}
4440
4441// Header returns an http.Header that can be modified by the caller to
4442// add HTTP headers to the request.
4443func (c *BackupRunsDeleteCall) Header() http.Header {
4444	if c.header_ == nil {
4445		c.header_ = make(http.Header)
4446	}
4447	return c.header_
4448}
4449
4450func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
4451	reqHeaders := make(http.Header)
4452	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4453	for k, v := range c.header_ {
4454		reqHeaders[k] = v
4455	}
4456	reqHeaders.Set("User-Agent", c.s.userAgent())
4457	var body io.Reader = nil
4458	c.urlParams_.Set("alt", alt)
4459	c.urlParams_.Set("prettyPrint", "false")
4460	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}")
4461	urls += "?" + c.urlParams_.Encode()
4462	req, err := http.NewRequest("DELETE", urls, body)
4463	if err != nil {
4464		return nil, err
4465	}
4466	req.Header = reqHeaders
4467	googleapi.Expand(req.URL, map[string]string{
4468		"project":  c.project,
4469		"instance": c.instance,
4470		"id":       strconv.FormatInt(c.id, 10),
4471	})
4472	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4473}
4474
4475// Do executes the "sql.backupRuns.delete" call.
4476// Exactly one of *Operation or error will be non-nil. Any non-2xx
4477// status code is an error. Response headers are in either
4478// *Operation.ServerResponse.Header or (if a response was returned at
4479// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4480// to check whether the returned error was because
4481// http.StatusNotModified was returned.
4482func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4483	gensupport.SetOptions(c.urlParams_, opts...)
4484	res, err := c.doRequest("json")
4485	if res != nil && res.StatusCode == http.StatusNotModified {
4486		if res.Body != nil {
4487			res.Body.Close()
4488		}
4489		return nil, &googleapi.Error{
4490			Code:   res.StatusCode,
4491			Header: res.Header,
4492		}
4493	}
4494	if err != nil {
4495		return nil, err
4496	}
4497	defer googleapi.CloseBody(res)
4498	if err := googleapi.CheckResponse(res); err != nil {
4499		return nil, err
4500	}
4501	ret := &Operation{
4502		ServerResponse: googleapi.ServerResponse{
4503			Header:         res.Header,
4504			HTTPStatusCode: res.StatusCode,
4505		},
4506	}
4507	target := &ret
4508	if err := gensupport.DecodeResponse(target, res); err != nil {
4509		return nil, err
4510	}
4511	return ret, nil
4512	// {
4513	//   "description": "Deletes the backup taken by a backup run.",
4514	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4515	//   "httpMethod": "DELETE",
4516	//   "id": "sql.backupRuns.delete",
4517	//   "parameterOrder": [
4518	//     "project",
4519	//     "instance",
4520	//     "id"
4521	//   ],
4522	//   "parameters": {
4523	//     "id": {
4524	//       "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.",
4525	//       "format": "int64",
4526	//       "location": "path",
4527	//       "required": true,
4528	//       "type": "string"
4529	//     },
4530	//     "instance": {
4531	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4532	//       "location": "path",
4533	//       "required": true,
4534	//       "type": "string"
4535	//     },
4536	//     "project": {
4537	//       "description": "Project ID of the project that contains the instance.",
4538	//       "location": "path",
4539	//       "required": true,
4540	//       "type": "string"
4541	//     }
4542	//   },
4543	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4544	//   "response": {
4545	//     "$ref": "Operation"
4546	//   },
4547	//   "scopes": [
4548	//     "https://www.googleapis.com/auth/cloud-platform",
4549	//     "https://www.googleapis.com/auth/sqlservice.admin"
4550	//   ]
4551	// }
4552
4553}
4554
4555// method id "sql.backupRuns.get":
4556
4557type BackupRunsGetCall struct {
4558	s            *Service
4559	project      string
4560	instance     string
4561	id           int64
4562	urlParams_   gensupport.URLParams
4563	ifNoneMatch_ string
4564	ctx_         context.Context
4565	header_      http.Header
4566}
4567
4568// Get: Retrieves a resource containing information about a backup run.
4569//
4570// - id: The ID of this backup run.
4571// - instance: Cloud SQL instance ID. This does not include the project
4572//   ID.
4573// - project: Project ID of the project that contains the instance.
4574func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall {
4575	c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4576	c.project = project
4577	c.instance = instance
4578	c.id = id
4579	return c
4580}
4581
4582// Fields allows partial responses to be retrieved. See
4583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4584// for more information.
4585func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall {
4586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4587	return c
4588}
4589
4590// IfNoneMatch sets the optional parameter which makes the operation
4591// fail if the object's ETag matches the given value. This is useful for
4592// getting updates only after the object has changed since the last
4593// request. Use googleapi.IsNotModified to check whether the response
4594// error from Do is the result of In-None-Match.
4595func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall {
4596	c.ifNoneMatch_ = entityTag
4597	return c
4598}
4599
4600// Context sets the context to be used in this call's Do method. Any
4601// pending HTTP request will be aborted if the provided context is
4602// canceled.
4603func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
4604	c.ctx_ = ctx
4605	return c
4606}
4607
4608// Header returns an http.Header that can be modified by the caller to
4609// add HTTP headers to the request.
4610func (c *BackupRunsGetCall) Header() http.Header {
4611	if c.header_ == nil {
4612		c.header_ = make(http.Header)
4613	}
4614	return c.header_
4615}
4616
4617func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
4618	reqHeaders := make(http.Header)
4619	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4620	for k, v := range c.header_ {
4621		reqHeaders[k] = v
4622	}
4623	reqHeaders.Set("User-Agent", c.s.userAgent())
4624	if c.ifNoneMatch_ != "" {
4625		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4626	}
4627	var body io.Reader = nil
4628	c.urlParams_.Set("alt", alt)
4629	c.urlParams_.Set("prettyPrint", "false")
4630	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}")
4631	urls += "?" + c.urlParams_.Encode()
4632	req, err := http.NewRequest("GET", urls, body)
4633	if err != nil {
4634		return nil, err
4635	}
4636	req.Header = reqHeaders
4637	googleapi.Expand(req.URL, map[string]string{
4638		"project":  c.project,
4639		"instance": c.instance,
4640		"id":       strconv.FormatInt(c.id, 10),
4641	})
4642	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4643}
4644
4645// Do executes the "sql.backupRuns.get" call.
4646// Exactly one of *BackupRun or error will be non-nil. Any non-2xx
4647// status code is an error. Response headers are in either
4648// *BackupRun.ServerResponse.Header or (if a response was returned at
4649// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4650// to check whether the returned error was because
4651// http.StatusNotModified was returned.
4652func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error) {
4653	gensupport.SetOptions(c.urlParams_, opts...)
4654	res, err := c.doRequest("json")
4655	if res != nil && res.StatusCode == http.StatusNotModified {
4656		if res.Body != nil {
4657			res.Body.Close()
4658		}
4659		return nil, &googleapi.Error{
4660			Code:   res.StatusCode,
4661			Header: res.Header,
4662		}
4663	}
4664	if err != nil {
4665		return nil, err
4666	}
4667	defer googleapi.CloseBody(res)
4668	if err := googleapi.CheckResponse(res); err != nil {
4669		return nil, err
4670	}
4671	ret := &BackupRun{
4672		ServerResponse: googleapi.ServerResponse{
4673			Header:         res.Header,
4674			HTTPStatusCode: res.StatusCode,
4675		},
4676	}
4677	target := &ret
4678	if err := gensupport.DecodeResponse(target, res); err != nil {
4679		return nil, err
4680	}
4681	return ret, nil
4682	// {
4683	//   "description": "Retrieves a resource containing information about a backup run.",
4684	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4685	//   "httpMethod": "GET",
4686	//   "id": "sql.backupRuns.get",
4687	//   "parameterOrder": [
4688	//     "project",
4689	//     "instance",
4690	//     "id"
4691	//   ],
4692	//   "parameters": {
4693	//     "id": {
4694	//       "description": "The ID of this backup run.",
4695	//       "format": "int64",
4696	//       "location": "path",
4697	//       "required": true,
4698	//       "type": "string"
4699	//     },
4700	//     "instance": {
4701	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4702	//       "location": "path",
4703	//       "required": true,
4704	//       "type": "string"
4705	//     },
4706	//     "project": {
4707	//       "description": "Project ID of the project that contains the instance.",
4708	//       "location": "path",
4709	//       "required": true,
4710	//       "type": "string"
4711	//     }
4712	//   },
4713	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4714	//   "response": {
4715	//     "$ref": "BackupRun"
4716	//   },
4717	//   "scopes": [
4718	//     "https://www.googleapis.com/auth/cloud-platform",
4719	//     "https://www.googleapis.com/auth/sqlservice.admin"
4720	//   ]
4721	// }
4722
4723}
4724
4725// method id "sql.backupRuns.insert":
4726
4727type BackupRunsInsertCall struct {
4728	s          *Service
4729	project    string
4730	instance   string
4731	backuprun  *BackupRun
4732	urlParams_ gensupport.URLParams
4733	ctx_       context.Context
4734	header_    http.Header
4735}
4736
4737// Insert: Creates a new backup run on demand.
4738//
4739// - instance: Cloud SQL instance ID. This does not include the project
4740//   ID.
4741// - project: Project ID of the project that contains the instance.
4742func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall {
4743	c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4744	c.project = project
4745	c.instance = instance
4746	c.backuprun = backuprun
4747	return c
4748}
4749
4750// Fields allows partial responses to be retrieved. See
4751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4752// for more information.
4753func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall {
4754	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4755	return c
4756}
4757
4758// Context sets the context to be used in this call's Do method. Any
4759// pending HTTP request will be aborted if the provided context is
4760// canceled.
4761func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall {
4762	c.ctx_ = ctx
4763	return c
4764}
4765
4766// Header returns an http.Header that can be modified by the caller to
4767// add HTTP headers to the request.
4768func (c *BackupRunsInsertCall) Header() http.Header {
4769	if c.header_ == nil {
4770		c.header_ = make(http.Header)
4771	}
4772	return c.header_
4773}
4774
4775func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) {
4776	reqHeaders := make(http.Header)
4777	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4778	for k, v := range c.header_ {
4779		reqHeaders[k] = v
4780	}
4781	reqHeaders.Set("User-Agent", c.s.userAgent())
4782	var body io.Reader = nil
4783	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuprun)
4784	if err != nil {
4785		return nil, err
4786	}
4787	reqHeaders.Set("Content-Type", "application/json")
4788	c.urlParams_.Set("alt", alt)
4789	c.urlParams_.Set("prettyPrint", "false")
4790	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns")
4791	urls += "?" + c.urlParams_.Encode()
4792	req, err := http.NewRequest("POST", urls, body)
4793	if err != nil {
4794		return nil, err
4795	}
4796	req.Header = reqHeaders
4797	googleapi.Expand(req.URL, map[string]string{
4798		"project":  c.project,
4799		"instance": c.instance,
4800	})
4801	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4802}
4803
4804// Do executes the "sql.backupRuns.insert" call.
4805// Exactly one of *Operation or error will be non-nil. Any non-2xx
4806// status code is an error. Response headers are in either
4807// *Operation.ServerResponse.Header or (if a response was returned at
4808// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4809// to check whether the returned error was because
4810// http.StatusNotModified was returned.
4811func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4812	gensupport.SetOptions(c.urlParams_, opts...)
4813	res, err := c.doRequest("json")
4814	if res != nil && res.StatusCode == http.StatusNotModified {
4815		if res.Body != nil {
4816			res.Body.Close()
4817		}
4818		return nil, &googleapi.Error{
4819			Code:   res.StatusCode,
4820			Header: res.Header,
4821		}
4822	}
4823	if err != nil {
4824		return nil, err
4825	}
4826	defer googleapi.CloseBody(res)
4827	if err := googleapi.CheckResponse(res); err != nil {
4828		return nil, err
4829	}
4830	ret := &Operation{
4831		ServerResponse: googleapi.ServerResponse{
4832			Header:         res.Header,
4833			HTTPStatusCode: res.StatusCode,
4834		},
4835	}
4836	target := &ret
4837	if err := gensupport.DecodeResponse(target, res); err != nil {
4838		return nil, err
4839	}
4840	return ret, nil
4841	// {
4842	//   "description": "Creates a new backup run on demand.",
4843	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns",
4844	//   "httpMethod": "POST",
4845	//   "id": "sql.backupRuns.insert",
4846	//   "parameterOrder": [
4847	//     "project",
4848	//     "instance"
4849	//   ],
4850	//   "parameters": {
4851	//     "instance": {
4852	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4853	//       "location": "path",
4854	//       "required": true,
4855	//       "type": "string"
4856	//     },
4857	//     "project": {
4858	//       "description": "Project ID of the project that contains the instance.",
4859	//       "location": "path",
4860	//       "required": true,
4861	//       "type": "string"
4862	//     }
4863	//   },
4864	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns",
4865	//   "request": {
4866	//     "$ref": "BackupRun"
4867	//   },
4868	//   "response": {
4869	//     "$ref": "Operation"
4870	//   },
4871	//   "scopes": [
4872	//     "https://www.googleapis.com/auth/cloud-platform",
4873	//     "https://www.googleapis.com/auth/sqlservice.admin"
4874	//   ]
4875	// }
4876
4877}
4878
4879// method id "sql.backupRuns.list":
4880
4881type BackupRunsListCall struct {
4882	s            *Service
4883	project      string
4884	instance     string
4885	urlParams_   gensupport.URLParams
4886	ifNoneMatch_ string
4887	ctx_         context.Context
4888	header_      http.Header
4889}
4890
4891// List: Lists all backup runs associated with the project or a given
4892// instance and configuration in the reverse chronological order of the
4893// backup initiation time.
4894//
4895// - instance: Cloud SQL instance ID, or "-" for all instances. This
4896//   does not include the project ID.
4897// - project: Project ID of the project that contains the instance.
4898func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall {
4899	c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4900	c.project = project
4901	c.instance = instance
4902	return c
4903}
4904
4905// MaxResults sets the optional parameter "maxResults": Maximum number
4906// of backup runs per response.
4907func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall {
4908	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4909	return c
4910}
4911
4912// PageToken sets the optional parameter "pageToken": A
4913// previously-returned page token representing part of the larger set of
4914// results to view.
4915func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall {
4916	c.urlParams_.Set("pageToken", pageToken)
4917	return c
4918}
4919
4920// Fields allows partial responses to be retrieved. See
4921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4922// for more information.
4923func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall {
4924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4925	return c
4926}
4927
4928// IfNoneMatch sets the optional parameter which makes the operation
4929// fail if the object's ETag matches the given value. This is useful for
4930// getting updates only after the object has changed since the last
4931// request. Use googleapi.IsNotModified to check whether the response
4932// error from Do is the result of In-None-Match.
4933func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall {
4934	c.ifNoneMatch_ = entityTag
4935	return c
4936}
4937
4938// Context sets the context to be used in this call's Do method. Any
4939// pending HTTP request will be aborted if the provided context is
4940// canceled.
4941func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
4942	c.ctx_ = ctx
4943	return c
4944}
4945
4946// Header returns an http.Header that can be modified by the caller to
4947// add HTTP headers to the request.
4948func (c *BackupRunsListCall) Header() http.Header {
4949	if c.header_ == nil {
4950		c.header_ = make(http.Header)
4951	}
4952	return c.header_
4953}
4954
4955func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
4956	reqHeaders := make(http.Header)
4957	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4958	for k, v := range c.header_ {
4959		reqHeaders[k] = v
4960	}
4961	reqHeaders.Set("User-Agent", c.s.userAgent())
4962	if c.ifNoneMatch_ != "" {
4963		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4964	}
4965	var body io.Reader = nil
4966	c.urlParams_.Set("alt", alt)
4967	c.urlParams_.Set("prettyPrint", "false")
4968	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns")
4969	urls += "?" + c.urlParams_.Encode()
4970	req, err := http.NewRequest("GET", urls, body)
4971	if err != nil {
4972		return nil, err
4973	}
4974	req.Header = reqHeaders
4975	googleapi.Expand(req.URL, map[string]string{
4976		"project":  c.project,
4977		"instance": c.instance,
4978	})
4979	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4980}
4981
4982// Do executes the "sql.backupRuns.list" call.
4983// Exactly one of *BackupRunsListResponse or error will be non-nil. Any
4984// non-2xx status code is an error. Response headers are in either
4985// *BackupRunsListResponse.ServerResponse.Header or (if a response was
4986// returned at all) in error.(*googleapi.Error).Header. Use
4987// googleapi.IsNotModified to check whether the returned error was
4988// because http.StatusNotModified was returned.
4989func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error) {
4990	gensupport.SetOptions(c.urlParams_, opts...)
4991	res, err := c.doRequest("json")
4992	if res != nil && res.StatusCode == http.StatusNotModified {
4993		if res.Body != nil {
4994			res.Body.Close()
4995		}
4996		return nil, &googleapi.Error{
4997			Code:   res.StatusCode,
4998			Header: res.Header,
4999		}
5000	}
5001	if err != nil {
5002		return nil, err
5003	}
5004	defer googleapi.CloseBody(res)
5005	if err := googleapi.CheckResponse(res); err != nil {
5006		return nil, err
5007	}
5008	ret := &BackupRunsListResponse{
5009		ServerResponse: googleapi.ServerResponse{
5010			Header:         res.Header,
5011			HTTPStatusCode: res.StatusCode,
5012		},
5013	}
5014	target := &ret
5015	if err := gensupport.DecodeResponse(target, res); err != nil {
5016		return nil, err
5017	}
5018	return ret, nil
5019	// {
5020	//   "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.",
5021	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns",
5022	//   "httpMethod": "GET",
5023	//   "id": "sql.backupRuns.list",
5024	//   "parameterOrder": [
5025	//     "project",
5026	//     "instance"
5027	//   ],
5028	//   "parameters": {
5029	//     "instance": {
5030	//       "description": "Cloud SQL instance ID, or \"-\" for all instances. This does not include the project ID.",
5031	//       "location": "path",
5032	//       "required": true,
5033	//       "type": "string"
5034	//     },
5035	//     "maxResults": {
5036	//       "description": "Maximum number of backup runs per response.",
5037	//       "format": "int32",
5038	//       "location": "query",
5039	//       "type": "integer"
5040	//     },
5041	//     "pageToken": {
5042	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
5043	//       "location": "query",
5044	//       "type": "string"
5045	//     },
5046	//     "project": {
5047	//       "description": "Project ID of the project that contains the instance.",
5048	//       "location": "path",
5049	//       "required": true,
5050	//       "type": "string"
5051	//     }
5052	//   },
5053	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns",
5054	//   "response": {
5055	//     "$ref": "BackupRunsListResponse"
5056	//   },
5057	//   "scopes": [
5058	//     "https://www.googleapis.com/auth/cloud-platform",
5059	//     "https://www.googleapis.com/auth/sqlservice.admin"
5060	//   ]
5061	// }
5062
5063}
5064
5065// Pages invokes f for each page of results.
5066// A non-nil error returned from f will halt the iteration.
5067// The provided context supersedes any context provided to the Context method.
5068func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error {
5069	c.ctx_ = ctx
5070	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5071	for {
5072		x, err := c.Do()
5073		if err != nil {
5074			return err
5075		}
5076		if err := f(x); err != nil {
5077			return err
5078		}
5079		if x.NextPageToken == "" {
5080			return nil
5081		}
5082		c.PageToken(x.NextPageToken)
5083	}
5084}
5085
5086// method id "sql.connect.generateEphemeral":
5087
5088type ConnectGenerateEphemeralCertCall struct {
5089	s                            *Service
5090	project                      string
5091	instance                     string
5092	generateephemeralcertrequest *GenerateEphemeralCertRequest
5093	urlParams_                   gensupport.URLParams
5094	ctx_                         context.Context
5095	header_                      http.Header
5096}
5097
5098// GenerateEphemeralCert: Generates a short-lived X509 certificate
5099// containing the provided public key and signed by a private key
5100// specific to the target instance. Users may use the certificate to
5101// authenticate as themselves when connecting to the database.
5102//
5103// - instance: Cloud SQL instance ID. This does not include the project
5104//   ID.
5105// - project: Project ID of the project that contains the instance.
5106func (r *ConnectService) GenerateEphemeralCert(project string, instance string, generateephemeralcertrequest *GenerateEphemeralCertRequest) *ConnectGenerateEphemeralCertCall {
5107	c := &ConnectGenerateEphemeralCertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5108	c.project = project
5109	c.instance = instance
5110	c.generateephemeralcertrequest = generateephemeralcertrequest
5111	return c
5112}
5113
5114// Fields allows partial responses to be retrieved. See
5115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5116// for more information.
5117func (c *ConnectGenerateEphemeralCertCall) Fields(s ...googleapi.Field) *ConnectGenerateEphemeralCertCall {
5118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5119	return c
5120}
5121
5122// Context sets the context to be used in this call's Do method. Any
5123// pending HTTP request will be aborted if the provided context is
5124// canceled.
5125func (c *ConnectGenerateEphemeralCertCall) Context(ctx context.Context) *ConnectGenerateEphemeralCertCall {
5126	c.ctx_ = ctx
5127	return c
5128}
5129
5130// Header returns an http.Header that can be modified by the caller to
5131// add HTTP headers to the request.
5132func (c *ConnectGenerateEphemeralCertCall) Header() http.Header {
5133	if c.header_ == nil {
5134		c.header_ = make(http.Header)
5135	}
5136	return c.header_
5137}
5138
5139func (c *ConnectGenerateEphemeralCertCall) doRequest(alt string) (*http.Response, error) {
5140	reqHeaders := make(http.Header)
5141	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5142	for k, v := range c.header_ {
5143		reqHeaders[k] = v
5144	}
5145	reqHeaders.Set("User-Agent", c.s.userAgent())
5146	var body io.Reader = nil
5147	body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateephemeralcertrequest)
5148	if err != nil {
5149		return nil, err
5150	}
5151	reqHeaders.Set("Content-Type", "application/json")
5152	c.urlParams_.Set("alt", alt)
5153	c.urlParams_.Set("prettyPrint", "false")
5154	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}:generateEphemeralCert")
5155	urls += "?" + c.urlParams_.Encode()
5156	req, err := http.NewRequest("POST", urls, body)
5157	if err != nil {
5158		return nil, err
5159	}
5160	req.Header = reqHeaders
5161	googleapi.Expand(req.URL, map[string]string{
5162		"project":  c.project,
5163		"instance": c.instance,
5164	})
5165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5166}
5167
5168// Do executes the "sql.connect.generateEphemeral" call.
5169// Exactly one of *GenerateEphemeralCertResponse or error will be
5170// non-nil. Any non-2xx status code is an error. Response headers are in
5171// either *GenerateEphemeralCertResponse.ServerResponse.Header or (if a
5172// response was returned at all) in error.(*googleapi.Error).Header. Use
5173// googleapi.IsNotModified to check whether the returned error was
5174// because http.StatusNotModified was returned.
5175func (c *ConnectGenerateEphemeralCertCall) Do(opts ...googleapi.CallOption) (*GenerateEphemeralCertResponse, error) {
5176	gensupport.SetOptions(c.urlParams_, opts...)
5177	res, err := c.doRequest("json")
5178	if res != nil && res.StatusCode == http.StatusNotModified {
5179		if res.Body != nil {
5180			res.Body.Close()
5181		}
5182		return nil, &googleapi.Error{
5183			Code:   res.StatusCode,
5184			Header: res.Header,
5185		}
5186	}
5187	if err != nil {
5188		return nil, err
5189	}
5190	defer googleapi.CloseBody(res)
5191	if err := googleapi.CheckResponse(res); err != nil {
5192		return nil, err
5193	}
5194	ret := &GenerateEphemeralCertResponse{
5195		ServerResponse: googleapi.ServerResponse{
5196			Header:         res.Header,
5197			HTTPStatusCode: res.StatusCode,
5198		},
5199	}
5200	target := &ret
5201	if err := gensupport.DecodeResponse(target, res); err != nil {
5202		return nil, err
5203	}
5204	return ret, nil
5205	// {
5206	//   "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.",
5207	//   "flatPath": "v1/projects/{project}/instances/{instance}:generateEphemeralCert",
5208	//   "httpMethod": "POST",
5209	//   "id": "sql.connect.generateEphemeral",
5210	//   "parameterOrder": [
5211	//     "project",
5212	//     "instance"
5213	//   ],
5214	//   "parameters": {
5215	//     "instance": {
5216	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
5217	//       "location": "path",
5218	//       "required": true,
5219	//       "type": "string"
5220	//     },
5221	//     "project": {
5222	//       "description": "Project ID of the project that contains the instance.",
5223	//       "location": "path",
5224	//       "required": true,
5225	//       "type": "string"
5226	//     }
5227	//   },
5228	//   "path": "v1/projects/{project}/instances/{instance}:generateEphemeralCert",
5229	//   "request": {
5230	//     "$ref": "GenerateEphemeralCertRequest"
5231	//   },
5232	//   "response": {
5233	//     "$ref": "GenerateEphemeralCertResponse"
5234	//   },
5235	//   "scopes": [
5236	//     "https://www.googleapis.com/auth/cloud-platform",
5237	//     "https://www.googleapis.com/auth/sqlservice.admin"
5238	//   ]
5239	// }
5240
5241}
5242
5243// method id "sql.connect.get":
5244
5245type ConnectGetCall struct {
5246	s            *Service
5247	project      string
5248	instance     string
5249	urlParams_   gensupport.URLParams
5250	ifNoneMatch_ string
5251	ctx_         context.Context
5252	header_      http.Header
5253}
5254
5255// Get: Retrieves connect settings about a Cloud SQL instance.
5256//
5257// - instance: Cloud SQL instance ID. This does not include the project
5258//   ID.
5259// - project: Project ID of the project that contains the instance.
5260func (r *ConnectService) Get(project string, instance string) *ConnectGetCall {
5261	c := &ConnectGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5262	c.project = project
5263	c.instance = instance
5264	return c
5265}
5266
5267// ReadTime sets the optional parameter "readTime": Optional snapshot
5268// read timestamp to trade freshness for performance.
5269func (c *ConnectGetCall) ReadTime(readTime string) *ConnectGetCall {
5270	c.urlParams_.Set("readTime", readTime)
5271	return c
5272}
5273
5274// Fields allows partial responses to be retrieved. See
5275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5276// for more information.
5277func (c *ConnectGetCall) Fields(s ...googleapi.Field) *ConnectGetCall {
5278	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5279	return c
5280}
5281
5282// IfNoneMatch sets the optional parameter which makes the operation
5283// fail if the object's ETag matches the given value. This is useful for
5284// getting updates only after the object has changed since the last
5285// request. Use googleapi.IsNotModified to check whether the response
5286// error from Do is the result of In-None-Match.
5287func (c *ConnectGetCall) IfNoneMatch(entityTag string) *ConnectGetCall {
5288	c.ifNoneMatch_ = entityTag
5289	return c
5290}
5291
5292// Context sets the context to be used in this call's Do method. Any
5293// pending HTTP request will be aborted if the provided context is
5294// canceled.
5295func (c *ConnectGetCall) Context(ctx context.Context) *ConnectGetCall {
5296	c.ctx_ = ctx
5297	return c
5298}
5299
5300// Header returns an http.Header that can be modified by the caller to
5301// add HTTP headers to the request.
5302func (c *ConnectGetCall) Header() http.Header {
5303	if c.header_ == nil {
5304		c.header_ = make(http.Header)
5305	}
5306	return c.header_
5307}
5308
5309func (c *ConnectGetCall) doRequest(alt string) (*http.Response, error) {
5310	reqHeaders := make(http.Header)
5311	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5312	for k, v := range c.header_ {
5313		reqHeaders[k] = v
5314	}
5315	reqHeaders.Set("User-Agent", c.s.userAgent())
5316	if c.ifNoneMatch_ != "" {
5317		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5318	}
5319	var body io.Reader = nil
5320	c.urlParams_.Set("alt", alt)
5321	c.urlParams_.Set("prettyPrint", "false")
5322	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/connectSettings")
5323	urls += "?" + c.urlParams_.Encode()
5324	req, err := http.NewRequest("GET", urls, body)
5325	if err != nil {
5326		return nil, err
5327	}
5328	req.Header = reqHeaders
5329	googleapi.Expand(req.URL, map[string]string{
5330		"project":  c.project,
5331		"instance": c.instance,
5332	})
5333	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5334}
5335
5336// Do executes the "sql.connect.get" call.
5337// Exactly one of *ConnectSettings or error will be non-nil. Any non-2xx
5338// status code is an error. Response headers are in either
5339// *ConnectSettings.ServerResponse.Header or (if a response was returned
5340// at all) in error.(*googleapi.Error).Header. Use
5341// googleapi.IsNotModified to check whether the returned error was
5342// because http.StatusNotModified was returned.
5343func (c *ConnectGetCall) Do(opts ...googleapi.CallOption) (*ConnectSettings, error) {
5344	gensupport.SetOptions(c.urlParams_, opts...)
5345	res, err := c.doRequest("json")
5346	if res != nil && res.StatusCode == http.StatusNotModified {
5347		if res.Body != nil {
5348			res.Body.Close()
5349		}
5350		return nil, &googleapi.Error{
5351			Code:   res.StatusCode,
5352			Header: res.Header,
5353		}
5354	}
5355	if err != nil {
5356		return nil, err
5357	}
5358	defer googleapi.CloseBody(res)
5359	if err := googleapi.CheckResponse(res); err != nil {
5360		return nil, err
5361	}
5362	ret := &ConnectSettings{
5363		ServerResponse: googleapi.ServerResponse{
5364			Header:         res.Header,
5365			HTTPStatusCode: res.StatusCode,
5366		},
5367	}
5368	target := &ret
5369	if err := gensupport.DecodeResponse(target, res); err != nil {
5370		return nil, err
5371	}
5372	return ret, nil
5373	// {
5374	//   "description": "Retrieves connect settings about a Cloud SQL instance.",
5375	//   "flatPath": "v1/projects/{project}/instances/{instance}/connectSettings",
5376	//   "httpMethod": "GET",
5377	//   "id": "sql.connect.get",
5378	//   "parameterOrder": [
5379	//     "project",
5380	//     "instance"
5381	//   ],
5382	//   "parameters": {
5383	//     "instance": {
5384	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
5385	//       "location": "path",
5386	//       "required": true,
5387	//       "type": "string"
5388	//     },
5389	//     "project": {
5390	//       "description": "Project ID of the project that contains the instance.",
5391	//       "location": "path",
5392	//       "required": true,
5393	//       "type": "string"
5394	//     },
5395	//     "readTime": {
5396	//       "description": "Optional. Optional snapshot read timestamp to trade freshness for performance.",
5397	//       "format": "google-datetime",
5398	//       "location": "query",
5399	//       "type": "string"
5400	//     }
5401	//   },
5402	//   "path": "v1/projects/{project}/instances/{instance}/connectSettings",
5403	//   "response": {
5404	//     "$ref": "ConnectSettings"
5405	//   },
5406	//   "scopes": [
5407	//     "https://www.googleapis.com/auth/cloud-platform",
5408	//     "https://www.googleapis.com/auth/sqlservice.admin"
5409	//   ]
5410	// }
5411
5412}
5413
5414// method id "sql.databases.delete":
5415
5416type DatabasesDeleteCall struct {
5417	s          *Service
5418	project    string
5419	instance   string
5420	database   string
5421	urlParams_ gensupport.URLParams
5422	ctx_       context.Context
5423	header_    http.Header
5424}
5425
5426// Delete: Deletes a database from a Cloud SQL instance.
5427//
5428// - database: Name of the database to be deleted in the instance.
5429// - instance: Database instance ID. This does not include the project
5430//   ID.
5431// - project: Project ID of the project that contains the instance.
5432func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall {
5433	c := &DatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5434	c.project = project
5435	c.instance = instance
5436	c.database = database
5437	return c
5438}
5439
5440// Fields allows partial responses to be retrieved. See
5441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5442// for more information.
5443func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall {
5444	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5445	return c
5446}
5447
5448// Context sets the context to be used in this call's Do method. Any
5449// pending HTTP request will be aborted if the provided context is
5450// canceled.
5451func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall {
5452	c.ctx_ = ctx
5453	return c
5454}
5455
5456// Header returns an http.Header that can be modified by the caller to
5457// add HTTP headers to the request.
5458func (c *DatabasesDeleteCall) Header() http.Header {
5459	if c.header_ == nil {
5460		c.header_ = make(http.Header)
5461	}
5462	return c.header_
5463}
5464
5465func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
5466	reqHeaders := make(http.Header)
5467	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5468	for k, v := range c.header_ {
5469		reqHeaders[k] = v
5470	}
5471	reqHeaders.Set("User-Agent", c.s.userAgent())
5472	var body io.Reader = nil
5473	c.urlParams_.Set("alt", alt)
5474	c.urlParams_.Set("prettyPrint", "false")
5475	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5476	urls += "?" + c.urlParams_.Encode()
5477	req, err := http.NewRequest("DELETE", urls, body)
5478	if err != nil {
5479		return nil, err
5480	}
5481	req.Header = reqHeaders
5482	googleapi.Expand(req.URL, map[string]string{
5483		"project":  c.project,
5484		"instance": c.instance,
5485		"database": c.database,
5486	})
5487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5488}
5489
5490// Do executes the "sql.databases.delete" call.
5491// Exactly one of *Operation or error will be non-nil. Any non-2xx
5492// status code is an error. Response headers are in either
5493// *Operation.ServerResponse.Header or (if a response was returned at
5494// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5495// to check whether the returned error was because
5496// http.StatusNotModified was returned.
5497func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5498	gensupport.SetOptions(c.urlParams_, opts...)
5499	res, err := c.doRequest("json")
5500	if res != nil && res.StatusCode == http.StatusNotModified {
5501		if res.Body != nil {
5502			res.Body.Close()
5503		}
5504		return nil, &googleapi.Error{
5505			Code:   res.StatusCode,
5506			Header: res.Header,
5507		}
5508	}
5509	if err != nil {
5510		return nil, err
5511	}
5512	defer googleapi.CloseBody(res)
5513	if err := googleapi.CheckResponse(res); err != nil {
5514		return nil, err
5515	}
5516	ret := &Operation{
5517		ServerResponse: googleapi.ServerResponse{
5518			Header:         res.Header,
5519			HTTPStatusCode: res.StatusCode,
5520		},
5521	}
5522	target := &ret
5523	if err := gensupport.DecodeResponse(target, res); err != nil {
5524		return nil, err
5525	}
5526	return ret, nil
5527	// {
5528	//   "description": "Deletes a database from a Cloud SQL instance.",
5529	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
5530	//   "httpMethod": "DELETE",
5531	//   "id": "sql.databases.delete",
5532	//   "parameterOrder": [
5533	//     "project",
5534	//     "instance",
5535	//     "database"
5536	//   ],
5537	//   "parameters": {
5538	//     "database": {
5539	//       "description": "Name of the database to be deleted in the instance.",
5540	//       "location": "path",
5541	//       "required": true,
5542	//       "type": "string"
5543	//     },
5544	//     "instance": {
5545	//       "description": "Database instance ID. This does not include the project ID.",
5546	//       "location": "path",
5547	//       "required": true,
5548	//       "type": "string"
5549	//     },
5550	//     "project": {
5551	//       "description": "Project ID of the project that contains the instance.",
5552	//       "location": "path",
5553	//       "required": true,
5554	//       "type": "string"
5555	//     }
5556	//   },
5557	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
5558	//   "response": {
5559	//     "$ref": "Operation"
5560	//   },
5561	//   "scopes": [
5562	//     "https://www.googleapis.com/auth/cloud-platform",
5563	//     "https://www.googleapis.com/auth/sqlservice.admin"
5564	//   ]
5565	// }
5566
5567}
5568
5569// method id "sql.databases.get":
5570
5571type DatabasesGetCall struct {
5572	s            *Service
5573	project      string
5574	instance     string
5575	database     string
5576	urlParams_   gensupport.URLParams
5577	ifNoneMatch_ string
5578	ctx_         context.Context
5579	header_      http.Header
5580}
5581
5582// Get: Retrieves a resource containing information about a database
5583// inside a Cloud SQL instance.
5584//
5585// - database: Name of the database in the instance.
5586// - instance: Database instance ID. This does not include the project
5587//   ID.
5588// - project: Project ID of the project that contains the instance.
5589func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall {
5590	c := &DatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5591	c.project = project
5592	c.instance = instance
5593	c.database = database
5594	return c
5595}
5596
5597// Fields allows partial responses to be retrieved. See
5598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5599// for more information.
5600func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall {
5601	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5602	return c
5603}
5604
5605// IfNoneMatch sets the optional parameter which makes the operation
5606// fail if the object's ETag matches the given value. This is useful for
5607// getting updates only after the object has changed since the last
5608// request. Use googleapi.IsNotModified to check whether the response
5609// error from Do is the result of In-None-Match.
5610func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall {
5611	c.ifNoneMatch_ = entityTag
5612	return c
5613}
5614
5615// Context sets the context to be used in this call's Do method. Any
5616// pending HTTP request will be aborted if the provided context is
5617// canceled.
5618func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall {
5619	c.ctx_ = ctx
5620	return c
5621}
5622
5623// Header returns an http.Header that can be modified by the caller to
5624// add HTTP headers to the request.
5625func (c *DatabasesGetCall) Header() http.Header {
5626	if c.header_ == nil {
5627		c.header_ = make(http.Header)
5628	}
5629	return c.header_
5630}
5631
5632func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) {
5633	reqHeaders := make(http.Header)
5634	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5635	for k, v := range c.header_ {
5636		reqHeaders[k] = v
5637	}
5638	reqHeaders.Set("User-Agent", c.s.userAgent())
5639	if c.ifNoneMatch_ != "" {
5640		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5641	}
5642	var body io.Reader = nil
5643	c.urlParams_.Set("alt", alt)
5644	c.urlParams_.Set("prettyPrint", "false")
5645	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5646	urls += "?" + c.urlParams_.Encode()
5647	req, err := http.NewRequest("GET", urls, body)
5648	if err != nil {
5649		return nil, err
5650	}
5651	req.Header = reqHeaders
5652	googleapi.Expand(req.URL, map[string]string{
5653		"project":  c.project,
5654		"instance": c.instance,
5655		"database": c.database,
5656	})
5657	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5658}
5659
5660// Do executes the "sql.databases.get" call.
5661// Exactly one of *Database or error will be non-nil. Any non-2xx status
5662// code is an error. Response headers are in either
5663// *Database.ServerResponse.Header or (if a response was returned at
5664// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5665// to check whether the returned error was because
5666// http.StatusNotModified was returned.
5667func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
5668	gensupport.SetOptions(c.urlParams_, opts...)
5669	res, err := c.doRequest("json")
5670	if res != nil && res.StatusCode == http.StatusNotModified {
5671		if res.Body != nil {
5672			res.Body.Close()
5673		}
5674		return nil, &googleapi.Error{
5675			Code:   res.StatusCode,
5676			Header: res.Header,
5677		}
5678	}
5679	if err != nil {
5680		return nil, err
5681	}
5682	defer googleapi.CloseBody(res)
5683	if err := googleapi.CheckResponse(res); err != nil {
5684		return nil, err
5685	}
5686	ret := &Database{
5687		ServerResponse: googleapi.ServerResponse{
5688			Header:         res.Header,
5689			HTTPStatusCode: res.StatusCode,
5690		},
5691	}
5692	target := &ret
5693	if err := gensupport.DecodeResponse(target, res); err != nil {
5694		return nil, err
5695	}
5696	return ret, nil
5697	// {
5698	//   "description": "Retrieves a resource containing information about a database inside a Cloud SQL instance.",
5699	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
5700	//   "httpMethod": "GET",
5701	//   "id": "sql.databases.get",
5702	//   "parameterOrder": [
5703	//     "project",
5704	//     "instance",
5705	//     "database"
5706	//   ],
5707	//   "parameters": {
5708	//     "database": {
5709	//       "description": "Name of the database in the instance.",
5710	//       "location": "path",
5711	//       "required": true,
5712	//       "type": "string"
5713	//     },
5714	//     "instance": {
5715	//       "description": "Database instance ID. This does not include the project ID.",
5716	//       "location": "path",
5717	//       "required": true,
5718	//       "type": "string"
5719	//     },
5720	//     "project": {
5721	//       "description": "Project ID of the project that contains the instance.",
5722	//       "location": "path",
5723	//       "required": true,
5724	//       "type": "string"
5725	//     }
5726	//   },
5727	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
5728	//   "response": {
5729	//     "$ref": "Database"
5730	//   },
5731	//   "scopes": [
5732	//     "https://www.googleapis.com/auth/cloud-platform",
5733	//     "https://www.googleapis.com/auth/sqlservice.admin"
5734	//   ]
5735	// }
5736
5737}
5738
5739// method id "sql.databases.insert":
5740
5741type DatabasesInsertCall struct {
5742	s          *Service
5743	project    string
5744	instance   string
5745	database   *Database
5746	urlParams_ gensupport.URLParams
5747	ctx_       context.Context
5748	header_    http.Header
5749}
5750
5751// Insert: Inserts a resource containing information about a database
5752// inside a Cloud SQL instance.
5753//
5754// - instance: Database instance ID. This does not include the project
5755//   ID.
5756// - project: Project ID of the project that contains the instance.
5757func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall {
5758	c := &DatabasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5759	c.project = project
5760	c.instance = instance
5761	c.database = database
5762	return c
5763}
5764
5765// Fields allows partial responses to be retrieved. See
5766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5767// for more information.
5768func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall {
5769	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5770	return c
5771}
5772
5773// Context sets the context to be used in this call's Do method. Any
5774// pending HTTP request will be aborted if the provided context is
5775// canceled.
5776func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall {
5777	c.ctx_ = ctx
5778	return c
5779}
5780
5781// Header returns an http.Header that can be modified by the caller to
5782// add HTTP headers to the request.
5783func (c *DatabasesInsertCall) Header() http.Header {
5784	if c.header_ == nil {
5785		c.header_ = make(http.Header)
5786	}
5787	return c.header_
5788}
5789
5790func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) {
5791	reqHeaders := make(http.Header)
5792	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5793	for k, v := range c.header_ {
5794		reqHeaders[k] = v
5795	}
5796	reqHeaders.Set("User-Agent", c.s.userAgent())
5797	var body io.Reader = nil
5798	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
5799	if err != nil {
5800		return nil, err
5801	}
5802	reqHeaders.Set("Content-Type", "application/json")
5803	c.urlParams_.Set("alt", alt)
5804	c.urlParams_.Set("prettyPrint", "false")
5805	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases")
5806	urls += "?" + c.urlParams_.Encode()
5807	req, err := http.NewRequest("POST", urls, body)
5808	if err != nil {
5809		return nil, err
5810	}
5811	req.Header = reqHeaders
5812	googleapi.Expand(req.URL, map[string]string{
5813		"project":  c.project,
5814		"instance": c.instance,
5815	})
5816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5817}
5818
5819// Do executes the "sql.databases.insert" call.
5820// Exactly one of *Operation or error will be non-nil. Any non-2xx
5821// status code is an error. Response headers are in either
5822// *Operation.ServerResponse.Header or (if a response was returned at
5823// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5824// to check whether the returned error was because
5825// http.StatusNotModified was returned.
5826func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5827	gensupport.SetOptions(c.urlParams_, opts...)
5828	res, err := c.doRequest("json")
5829	if res != nil && res.StatusCode == http.StatusNotModified {
5830		if res.Body != nil {
5831			res.Body.Close()
5832		}
5833		return nil, &googleapi.Error{
5834			Code:   res.StatusCode,
5835			Header: res.Header,
5836		}
5837	}
5838	if err != nil {
5839		return nil, err
5840	}
5841	defer googleapi.CloseBody(res)
5842	if err := googleapi.CheckResponse(res); err != nil {
5843		return nil, err
5844	}
5845	ret := &Operation{
5846		ServerResponse: googleapi.ServerResponse{
5847			Header:         res.Header,
5848			HTTPStatusCode: res.StatusCode,
5849		},
5850	}
5851	target := &ret
5852	if err := gensupport.DecodeResponse(target, res); err != nil {
5853		return nil, err
5854	}
5855	return ret, nil
5856	// {
5857	//   "description": "Inserts a resource containing information about a database inside a Cloud SQL instance.",
5858	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases",
5859	//   "httpMethod": "POST",
5860	//   "id": "sql.databases.insert",
5861	//   "parameterOrder": [
5862	//     "project",
5863	//     "instance"
5864	//   ],
5865	//   "parameters": {
5866	//     "instance": {
5867	//       "description": "Database instance ID. This does not include the project ID.",
5868	//       "location": "path",
5869	//       "required": true,
5870	//       "type": "string"
5871	//     },
5872	//     "project": {
5873	//       "description": "Project ID of the project that contains the instance.",
5874	//       "location": "path",
5875	//       "required": true,
5876	//       "type": "string"
5877	//     }
5878	//   },
5879	//   "path": "v1/projects/{project}/instances/{instance}/databases",
5880	//   "request": {
5881	//     "$ref": "Database"
5882	//   },
5883	//   "response": {
5884	//     "$ref": "Operation"
5885	//   },
5886	//   "scopes": [
5887	//     "https://www.googleapis.com/auth/cloud-platform",
5888	//     "https://www.googleapis.com/auth/sqlservice.admin"
5889	//   ]
5890	// }
5891
5892}
5893
5894// method id "sql.databases.list":
5895
5896type DatabasesListCall struct {
5897	s            *Service
5898	project      string
5899	instance     string
5900	urlParams_   gensupport.URLParams
5901	ifNoneMatch_ string
5902	ctx_         context.Context
5903	header_      http.Header
5904}
5905
5906// List: Lists databases in the specified Cloud SQL instance.
5907//
5908// - instance: Cloud SQL instance ID. This does not include the project
5909//   ID.
5910// - project: Project ID of the project that contains the instance.
5911func (r *DatabasesService) List(project string, instance string) *DatabasesListCall {
5912	c := &DatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5913	c.project = project
5914	c.instance = instance
5915	return c
5916}
5917
5918// Fields allows partial responses to be retrieved. See
5919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5920// for more information.
5921func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall {
5922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5923	return c
5924}
5925
5926// IfNoneMatch sets the optional parameter which makes the operation
5927// fail if the object's ETag matches the given value. This is useful for
5928// getting updates only after the object has changed since the last
5929// request. Use googleapi.IsNotModified to check whether the response
5930// error from Do is the result of In-None-Match.
5931func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall {
5932	c.ifNoneMatch_ = entityTag
5933	return c
5934}
5935
5936// Context sets the context to be used in this call's Do method. Any
5937// pending HTTP request will be aborted if the provided context is
5938// canceled.
5939func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall {
5940	c.ctx_ = ctx
5941	return c
5942}
5943
5944// Header returns an http.Header that can be modified by the caller to
5945// add HTTP headers to the request.
5946func (c *DatabasesListCall) Header() http.Header {
5947	if c.header_ == nil {
5948		c.header_ = make(http.Header)
5949	}
5950	return c.header_
5951}
5952
5953func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) {
5954	reqHeaders := make(http.Header)
5955	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5956	for k, v := range c.header_ {
5957		reqHeaders[k] = v
5958	}
5959	reqHeaders.Set("User-Agent", c.s.userAgent())
5960	if c.ifNoneMatch_ != "" {
5961		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5962	}
5963	var body io.Reader = nil
5964	c.urlParams_.Set("alt", alt)
5965	c.urlParams_.Set("prettyPrint", "false")
5966	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases")
5967	urls += "?" + c.urlParams_.Encode()
5968	req, err := http.NewRequest("GET", urls, body)
5969	if err != nil {
5970		return nil, err
5971	}
5972	req.Header = reqHeaders
5973	googleapi.Expand(req.URL, map[string]string{
5974		"project":  c.project,
5975		"instance": c.instance,
5976	})
5977	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5978}
5979
5980// Do executes the "sql.databases.list" call.
5981// Exactly one of *DatabasesListResponse or error will be non-nil. Any
5982// non-2xx status code is an error. Response headers are in either
5983// *DatabasesListResponse.ServerResponse.Header or (if a response was
5984// returned at all) in error.(*googleapi.Error).Header. Use
5985// googleapi.IsNotModified to check whether the returned error was
5986// because http.StatusNotModified was returned.
5987func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error) {
5988	gensupport.SetOptions(c.urlParams_, opts...)
5989	res, err := c.doRequest("json")
5990	if res != nil && res.StatusCode == http.StatusNotModified {
5991		if res.Body != nil {
5992			res.Body.Close()
5993		}
5994		return nil, &googleapi.Error{
5995			Code:   res.StatusCode,
5996			Header: res.Header,
5997		}
5998	}
5999	if err != nil {
6000		return nil, err
6001	}
6002	defer googleapi.CloseBody(res)
6003	if err := googleapi.CheckResponse(res); err != nil {
6004		return nil, err
6005	}
6006	ret := &DatabasesListResponse{
6007		ServerResponse: googleapi.ServerResponse{
6008			Header:         res.Header,
6009			HTTPStatusCode: res.StatusCode,
6010		},
6011	}
6012	target := &ret
6013	if err := gensupport.DecodeResponse(target, res); err != nil {
6014		return nil, err
6015	}
6016	return ret, nil
6017	// {
6018	//   "description": "Lists databases in the specified Cloud SQL instance.",
6019	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases",
6020	//   "httpMethod": "GET",
6021	//   "id": "sql.databases.list",
6022	//   "parameterOrder": [
6023	//     "project",
6024	//     "instance"
6025	//   ],
6026	//   "parameters": {
6027	//     "instance": {
6028	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6029	//       "location": "path",
6030	//       "required": true,
6031	//       "type": "string"
6032	//     },
6033	//     "project": {
6034	//       "description": "Project ID of the project that contains the instance.",
6035	//       "location": "path",
6036	//       "required": true,
6037	//       "type": "string"
6038	//     }
6039	//   },
6040	//   "path": "v1/projects/{project}/instances/{instance}/databases",
6041	//   "response": {
6042	//     "$ref": "DatabasesListResponse"
6043	//   },
6044	//   "scopes": [
6045	//     "https://www.googleapis.com/auth/cloud-platform",
6046	//     "https://www.googleapis.com/auth/sqlservice.admin"
6047	//   ]
6048	// }
6049
6050}
6051
6052// method id "sql.databases.patch":
6053
6054type DatabasesPatchCall struct {
6055	s          *Service
6056	project    string
6057	instance   string
6058	database   string
6059	database2  *Database
6060	urlParams_ gensupport.URLParams
6061	ctx_       context.Context
6062	header_    http.Header
6063}
6064
6065// Patch: Partially updates a resource containing information about a
6066// database inside a Cloud SQL instance. This method supports patch
6067// semantics.
6068//
6069// - database: Name of the database to be updated in the instance.
6070// - instance: Database instance ID. This does not include the project
6071//   ID.
6072// - project: Project ID of the project that contains the instance.
6073func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall {
6074	c := &DatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6075	c.project = project
6076	c.instance = instance
6077	c.database = database
6078	c.database2 = database2
6079	return c
6080}
6081
6082// Fields allows partial responses to be retrieved. See
6083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6084// for more information.
6085func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall {
6086	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6087	return c
6088}
6089
6090// Context sets the context to be used in this call's Do method. Any
6091// pending HTTP request will be aborted if the provided context is
6092// canceled.
6093func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall {
6094	c.ctx_ = ctx
6095	return c
6096}
6097
6098// Header returns an http.Header that can be modified by the caller to
6099// add HTTP headers to the request.
6100func (c *DatabasesPatchCall) Header() http.Header {
6101	if c.header_ == nil {
6102		c.header_ = make(http.Header)
6103	}
6104	return c.header_
6105}
6106
6107func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
6108	reqHeaders := make(http.Header)
6109	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6110	for k, v := range c.header_ {
6111		reqHeaders[k] = v
6112	}
6113	reqHeaders.Set("User-Agent", c.s.userAgent())
6114	var body io.Reader = nil
6115	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
6116	if err != nil {
6117		return nil, err
6118	}
6119	reqHeaders.Set("Content-Type", "application/json")
6120	c.urlParams_.Set("alt", alt)
6121	c.urlParams_.Set("prettyPrint", "false")
6122	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
6123	urls += "?" + c.urlParams_.Encode()
6124	req, err := http.NewRequest("PATCH", urls, body)
6125	if err != nil {
6126		return nil, err
6127	}
6128	req.Header = reqHeaders
6129	googleapi.Expand(req.URL, map[string]string{
6130		"project":  c.project,
6131		"instance": c.instance,
6132		"database": c.database,
6133	})
6134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6135}
6136
6137// Do executes the "sql.databases.patch" call.
6138// Exactly one of *Operation or error will be non-nil. Any non-2xx
6139// status code is an error. Response headers are in either
6140// *Operation.ServerResponse.Header or (if a response was returned at
6141// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6142// to check whether the returned error was because
6143// http.StatusNotModified was returned.
6144func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6145	gensupport.SetOptions(c.urlParams_, opts...)
6146	res, err := c.doRequest("json")
6147	if res != nil && res.StatusCode == http.StatusNotModified {
6148		if res.Body != nil {
6149			res.Body.Close()
6150		}
6151		return nil, &googleapi.Error{
6152			Code:   res.StatusCode,
6153			Header: res.Header,
6154		}
6155	}
6156	if err != nil {
6157		return nil, err
6158	}
6159	defer googleapi.CloseBody(res)
6160	if err := googleapi.CheckResponse(res); err != nil {
6161		return nil, err
6162	}
6163	ret := &Operation{
6164		ServerResponse: googleapi.ServerResponse{
6165			Header:         res.Header,
6166			HTTPStatusCode: res.StatusCode,
6167		},
6168	}
6169	target := &ret
6170	if err := gensupport.DecodeResponse(target, res); err != nil {
6171		return nil, err
6172	}
6173	return ret, nil
6174	// {
6175	//   "description": "Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.",
6176	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
6177	//   "httpMethod": "PATCH",
6178	//   "id": "sql.databases.patch",
6179	//   "parameterOrder": [
6180	//     "project",
6181	//     "instance",
6182	//     "database"
6183	//   ],
6184	//   "parameters": {
6185	//     "database": {
6186	//       "description": "Name of the database to be updated in the instance.",
6187	//       "location": "path",
6188	//       "required": true,
6189	//       "type": "string"
6190	//     },
6191	//     "instance": {
6192	//       "description": "Database instance ID. This does not include the project ID.",
6193	//       "location": "path",
6194	//       "required": true,
6195	//       "type": "string"
6196	//     },
6197	//     "project": {
6198	//       "description": "Project ID of the project that contains the instance.",
6199	//       "location": "path",
6200	//       "required": true,
6201	//       "type": "string"
6202	//     }
6203	//   },
6204	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
6205	//   "request": {
6206	//     "$ref": "Database"
6207	//   },
6208	//   "response": {
6209	//     "$ref": "Operation"
6210	//   },
6211	//   "scopes": [
6212	//     "https://www.googleapis.com/auth/cloud-platform",
6213	//     "https://www.googleapis.com/auth/sqlservice.admin"
6214	//   ]
6215	// }
6216
6217}
6218
6219// method id "sql.databases.update":
6220
6221type DatabasesUpdateCall struct {
6222	s          *Service
6223	project    string
6224	instance   string
6225	database   string
6226	database2  *Database
6227	urlParams_ gensupport.URLParams
6228	ctx_       context.Context
6229	header_    http.Header
6230}
6231
6232// Update: Updates a resource containing information about a database
6233// inside a Cloud SQL instance.
6234//
6235// - database: Name of the database to be updated in the instance.
6236// - instance: Database instance ID. This does not include the project
6237//   ID.
6238// - project: Project ID of the project that contains the instance.
6239func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall {
6240	c := &DatabasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6241	c.project = project
6242	c.instance = instance
6243	c.database = database
6244	c.database2 = database2
6245	return c
6246}
6247
6248// Fields allows partial responses to be retrieved. See
6249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6250// for more information.
6251func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall {
6252	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6253	return c
6254}
6255
6256// Context sets the context to be used in this call's Do method. Any
6257// pending HTTP request will be aborted if the provided context is
6258// canceled.
6259func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall {
6260	c.ctx_ = ctx
6261	return c
6262}
6263
6264// Header returns an http.Header that can be modified by the caller to
6265// add HTTP headers to the request.
6266func (c *DatabasesUpdateCall) Header() http.Header {
6267	if c.header_ == nil {
6268		c.header_ = make(http.Header)
6269	}
6270	return c.header_
6271}
6272
6273func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) {
6274	reqHeaders := make(http.Header)
6275	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6276	for k, v := range c.header_ {
6277		reqHeaders[k] = v
6278	}
6279	reqHeaders.Set("User-Agent", c.s.userAgent())
6280	var body io.Reader = nil
6281	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
6282	if err != nil {
6283		return nil, err
6284	}
6285	reqHeaders.Set("Content-Type", "application/json")
6286	c.urlParams_.Set("alt", alt)
6287	c.urlParams_.Set("prettyPrint", "false")
6288	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
6289	urls += "?" + c.urlParams_.Encode()
6290	req, err := http.NewRequest("PUT", urls, body)
6291	if err != nil {
6292		return nil, err
6293	}
6294	req.Header = reqHeaders
6295	googleapi.Expand(req.URL, map[string]string{
6296		"project":  c.project,
6297		"instance": c.instance,
6298		"database": c.database,
6299	})
6300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6301}
6302
6303// Do executes the "sql.databases.update" call.
6304// Exactly one of *Operation or error will be non-nil. Any non-2xx
6305// status code is an error. Response headers are in either
6306// *Operation.ServerResponse.Header or (if a response was returned at
6307// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6308// to check whether the returned error was because
6309// http.StatusNotModified was returned.
6310func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6311	gensupport.SetOptions(c.urlParams_, opts...)
6312	res, err := c.doRequest("json")
6313	if res != nil && res.StatusCode == http.StatusNotModified {
6314		if res.Body != nil {
6315			res.Body.Close()
6316		}
6317		return nil, &googleapi.Error{
6318			Code:   res.StatusCode,
6319			Header: res.Header,
6320		}
6321	}
6322	if err != nil {
6323		return nil, err
6324	}
6325	defer googleapi.CloseBody(res)
6326	if err := googleapi.CheckResponse(res); err != nil {
6327		return nil, err
6328	}
6329	ret := &Operation{
6330		ServerResponse: googleapi.ServerResponse{
6331			Header:         res.Header,
6332			HTTPStatusCode: res.StatusCode,
6333		},
6334	}
6335	target := &ret
6336	if err := gensupport.DecodeResponse(target, res); err != nil {
6337		return nil, err
6338	}
6339	return ret, nil
6340	// {
6341	//   "description": "Updates a resource containing information about a database inside a Cloud SQL instance.",
6342	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
6343	//   "httpMethod": "PUT",
6344	//   "id": "sql.databases.update",
6345	//   "parameterOrder": [
6346	//     "project",
6347	//     "instance",
6348	//     "database"
6349	//   ],
6350	//   "parameters": {
6351	//     "database": {
6352	//       "description": "Name of the database to be updated in the instance.",
6353	//       "location": "path",
6354	//       "required": true,
6355	//       "type": "string"
6356	//     },
6357	//     "instance": {
6358	//       "description": "Database instance ID. This does not include the project ID.",
6359	//       "location": "path",
6360	//       "required": true,
6361	//       "type": "string"
6362	//     },
6363	//     "project": {
6364	//       "description": "Project ID of the project that contains the instance.",
6365	//       "location": "path",
6366	//       "required": true,
6367	//       "type": "string"
6368	//     }
6369	//   },
6370	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
6371	//   "request": {
6372	//     "$ref": "Database"
6373	//   },
6374	//   "response": {
6375	//     "$ref": "Operation"
6376	//   },
6377	//   "scopes": [
6378	//     "https://www.googleapis.com/auth/cloud-platform",
6379	//     "https://www.googleapis.com/auth/sqlservice.admin"
6380	//   ]
6381	// }
6382
6383}
6384
6385// method id "sql.flags.list":
6386
6387type FlagsListCall struct {
6388	s            *Service
6389	urlParams_   gensupport.URLParams
6390	ifNoneMatch_ string
6391	ctx_         context.Context
6392	header_      http.Header
6393}
6394
6395// List: Lists all available database flags for Cloud SQL instances.
6396func (r *FlagsService) List() *FlagsListCall {
6397	c := &FlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6398	return c
6399}
6400
6401// DatabaseVersion sets the optional parameter "databaseVersion":
6402// Database type and version you want to retrieve flags for. By default,
6403// this method returns flags for all database types and versions.
6404func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall {
6405	c.urlParams_.Set("databaseVersion", databaseVersion)
6406	return c
6407}
6408
6409// Fields allows partial responses to be retrieved. See
6410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6411// for more information.
6412func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall {
6413	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6414	return c
6415}
6416
6417// IfNoneMatch sets the optional parameter which makes the operation
6418// fail if the object's ETag matches the given value. This is useful for
6419// getting updates only after the object has changed since the last
6420// request. Use googleapi.IsNotModified to check whether the response
6421// error from Do is the result of In-None-Match.
6422func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall {
6423	c.ifNoneMatch_ = entityTag
6424	return c
6425}
6426
6427// Context sets the context to be used in this call's Do method. Any
6428// pending HTTP request will be aborted if the provided context is
6429// canceled.
6430func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall {
6431	c.ctx_ = ctx
6432	return c
6433}
6434
6435// Header returns an http.Header that can be modified by the caller to
6436// add HTTP headers to the request.
6437func (c *FlagsListCall) Header() http.Header {
6438	if c.header_ == nil {
6439		c.header_ = make(http.Header)
6440	}
6441	return c.header_
6442}
6443
6444func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) {
6445	reqHeaders := make(http.Header)
6446	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6447	for k, v := range c.header_ {
6448		reqHeaders[k] = v
6449	}
6450	reqHeaders.Set("User-Agent", c.s.userAgent())
6451	if c.ifNoneMatch_ != "" {
6452		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6453	}
6454	var body io.Reader = nil
6455	c.urlParams_.Set("alt", alt)
6456	c.urlParams_.Set("prettyPrint", "false")
6457	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/flags")
6458	urls += "?" + c.urlParams_.Encode()
6459	req, err := http.NewRequest("GET", urls, body)
6460	if err != nil {
6461		return nil, err
6462	}
6463	req.Header = reqHeaders
6464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6465}
6466
6467// Do executes the "sql.flags.list" call.
6468// Exactly one of *FlagsListResponse or error will be non-nil. Any
6469// non-2xx status code is an error. Response headers are in either
6470// *FlagsListResponse.ServerResponse.Header or (if a response was
6471// returned at all) in error.(*googleapi.Error).Header. Use
6472// googleapi.IsNotModified to check whether the returned error was
6473// because http.StatusNotModified was returned.
6474func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error) {
6475	gensupport.SetOptions(c.urlParams_, opts...)
6476	res, err := c.doRequest("json")
6477	if res != nil && res.StatusCode == http.StatusNotModified {
6478		if res.Body != nil {
6479			res.Body.Close()
6480		}
6481		return nil, &googleapi.Error{
6482			Code:   res.StatusCode,
6483			Header: res.Header,
6484		}
6485	}
6486	if err != nil {
6487		return nil, err
6488	}
6489	defer googleapi.CloseBody(res)
6490	if err := googleapi.CheckResponse(res); err != nil {
6491		return nil, err
6492	}
6493	ret := &FlagsListResponse{
6494		ServerResponse: googleapi.ServerResponse{
6495			Header:         res.Header,
6496			HTTPStatusCode: res.StatusCode,
6497		},
6498	}
6499	target := &ret
6500	if err := gensupport.DecodeResponse(target, res); err != nil {
6501		return nil, err
6502	}
6503	return ret, nil
6504	// {
6505	//   "description": "Lists all available database flags for Cloud SQL instances.",
6506	//   "flatPath": "v1/flags",
6507	//   "httpMethod": "GET",
6508	//   "id": "sql.flags.list",
6509	//   "parameterOrder": [],
6510	//   "parameters": {
6511	//     "databaseVersion": {
6512	//       "description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.",
6513	//       "location": "query",
6514	//       "type": "string"
6515	//     }
6516	//   },
6517	//   "path": "v1/flags",
6518	//   "response": {
6519	//     "$ref": "FlagsListResponse"
6520	//   },
6521	//   "scopes": [
6522	//     "https://www.googleapis.com/auth/cloud-platform",
6523	//     "https://www.googleapis.com/auth/sqlservice.admin"
6524	//   ]
6525	// }
6526
6527}
6528
6529// method id "sql.instances.addServerCa":
6530
6531type InstancesAddServerCaCall struct {
6532	s          *Service
6533	project    string
6534	instance   string
6535	urlParams_ gensupport.URLParams
6536	ctx_       context.Context
6537	header_    http.Header
6538}
6539
6540// AddServerCa: Adds a new trusted Certificate Authority (CA) version
6541// for the specified instance. Required to prepare for a certificate
6542// rotation. If a CA version was previously added but never used in a
6543// certificate rotation, this operation replaces that version. There
6544// cannot be more than one CA version waiting to be rotated in.
6545//
6546// - instance: Cloud SQL instance ID. This does not include the project
6547//   ID.
6548// - project: Project ID of the project that contains the instance.
6549func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall {
6550	c := &InstancesAddServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6551	c.project = project
6552	c.instance = instance
6553	return c
6554}
6555
6556// Fields allows partial responses to be retrieved. See
6557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6558// for more information.
6559func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall {
6560	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6561	return c
6562}
6563
6564// Context sets the context to be used in this call's Do method. Any
6565// pending HTTP request will be aborted if the provided context is
6566// canceled.
6567func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall {
6568	c.ctx_ = ctx
6569	return c
6570}
6571
6572// Header returns an http.Header that can be modified by the caller to
6573// add HTTP headers to the request.
6574func (c *InstancesAddServerCaCall) Header() http.Header {
6575	if c.header_ == nil {
6576		c.header_ = make(http.Header)
6577	}
6578	return c.header_
6579}
6580
6581func (c *InstancesAddServerCaCall) doRequest(alt string) (*http.Response, error) {
6582	reqHeaders := make(http.Header)
6583	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6584	for k, v := range c.header_ {
6585		reqHeaders[k] = v
6586	}
6587	reqHeaders.Set("User-Agent", c.s.userAgent())
6588	var body io.Reader = nil
6589	c.urlParams_.Set("alt", alt)
6590	c.urlParams_.Set("prettyPrint", "false")
6591	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/addServerCa")
6592	urls += "?" + c.urlParams_.Encode()
6593	req, err := http.NewRequest("POST", urls, body)
6594	if err != nil {
6595		return nil, err
6596	}
6597	req.Header = reqHeaders
6598	googleapi.Expand(req.URL, map[string]string{
6599		"project":  c.project,
6600		"instance": c.instance,
6601	})
6602	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6603}
6604
6605// Do executes the "sql.instances.addServerCa" call.
6606// Exactly one of *Operation or error will be non-nil. Any non-2xx
6607// status code is an error. Response headers are in either
6608// *Operation.ServerResponse.Header or (if a response was returned at
6609// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6610// to check whether the returned error was because
6611// http.StatusNotModified was returned.
6612func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6613	gensupport.SetOptions(c.urlParams_, opts...)
6614	res, err := c.doRequest("json")
6615	if res != nil && res.StatusCode == http.StatusNotModified {
6616		if res.Body != nil {
6617			res.Body.Close()
6618		}
6619		return nil, &googleapi.Error{
6620			Code:   res.StatusCode,
6621			Header: res.Header,
6622		}
6623	}
6624	if err != nil {
6625		return nil, err
6626	}
6627	defer googleapi.CloseBody(res)
6628	if err := googleapi.CheckResponse(res); err != nil {
6629		return nil, err
6630	}
6631	ret := &Operation{
6632		ServerResponse: googleapi.ServerResponse{
6633			Header:         res.Header,
6634			HTTPStatusCode: res.StatusCode,
6635		},
6636	}
6637	target := &ret
6638	if err := gensupport.DecodeResponse(target, res); err != nil {
6639		return nil, err
6640	}
6641	return ret, nil
6642	// {
6643	//   "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.",
6644	//   "flatPath": "v1/projects/{project}/instances/{instance}/addServerCa",
6645	//   "httpMethod": "POST",
6646	//   "id": "sql.instances.addServerCa",
6647	//   "parameterOrder": [
6648	//     "project",
6649	//     "instance"
6650	//   ],
6651	//   "parameters": {
6652	//     "instance": {
6653	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6654	//       "location": "path",
6655	//       "required": true,
6656	//       "type": "string"
6657	//     },
6658	//     "project": {
6659	//       "description": "Project ID of the project that contains the instance.",
6660	//       "location": "path",
6661	//       "required": true,
6662	//       "type": "string"
6663	//     }
6664	//   },
6665	//   "path": "v1/projects/{project}/instances/{instance}/addServerCa",
6666	//   "response": {
6667	//     "$ref": "Operation"
6668	//   },
6669	//   "scopes": [
6670	//     "https://www.googleapis.com/auth/cloud-platform",
6671	//     "https://www.googleapis.com/auth/sqlservice.admin"
6672	//   ]
6673	// }
6674
6675}
6676
6677// method id "sql.instances.clone":
6678
6679type InstancesCloneCall struct {
6680	s                     *Service
6681	project               string
6682	instance              string
6683	instancesclonerequest *InstancesCloneRequest
6684	urlParams_            gensupport.URLParams
6685	ctx_                  context.Context
6686	header_               http.Header
6687}
6688
6689// Clone: Creates a Cloud SQL instance as a clone of the source
6690// instance. Using this operation might cause your instance to restart.
6691//
6692// - instance: The ID of the Cloud SQL instance to be cloned (source).
6693//   This does not include the project ID.
6694// - project: Project ID of the source as well as the clone Cloud SQL
6695//   instance.
6696func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall {
6697	c := &InstancesCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6698	c.project = project
6699	c.instance = instance
6700	c.instancesclonerequest = instancesclonerequest
6701	return c
6702}
6703
6704// Fields allows partial responses to be retrieved. See
6705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6706// for more information.
6707func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall {
6708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6709	return c
6710}
6711
6712// Context sets the context to be used in this call's Do method. Any
6713// pending HTTP request will be aborted if the provided context is
6714// canceled.
6715func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall {
6716	c.ctx_ = ctx
6717	return c
6718}
6719
6720// Header returns an http.Header that can be modified by the caller to
6721// add HTTP headers to the request.
6722func (c *InstancesCloneCall) Header() http.Header {
6723	if c.header_ == nil {
6724		c.header_ = make(http.Header)
6725	}
6726	return c.header_
6727}
6728
6729func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) {
6730	reqHeaders := make(http.Header)
6731	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6732	for k, v := range c.header_ {
6733		reqHeaders[k] = v
6734	}
6735	reqHeaders.Set("User-Agent", c.s.userAgent())
6736	var body io.Reader = nil
6737	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest)
6738	if err != nil {
6739		return nil, err
6740	}
6741	reqHeaders.Set("Content-Type", "application/json")
6742	c.urlParams_.Set("alt", alt)
6743	c.urlParams_.Set("prettyPrint", "false")
6744	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/clone")
6745	urls += "?" + c.urlParams_.Encode()
6746	req, err := http.NewRequest("POST", urls, body)
6747	if err != nil {
6748		return nil, err
6749	}
6750	req.Header = reqHeaders
6751	googleapi.Expand(req.URL, map[string]string{
6752		"project":  c.project,
6753		"instance": c.instance,
6754	})
6755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6756}
6757
6758// Do executes the "sql.instances.clone" call.
6759// Exactly one of *Operation or error will be non-nil. Any non-2xx
6760// status code is an error. Response headers are in either
6761// *Operation.ServerResponse.Header or (if a response was returned at
6762// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6763// to check whether the returned error was because
6764// http.StatusNotModified was returned.
6765func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6766	gensupport.SetOptions(c.urlParams_, opts...)
6767	res, err := c.doRequest("json")
6768	if res != nil && res.StatusCode == http.StatusNotModified {
6769		if res.Body != nil {
6770			res.Body.Close()
6771		}
6772		return nil, &googleapi.Error{
6773			Code:   res.StatusCode,
6774			Header: res.Header,
6775		}
6776	}
6777	if err != nil {
6778		return nil, err
6779	}
6780	defer googleapi.CloseBody(res)
6781	if err := googleapi.CheckResponse(res); err != nil {
6782		return nil, err
6783	}
6784	ret := &Operation{
6785		ServerResponse: googleapi.ServerResponse{
6786			Header:         res.Header,
6787			HTTPStatusCode: res.StatusCode,
6788		},
6789	}
6790	target := &ret
6791	if err := gensupport.DecodeResponse(target, res); err != nil {
6792		return nil, err
6793	}
6794	return ret, nil
6795	// {
6796	//   "description": "Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.",
6797	//   "flatPath": "v1/projects/{project}/instances/{instance}/clone",
6798	//   "httpMethod": "POST",
6799	//   "id": "sql.instances.clone",
6800	//   "parameterOrder": [
6801	//     "project",
6802	//     "instance"
6803	//   ],
6804	//   "parameters": {
6805	//     "instance": {
6806	//       "description": "The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.",
6807	//       "location": "path",
6808	//       "required": true,
6809	//       "type": "string"
6810	//     },
6811	//     "project": {
6812	//       "description": "Project ID of the source as well as the clone Cloud SQL instance.",
6813	//       "location": "path",
6814	//       "required": true,
6815	//       "type": "string"
6816	//     }
6817	//   },
6818	//   "path": "v1/projects/{project}/instances/{instance}/clone",
6819	//   "request": {
6820	//     "$ref": "InstancesCloneRequest"
6821	//   },
6822	//   "response": {
6823	//     "$ref": "Operation"
6824	//   },
6825	//   "scopes": [
6826	//     "https://www.googleapis.com/auth/cloud-platform",
6827	//     "https://www.googleapis.com/auth/sqlservice.admin"
6828	//   ]
6829	// }
6830
6831}
6832
6833// method id "sql.instances.delete":
6834
6835type InstancesDeleteCall struct {
6836	s          *Service
6837	project    string
6838	instance   string
6839	urlParams_ gensupport.URLParams
6840	ctx_       context.Context
6841	header_    http.Header
6842}
6843
6844// Delete: Deletes a Cloud SQL instance.
6845//
6846// - instance: Cloud SQL instance ID. This does not include the project
6847//   ID.
6848// - project: Project ID of the project that contains the instance to be
6849//   deleted.
6850func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall {
6851	c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6852	c.project = project
6853	c.instance = instance
6854	return c
6855}
6856
6857// Fields allows partial responses to be retrieved. See
6858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6859// for more information.
6860func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
6861	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6862	return c
6863}
6864
6865// Context sets the context to be used in this call's Do method. Any
6866// pending HTTP request will be aborted if the provided context is
6867// canceled.
6868func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
6869	c.ctx_ = ctx
6870	return c
6871}
6872
6873// Header returns an http.Header that can be modified by the caller to
6874// add HTTP headers to the request.
6875func (c *InstancesDeleteCall) Header() http.Header {
6876	if c.header_ == nil {
6877		c.header_ = make(http.Header)
6878	}
6879	return c.header_
6880}
6881
6882func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
6883	reqHeaders := make(http.Header)
6884	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6885	for k, v := range c.header_ {
6886		reqHeaders[k] = v
6887	}
6888	reqHeaders.Set("User-Agent", c.s.userAgent())
6889	var body io.Reader = nil
6890	c.urlParams_.Set("alt", alt)
6891	c.urlParams_.Set("prettyPrint", "false")
6892	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
6893	urls += "?" + c.urlParams_.Encode()
6894	req, err := http.NewRequest("DELETE", urls, body)
6895	if err != nil {
6896		return nil, err
6897	}
6898	req.Header = reqHeaders
6899	googleapi.Expand(req.URL, map[string]string{
6900		"project":  c.project,
6901		"instance": c.instance,
6902	})
6903	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6904}
6905
6906// Do executes the "sql.instances.delete" call.
6907// Exactly one of *Operation or error will be non-nil. Any non-2xx
6908// status code is an error. Response headers are in either
6909// *Operation.ServerResponse.Header or (if a response was returned at
6910// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6911// to check whether the returned error was because
6912// http.StatusNotModified was returned.
6913func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6914	gensupport.SetOptions(c.urlParams_, opts...)
6915	res, err := c.doRequest("json")
6916	if res != nil && res.StatusCode == http.StatusNotModified {
6917		if res.Body != nil {
6918			res.Body.Close()
6919		}
6920		return nil, &googleapi.Error{
6921			Code:   res.StatusCode,
6922			Header: res.Header,
6923		}
6924	}
6925	if err != nil {
6926		return nil, err
6927	}
6928	defer googleapi.CloseBody(res)
6929	if err := googleapi.CheckResponse(res); err != nil {
6930		return nil, err
6931	}
6932	ret := &Operation{
6933		ServerResponse: googleapi.ServerResponse{
6934			Header:         res.Header,
6935			HTTPStatusCode: res.StatusCode,
6936		},
6937	}
6938	target := &ret
6939	if err := gensupport.DecodeResponse(target, res); err != nil {
6940		return nil, err
6941	}
6942	return ret, nil
6943	// {
6944	//   "description": "Deletes a Cloud SQL instance.",
6945	//   "flatPath": "v1/projects/{project}/instances/{instance}",
6946	//   "httpMethod": "DELETE",
6947	//   "id": "sql.instances.delete",
6948	//   "parameterOrder": [
6949	//     "project",
6950	//     "instance"
6951	//   ],
6952	//   "parameters": {
6953	//     "instance": {
6954	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6955	//       "location": "path",
6956	//       "required": true,
6957	//       "type": "string"
6958	//     },
6959	//     "project": {
6960	//       "description": "Project ID of the project that contains the instance to be deleted.",
6961	//       "location": "path",
6962	//       "required": true,
6963	//       "type": "string"
6964	//     }
6965	//   },
6966	//   "path": "v1/projects/{project}/instances/{instance}",
6967	//   "response": {
6968	//     "$ref": "Operation"
6969	//   },
6970	//   "scopes": [
6971	//     "https://www.googleapis.com/auth/cloud-platform",
6972	//     "https://www.googleapis.com/auth/sqlservice.admin"
6973	//   ]
6974	// }
6975
6976}
6977
6978// method id "sql.instances.demoteMaster":
6979
6980type InstancesDemoteMasterCall struct {
6981	s                            *Service
6982	project                      string
6983	instance                     string
6984	instancesdemotemasterrequest *InstancesDemoteMasterRequest
6985	urlParams_                   gensupport.URLParams
6986	ctx_                         context.Context
6987	header_                      http.Header
6988}
6989
6990// DemoteMaster: Demotes the stand-alone instance to be a Cloud SQL read
6991// replica for an external database server.
6992//
6993// - instance: Cloud SQL instance name.
6994// - project: ID of the project that contains the instance.
6995func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall {
6996	c := &InstancesDemoteMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6997	c.project = project
6998	c.instance = instance
6999	c.instancesdemotemasterrequest = instancesdemotemasterrequest
7000	return c
7001}
7002
7003// Fields allows partial responses to be retrieved. See
7004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7005// for more information.
7006func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall {
7007	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7008	return c
7009}
7010
7011// Context sets the context to be used in this call's Do method. Any
7012// pending HTTP request will be aborted if the provided context is
7013// canceled.
7014func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall {
7015	c.ctx_ = ctx
7016	return c
7017}
7018
7019// Header returns an http.Header that can be modified by the caller to
7020// add HTTP headers to the request.
7021func (c *InstancesDemoteMasterCall) Header() http.Header {
7022	if c.header_ == nil {
7023		c.header_ = make(http.Header)
7024	}
7025	return c.header_
7026}
7027
7028func (c *InstancesDemoteMasterCall) doRequest(alt string) (*http.Response, error) {
7029	reqHeaders := make(http.Header)
7030	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7031	for k, v := range c.header_ {
7032		reqHeaders[k] = v
7033	}
7034	reqHeaders.Set("User-Agent", c.s.userAgent())
7035	var body io.Reader = nil
7036	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesdemotemasterrequest)
7037	if err != nil {
7038		return nil, err
7039	}
7040	reqHeaders.Set("Content-Type", "application/json")
7041	c.urlParams_.Set("alt", alt)
7042	c.urlParams_.Set("prettyPrint", "false")
7043	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/demoteMaster")
7044	urls += "?" + c.urlParams_.Encode()
7045	req, err := http.NewRequest("POST", urls, body)
7046	if err != nil {
7047		return nil, err
7048	}
7049	req.Header = reqHeaders
7050	googleapi.Expand(req.URL, map[string]string{
7051		"project":  c.project,
7052		"instance": c.instance,
7053	})
7054	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7055}
7056
7057// Do executes the "sql.instances.demoteMaster" call.
7058// Exactly one of *Operation or error will be non-nil. Any non-2xx
7059// status code is an error. Response headers are in either
7060// *Operation.ServerResponse.Header or (if a response was returned at
7061// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7062// to check whether the returned error was because
7063// http.StatusNotModified was returned.
7064func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7065	gensupport.SetOptions(c.urlParams_, opts...)
7066	res, err := c.doRequest("json")
7067	if res != nil && res.StatusCode == http.StatusNotModified {
7068		if res.Body != nil {
7069			res.Body.Close()
7070		}
7071		return nil, &googleapi.Error{
7072			Code:   res.StatusCode,
7073			Header: res.Header,
7074		}
7075	}
7076	if err != nil {
7077		return nil, err
7078	}
7079	defer googleapi.CloseBody(res)
7080	if err := googleapi.CheckResponse(res); err != nil {
7081		return nil, err
7082	}
7083	ret := &Operation{
7084		ServerResponse: googleapi.ServerResponse{
7085			Header:         res.Header,
7086			HTTPStatusCode: res.StatusCode,
7087		},
7088	}
7089	target := &ret
7090	if err := gensupport.DecodeResponse(target, res); err != nil {
7091		return nil, err
7092	}
7093	return ret, nil
7094	// {
7095	//   "description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.",
7096	//   "flatPath": "v1/projects/{project}/instances/{instance}/demoteMaster",
7097	//   "httpMethod": "POST",
7098	//   "id": "sql.instances.demoteMaster",
7099	//   "parameterOrder": [
7100	//     "project",
7101	//     "instance"
7102	//   ],
7103	//   "parameters": {
7104	//     "instance": {
7105	//       "description": "Cloud SQL instance name.",
7106	//       "location": "path",
7107	//       "required": true,
7108	//       "type": "string"
7109	//     },
7110	//     "project": {
7111	//       "description": "ID of the project that contains the instance.",
7112	//       "location": "path",
7113	//       "required": true,
7114	//       "type": "string"
7115	//     }
7116	//   },
7117	//   "path": "v1/projects/{project}/instances/{instance}/demoteMaster",
7118	//   "request": {
7119	//     "$ref": "InstancesDemoteMasterRequest"
7120	//   },
7121	//   "response": {
7122	//     "$ref": "Operation"
7123	//   },
7124	//   "scopes": [
7125	//     "https://www.googleapis.com/auth/cloud-platform",
7126	//     "https://www.googleapis.com/auth/sqlservice.admin"
7127	//   ]
7128	// }
7129
7130}
7131
7132// method id "sql.instances.export":
7133
7134type InstancesExportCall struct {
7135	s                      *Service
7136	project                string
7137	instance               string
7138	instancesexportrequest *InstancesExportRequest
7139	urlParams_             gensupport.URLParams
7140	ctx_                   context.Context
7141	header_                http.Header
7142}
7143
7144// Export: Exports data from a Cloud SQL instance to a Cloud Storage
7145// bucket as a SQL dump or CSV file.
7146//
7147// - instance: Cloud SQL instance ID. This does not include the project
7148//   ID.
7149// - project: Project ID of the project that contains the instance to be
7150//   exported.
7151func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall {
7152	c := &InstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7153	c.project = project
7154	c.instance = instance
7155	c.instancesexportrequest = instancesexportrequest
7156	return c
7157}
7158
7159// Fields allows partial responses to be retrieved. See
7160// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7161// for more information.
7162func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall {
7163	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7164	return c
7165}
7166
7167// Context sets the context to be used in this call's Do method. Any
7168// pending HTTP request will be aborted if the provided context is
7169// canceled.
7170func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall {
7171	c.ctx_ = ctx
7172	return c
7173}
7174
7175// Header returns an http.Header that can be modified by the caller to
7176// add HTTP headers to the request.
7177func (c *InstancesExportCall) Header() http.Header {
7178	if c.header_ == nil {
7179		c.header_ = make(http.Header)
7180	}
7181	return c.header_
7182}
7183
7184func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) {
7185	reqHeaders := make(http.Header)
7186	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7187	for k, v := range c.header_ {
7188		reqHeaders[k] = v
7189	}
7190	reqHeaders.Set("User-Agent", c.s.userAgent())
7191	var body io.Reader = nil
7192	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest)
7193	if err != nil {
7194		return nil, err
7195	}
7196	reqHeaders.Set("Content-Type", "application/json")
7197	c.urlParams_.Set("alt", alt)
7198	c.urlParams_.Set("prettyPrint", "false")
7199	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/export")
7200	urls += "?" + c.urlParams_.Encode()
7201	req, err := http.NewRequest("POST", urls, body)
7202	if err != nil {
7203		return nil, err
7204	}
7205	req.Header = reqHeaders
7206	googleapi.Expand(req.URL, map[string]string{
7207		"project":  c.project,
7208		"instance": c.instance,
7209	})
7210	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7211}
7212
7213// Do executes the "sql.instances.export" call.
7214// Exactly one of *Operation or error will be non-nil. Any non-2xx
7215// status code is an error. Response headers are in either
7216// *Operation.ServerResponse.Header or (if a response was returned at
7217// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7218// to check whether the returned error was because
7219// http.StatusNotModified was returned.
7220func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7221	gensupport.SetOptions(c.urlParams_, opts...)
7222	res, err := c.doRequest("json")
7223	if res != nil && res.StatusCode == http.StatusNotModified {
7224		if res.Body != nil {
7225			res.Body.Close()
7226		}
7227		return nil, &googleapi.Error{
7228			Code:   res.StatusCode,
7229			Header: res.Header,
7230		}
7231	}
7232	if err != nil {
7233		return nil, err
7234	}
7235	defer googleapi.CloseBody(res)
7236	if err := googleapi.CheckResponse(res); err != nil {
7237		return nil, err
7238	}
7239	ret := &Operation{
7240		ServerResponse: googleapi.ServerResponse{
7241			Header:         res.Header,
7242			HTTPStatusCode: res.StatusCode,
7243		},
7244	}
7245	target := &ret
7246	if err := gensupport.DecodeResponse(target, res); err != nil {
7247		return nil, err
7248	}
7249	return ret, nil
7250	// {
7251	//   "description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.",
7252	//   "flatPath": "v1/projects/{project}/instances/{instance}/export",
7253	//   "httpMethod": "POST",
7254	//   "id": "sql.instances.export",
7255	//   "parameterOrder": [
7256	//     "project",
7257	//     "instance"
7258	//   ],
7259	//   "parameters": {
7260	//     "instance": {
7261	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7262	//       "location": "path",
7263	//       "required": true,
7264	//       "type": "string"
7265	//     },
7266	//     "project": {
7267	//       "description": "Project ID of the project that contains the instance to be exported.",
7268	//       "location": "path",
7269	//       "required": true,
7270	//       "type": "string"
7271	//     }
7272	//   },
7273	//   "path": "v1/projects/{project}/instances/{instance}/export",
7274	//   "request": {
7275	//     "$ref": "InstancesExportRequest"
7276	//   },
7277	//   "response": {
7278	//     "$ref": "Operation"
7279	//   },
7280	//   "scopes": [
7281	//     "https://www.googleapis.com/auth/cloud-platform"
7282	//   ]
7283	// }
7284
7285}
7286
7287// method id "sql.instances.failover":
7288
7289type InstancesFailoverCall struct {
7290	s                        *Service
7291	project                  string
7292	instance                 string
7293	instancesfailoverrequest *InstancesFailoverRequest
7294	urlParams_               gensupport.URLParams
7295	ctx_                     context.Context
7296	header_                  http.Header
7297}
7298
7299// Failover: Initiates a manual failover of a high availability (HA)
7300// primary instance to a standby instance, which becomes the primary
7301// instance. Users are then rerouted to the new primary. For more
7302// information, see the Overview of high availability
7303// (https://cloud.google.com/sql/docs/mysql/high-availability) page in
7304// the Cloud SQL documentation. If using Legacy HA (MySQL only), this
7305// causes the instance to failover to its failover replica instance.
7306//
7307// - instance: Cloud SQL instance ID. This does not include the project
7308//   ID.
7309// - project: ID of the project that contains the read replica.
7310func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall {
7311	c := &InstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7312	c.project = project
7313	c.instance = instance
7314	c.instancesfailoverrequest = instancesfailoverrequest
7315	return c
7316}
7317
7318// Fields allows partial responses to be retrieved. See
7319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7320// for more information.
7321func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall {
7322	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7323	return c
7324}
7325
7326// Context sets the context to be used in this call's Do method. Any
7327// pending HTTP request will be aborted if the provided context is
7328// canceled.
7329func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall {
7330	c.ctx_ = ctx
7331	return c
7332}
7333
7334// Header returns an http.Header that can be modified by the caller to
7335// add HTTP headers to the request.
7336func (c *InstancesFailoverCall) Header() http.Header {
7337	if c.header_ == nil {
7338		c.header_ = make(http.Header)
7339	}
7340	return c.header_
7341}
7342
7343func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) {
7344	reqHeaders := make(http.Header)
7345	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7346	for k, v := range c.header_ {
7347		reqHeaders[k] = v
7348	}
7349	reqHeaders.Set("User-Agent", c.s.userAgent())
7350	var body io.Reader = nil
7351	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesfailoverrequest)
7352	if err != nil {
7353		return nil, err
7354	}
7355	reqHeaders.Set("Content-Type", "application/json")
7356	c.urlParams_.Set("alt", alt)
7357	c.urlParams_.Set("prettyPrint", "false")
7358	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/failover")
7359	urls += "?" + c.urlParams_.Encode()
7360	req, err := http.NewRequest("POST", urls, body)
7361	if err != nil {
7362		return nil, err
7363	}
7364	req.Header = reqHeaders
7365	googleapi.Expand(req.URL, map[string]string{
7366		"project":  c.project,
7367		"instance": c.instance,
7368	})
7369	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7370}
7371
7372// Do executes the "sql.instances.failover" call.
7373// Exactly one of *Operation or error will be non-nil. Any non-2xx
7374// status code is an error. Response headers are in either
7375// *Operation.ServerResponse.Header or (if a response was returned at
7376// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7377// to check whether the returned error was because
7378// http.StatusNotModified was returned.
7379func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7380	gensupport.SetOptions(c.urlParams_, opts...)
7381	res, err := c.doRequest("json")
7382	if res != nil && res.StatusCode == http.StatusNotModified {
7383		if res.Body != nil {
7384			res.Body.Close()
7385		}
7386		return nil, &googleapi.Error{
7387			Code:   res.StatusCode,
7388			Header: res.Header,
7389		}
7390	}
7391	if err != nil {
7392		return nil, err
7393	}
7394	defer googleapi.CloseBody(res)
7395	if err := googleapi.CheckResponse(res); err != nil {
7396		return nil, err
7397	}
7398	ret := &Operation{
7399		ServerResponse: googleapi.ServerResponse{
7400			Header:         res.Header,
7401			HTTPStatusCode: res.StatusCode,
7402		},
7403	}
7404	target := &ret
7405	if err := gensupport.DecodeResponse(target, res); err != nil {
7406		return nil, err
7407	}
7408	return ret, nil
7409	// {
7410	//   "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.",
7411	//   "flatPath": "v1/projects/{project}/instances/{instance}/failover",
7412	//   "httpMethod": "POST",
7413	//   "id": "sql.instances.failover",
7414	//   "parameterOrder": [
7415	//     "project",
7416	//     "instance"
7417	//   ],
7418	//   "parameters": {
7419	//     "instance": {
7420	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7421	//       "location": "path",
7422	//       "required": true,
7423	//       "type": "string"
7424	//     },
7425	//     "project": {
7426	//       "description": "ID of the project that contains the read replica.",
7427	//       "location": "path",
7428	//       "required": true,
7429	//       "type": "string"
7430	//     }
7431	//   },
7432	//   "path": "v1/projects/{project}/instances/{instance}/failover",
7433	//   "request": {
7434	//     "$ref": "InstancesFailoverRequest"
7435	//   },
7436	//   "response": {
7437	//     "$ref": "Operation"
7438	//   },
7439	//   "scopes": [
7440	//     "https://www.googleapis.com/auth/cloud-platform",
7441	//     "https://www.googleapis.com/auth/sqlservice.admin"
7442	//   ]
7443	// }
7444
7445}
7446
7447// method id "sql.instances.get":
7448
7449type InstancesGetCall struct {
7450	s            *Service
7451	project      string
7452	instance     string
7453	urlParams_   gensupport.URLParams
7454	ifNoneMatch_ string
7455	ctx_         context.Context
7456	header_      http.Header
7457}
7458
7459// Get: Retrieves a resource containing information about a Cloud SQL
7460// instance.
7461//
7462// - instance: Database instance ID. This does not include the project
7463//   ID.
7464// - project: Project ID of the project that contains the instance.
7465func (r *InstancesService) Get(project string, instance string) *InstancesGetCall {
7466	c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7467	c.project = project
7468	c.instance = instance
7469	return c
7470}
7471
7472// Fields allows partial responses to be retrieved. See
7473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7474// for more information.
7475func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
7476	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7477	return c
7478}
7479
7480// IfNoneMatch sets the optional parameter which makes the operation
7481// fail if the object's ETag matches the given value. This is useful for
7482// getting updates only after the object has changed since the last
7483// request. Use googleapi.IsNotModified to check whether the response
7484// error from Do is the result of In-None-Match.
7485func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
7486	c.ifNoneMatch_ = entityTag
7487	return c
7488}
7489
7490// Context sets the context to be used in this call's Do method. Any
7491// pending HTTP request will be aborted if the provided context is
7492// canceled.
7493func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
7494	c.ctx_ = ctx
7495	return c
7496}
7497
7498// Header returns an http.Header that can be modified by the caller to
7499// add HTTP headers to the request.
7500func (c *InstancesGetCall) Header() http.Header {
7501	if c.header_ == nil {
7502		c.header_ = make(http.Header)
7503	}
7504	return c.header_
7505}
7506
7507func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
7508	reqHeaders := make(http.Header)
7509	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7510	for k, v := range c.header_ {
7511		reqHeaders[k] = v
7512	}
7513	reqHeaders.Set("User-Agent", c.s.userAgent())
7514	if c.ifNoneMatch_ != "" {
7515		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7516	}
7517	var body io.Reader = nil
7518	c.urlParams_.Set("alt", alt)
7519	c.urlParams_.Set("prettyPrint", "false")
7520	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
7521	urls += "?" + c.urlParams_.Encode()
7522	req, err := http.NewRequest("GET", urls, body)
7523	if err != nil {
7524		return nil, err
7525	}
7526	req.Header = reqHeaders
7527	googleapi.Expand(req.URL, map[string]string{
7528		"project":  c.project,
7529		"instance": c.instance,
7530	})
7531	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7532}
7533
7534// Do executes the "sql.instances.get" call.
7535// Exactly one of *DatabaseInstance or error will be non-nil. Any
7536// non-2xx status code is an error. Response headers are in either
7537// *DatabaseInstance.ServerResponse.Header or (if a response was
7538// returned at all) in error.(*googleapi.Error).Header. Use
7539// googleapi.IsNotModified to check whether the returned error was
7540// because http.StatusNotModified was returned.
7541func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error) {
7542	gensupport.SetOptions(c.urlParams_, opts...)
7543	res, err := c.doRequest("json")
7544	if res != nil && res.StatusCode == http.StatusNotModified {
7545		if res.Body != nil {
7546			res.Body.Close()
7547		}
7548		return nil, &googleapi.Error{
7549			Code:   res.StatusCode,
7550			Header: res.Header,
7551		}
7552	}
7553	if err != nil {
7554		return nil, err
7555	}
7556	defer googleapi.CloseBody(res)
7557	if err := googleapi.CheckResponse(res); err != nil {
7558		return nil, err
7559	}
7560	ret := &DatabaseInstance{
7561		ServerResponse: googleapi.ServerResponse{
7562			Header:         res.Header,
7563			HTTPStatusCode: res.StatusCode,
7564		},
7565	}
7566	target := &ret
7567	if err := gensupport.DecodeResponse(target, res); err != nil {
7568		return nil, err
7569	}
7570	return ret, nil
7571	// {
7572	//   "description": "Retrieves a resource containing information about a Cloud SQL instance.",
7573	//   "flatPath": "v1/projects/{project}/instances/{instance}",
7574	//   "httpMethod": "GET",
7575	//   "id": "sql.instances.get",
7576	//   "parameterOrder": [
7577	//     "project",
7578	//     "instance"
7579	//   ],
7580	//   "parameters": {
7581	//     "instance": {
7582	//       "description": "Database instance ID. This does not include the project ID.",
7583	//       "location": "path",
7584	//       "required": true,
7585	//       "type": "string"
7586	//     },
7587	//     "project": {
7588	//       "description": "Project ID of the project that contains the instance.",
7589	//       "location": "path",
7590	//       "required": true,
7591	//       "type": "string"
7592	//     }
7593	//   },
7594	//   "path": "v1/projects/{project}/instances/{instance}",
7595	//   "response": {
7596	//     "$ref": "DatabaseInstance"
7597	//   },
7598	//   "scopes": [
7599	//     "https://www.googleapis.com/auth/cloud-platform",
7600	//     "https://www.googleapis.com/auth/sqlservice.admin"
7601	//   ]
7602	// }
7603
7604}
7605
7606// method id "sql.instances.import":
7607
7608type InstancesImportCall struct {
7609	s                      *Service
7610	project                string
7611	instance               string
7612	instancesimportrequest *InstancesImportRequest
7613	urlParams_             gensupport.URLParams
7614	ctx_                   context.Context
7615	header_                http.Header
7616}
7617
7618// Import: Imports data into a Cloud SQL instance from a SQL dump or CSV
7619// file in Cloud Storage.
7620//
7621// - instance: Cloud SQL instance ID. This does not include the project
7622//   ID.
7623// - project: Project ID of the project that contains the instance.
7624func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall {
7625	c := &InstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7626	c.project = project
7627	c.instance = instance
7628	c.instancesimportrequest = instancesimportrequest
7629	return c
7630}
7631
7632// Fields allows partial responses to be retrieved. See
7633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7634// for more information.
7635func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall {
7636	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7637	return c
7638}
7639
7640// Context sets the context to be used in this call's Do method. Any
7641// pending HTTP request will be aborted if the provided context is
7642// canceled.
7643func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall {
7644	c.ctx_ = ctx
7645	return c
7646}
7647
7648// Header returns an http.Header that can be modified by the caller to
7649// add HTTP headers to the request.
7650func (c *InstancesImportCall) Header() http.Header {
7651	if c.header_ == nil {
7652		c.header_ = make(http.Header)
7653	}
7654	return c.header_
7655}
7656
7657func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) {
7658	reqHeaders := make(http.Header)
7659	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7660	for k, v := range c.header_ {
7661		reqHeaders[k] = v
7662	}
7663	reqHeaders.Set("User-Agent", c.s.userAgent())
7664	var body io.Reader = nil
7665	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest)
7666	if err != nil {
7667		return nil, err
7668	}
7669	reqHeaders.Set("Content-Type", "application/json")
7670	c.urlParams_.Set("alt", alt)
7671	c.urlParams_.Set("prettyPrint", "false")
7672	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/import")
7673	urls += "?" + c.urlParams_.Encode()
7674	req, err := http.NewRequest("POST", urls, body)
7675	if err != nil {
7676		return nil, err
7677	}
7678	req.Header = reqHeaders
7679	googleapi.Expand(req.URL, map[string]string{
7680		"project":  c.project,
7681		"instance": c.instance,
7682	})
7683	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7684}
7685
7686// Do executes the "sql.instances.import" call.
7687// Exactly one of *Operation or error will be non-nil. Any non-2xx
7688// status code is an error. Response headers are in either
7689// *Operation.ServerResponse.Header or (if a response was returned at
7690// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7691// to check whether the returned error was because
7692// http.StatusNotModified was returned.
7693func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7694	gensupport.SetOptions(c.urlParams_, opts...)
7695	res, err := c.doRequest("json")
7696	if res != nil && res.StatusCode == http.StatusNotModified {
7697		if res.Body != nil {
7698			res.Body.Close()
7699		}
7700		return nil, &googleapi.Error{
7701			Code:   res.StatusCode,
7702			Header: res.Header,
7703		}
7704	}
7705	if err != nil {
7706		return nil, err
7707	}
7708	defer googleapi.CloseBody(res)
7709	if err := googleapi.CheckResponse(res); err != nil {
7710		return nil, err
7711	}
7712	ret := &Operation{
7713		ServerResponse: googleapi.ServerResponse{
7714			Header:         res.Header,
7715			HTTPStatusCode: res.StatusCode,
7716		},
7717	}
7718	target := &ret
7719	if err := gensupport.DecodeResponse(target, res); err != nil {
7720		return nil, err
7721	}
7722	return ret, nil
7723	// {
7724	//   "description": "Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.",
7725	//   "flatPath": "v1/projects/{project}/instances/{instance}/import",
7726	//   "httpMethod": "POST",
7727	//   "id": "sql.instances.import",
7728	//   "parameterOrder": [
7729	//     "project",
7730	//     "instance"
7731	//   ],
7732	//   "parameters": {
7733	//     "instance": {
7734	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7735	//       "location": "path",
7736	//       "required": true,
7737	//       "type": "string"
7738	//     },
7739	//     "project": {
7740	//       "description": "Project ID of the project that contains the instance.",
7741	//       "location": "path",
7742	//       "required": true,
7743	//       "type": "string"
7744	//     }
7745	//   },
7746	//   "path": "v1/projects/{project}/instances/{instance}/import",
7747	//   "request": {
7748	//     "$ref": "InstancesImportRequest"
7749	//   },
7750	//   "response": {
7751	//     "$ref": "Operation"
7752	//   },
7753	//   "scopes": [
7754	//     "https://www.googleapis.com/auth/cloud-platform"
7755	//   ]
7756	// }
7757
7758}
7759
7760// method id "sql.instances.insert":
7761
7762type InstancesInsertCall struct {
7763	s                *Service
7764	project          string
7765	databaseinstance *DatabaseInstance
7766	urlParams_       gensupport.URLParams
7767	ctx_             context.Context
7768	header_          http.Header
7769}
7770
7771// Insert: Creates a new Cloud SQL instance.
7772//
7773// - project: Project ID of the project to which the newly created Cloud
7774//   SQL instances should belong.
7775func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall {
7776	c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7777	c.project = project
7778	c.databaseinstance = databaseinstance
7779	return c
7780}
7781
7782// Fields allows partial responses to be retrieved. See
7783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7784// for more information.
7785func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
7786	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7787	return c
7788}
7789
7790// Context sets the context to be used in this call's Do method. Any
7791// pending HTTP request will be aborted if the provided context is
7792// canceled.
7793func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
7794	c.ctx_ = ctx
7795	return c
7796}
7797
7798// Header returns an http.Header that can be modified by the caller to
7799// add HTTP headers to the request.
7800func (c *InstancesInsertCall) Header() http.Header {
7801	if c.header_ == nil {
7802		c.header_ = make(http.Header)
7803	}
7804	return c.header_
7805}
7806
7807func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
7808	reqHeaders := make(http.Header)
7809	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7810	for k, v := range c.header_ {
7811		reqHeaders[k] = v
7812	}
7813	reqHeaders.Set("User-Agent", c.s.userAgent())
7814	var body io.Reader = nil
7815	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
7816	if err != nil {
7817		return nil, err
7818	}
7819	reqHeaders.Set("Content-Type", "application/json")
7820	c.urlParams_.Set("alt", alt)
7821	c.urlParams_.Set("prettyPrint", "false")
7822	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances")
7823	urls += "?" + c.urlParams_.Encode()
7824	req, err := http.NewRequest("POST", urls, body)
7825	if err != nil {
7826		return nil, err
7827	}
7828	req.Header = reqHeaders
7829	googleapi.Expand(req.URL, map[string]string{
7830		"project": c.project,
7831	})
7832	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7833}
7834
7835// Do executes the "sql.instances.insert" call.
7836// Exactly one of *Operation or error will be non-nil. Any non-2xx
7837// status code is an error. Response headers are in either
7838// *Operation.ServerResponse.Header or (if a response was returned at
7839// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7840// to check whether the returned error was because
7841// http.StatusNotModified was returned.
7842func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7843	gensupport.SetOptions(c.urlParams_, opts...)
7844	res, err := c.doRequest("json")
7845	if res != nil && res.StatusCode == http.StatusNotModified {
7846		if res.Body != nil {
7847			res.Body.Close()
7848		}
7849		return nil, &googleapi.Error{
7850			Code:   res.StatusCode,
7851			Header: res.Header,
7852		}
7853	}
7854	if err != nil {
7855		return nil, err
7856	}
7857	defer googleapi.CloseBody(res)
7858	if err := googleapi.CheckResponse(res); err != nil {
7859		return nil, err
7860	}
7861	ret := &Operation{
7862		ServerResponse: googleapi.ServerResponse{
7863			Header:         res.Header,
7864			HTTPStatusCode: res.StatusCode,
7865		},
7866	}
7867	target := &ret
7868	if err := gensupport.DecodeResponse(target, res); err != nil {
7869		return nil, err
7870	}
7871	return ret, nil
7872	// {
7873	//   "description": "Creates a new Cloud SQL instance.",
7874	//   "flatPath": "v1/projects/{project}/instances",
7875	//   "httpMethod": "POST",
7876	//   "id": "sql.instances.insert",
7877	//   "parameterOrder": [
7878	//     "project"
7879	//   ],
7880	//   "parameters": {
7881	//     "project": {
7882	//       "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.",
7883	//       "location": "path",
7884	//       "required": true,
7885	//       "type": "string"
7886	//     }
7887	//   },
7888	//   "path": "v1/projects/{project}/instances",
7889	//   "request": {
7890	//     "$ref": "DatabaseInstance"
7891	//   },
7892	//   "response": {
7893	//     "$ref": "Operation"
7894	//   },
7895	//   "scopes": [
7896	//     "https://www.googleapis.com/auth/cloud-platform",
7897	//     "https://www.googleapis.com/auth/sqlservice.admin"
7898	//   ]
7899	// }
7900
7901}
7902
7903// method id "sql.instances.list":
7904
7905type InstancesListCall struct {
7906	s            *Service
7907	project      string
7908	urlParams_   gensupport.URLParams
7909	ifNoneMatch_ string
7910	ctx_         context.Context
7911	header_      http.Header
7912}
7913
7914// List: Lists instances under a given project.
7915//
7916// - project: Project ID of the project for which to list Cloud SQL
7917//   instances.
7918func (r *InstancesService) List(project string) *InstancesListCall {
7919	c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7920	c.project = project
7921	return c
7922}
7923
7924// Filter sets the optional parameter "filter": A filter expression that
7925// filters resources listed in the response. The expression is in the
7926// form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'.
7927// Fields can be nested as needed as per their JSON representation, such
7928// as 'settings.userLabels.auto_start:true'. Multiple filter queries are
7929// space-separated. For example. 'state:RUNNABLE
7930// instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an
7931// AND expression. However, you can include AND and OR expressions
7932// explicitly.
7933func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
7934	c.urlParams_.Set("filter", filter)
7935	return c
7936}
7937
7938// MaxResults sets the optional parameter "maxResults": The maximum
7939// number of results to return per response.
7940func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
7941	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7942	return c
7943}
7944
7945// PageToken sets the optional parameter "pageToken": A
7946// previously-returned page token representing part of the larger set of
7947// results to view.
7948func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
7949	c.urlParams_.Set("pageToken", pageToken)
7950	return c
7951}
7952
7953// Fields allows partial responses to be retrieved. See
7954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7955// for more information.
7956func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
7957	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7958	return c
7959}
7960
7961// IfNoneMatch sets the optional parameter which makes the operation
7962// fail if the object's ETag matches the given value. This is useful for
7963// getting updates only after the object has changed since the last
7964// request. Use googleapi.IsNotModified to check whether the response
7965// error from Do is the result of In-None-Match.
7966func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
7967	c.ifNoneMatch_ = entityTag
7968	return c
7969}
7970
7971// Context sets the context to be used in this call's Do method. Any
7972// pending HTTP request will be aborted if the provided context is
7973// canceled.
7974func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
7975	c.ctx_ = ctx
7976	return c
7977}
7978
7979// Header returns an http.Header that can be modified by the caller to
7980// add HTTP headers to the request.
7981func (c *InstancesListCall) Header() http.Header {
7982	if c.header_ == nil {
7983		c.header_ = make(http.Header)
7984	}
7985	return c.header_
7986}
7987
7988func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
7989	reqHeaders := make(http.Header)
7990	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7991	for k, v := range c.header_ {
7992		reqHeaders[k] = v
7993	}
7994	reqHeaders.Set("User-Agent", c.s.userAgent())
7995	if c.ifNoneMatch_ != "" {
7996		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7997	}
7998	var body io.Reader = nil
7999	c.urlParams_.Set("alt", alt)
8000	c.urlParams_.Set("prettyPrint", "false")
8001	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances")
8002	urls += "?" + c.urlParams_.Encode()
8003	req, err := http.NewRequest("GET", urls, body)
8004	if err != nil {
8005		return nil, err
8006	}
8007	req.Header = reqHeaders
8008	googleapi.Expand(req.URL, map[string]string{
8009		"project": c.project,
8010	})
8011	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8012}
8013
8014// Do executes the "sql.instances.list" call.
8015// Exactly one of *InstancesListResponse or error will be non-nil. Any
8016// non-2xx status code is an error. Response headers are in either
8017// *InstancesListResponse.ServerResponse.Header or (if a response was
8018// returned at all) in error.(*googleapi.Error).Header. Use
8019// googleapi.IsNotModified to check whether the returned error was
8020// because http.StatusNotModified was returned.
8021func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error) {
8022	gensupport.SetOptions(c.urlParams_, opts...)
8023	res, err := c.doRequest("json")
8024	if res != nil && res.StatusCode == http.StatusNotModified {
8025		if res.Body != nil {
8026			res.Body.Close()
8027		}
8028		return nil, &googleapi.Error{
8029			Code:   res.StatusCode,
8030			Header: res.Header,
8031		}
8032	}
8033	if err != nil {
8034		return nil, err
8035	}
8036	defer googleapi.CloseBody(res)
8037	if err := googleapi.CheckResponse(res); err != nil {
8038		return nil, err
8039	}
8040	ret := &InstancesListResponse{
8041		ServerResponse: googleapi.ServerResponse{
8042			Header:         res.Header,
8043			HTTPStatusCode: res.StatusCode,
8044		},
8045	}
8046	target := &ret
8047	if err := gensupport.DecodeResponse(target, res); err != nil {
8048		return nil, err
8049	}
8050	return ret, nil
8051	// {
8052	//   "description": "Lists instances under a given project.",
8053	//   "flatPath": "v1/projects/{project}/instances",
8054	//   "httpMethod": "GET",
8055	//   "id": "sql.instances.list",
8056	//   "parameterOrder": [
8057	//     "project"
8058	//   ],
8059	//   "parameters": {
8060	//     "filter": {
8061	//       "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.",
8062	//       "location": "query",
8063	//       "type": "string"
8064	//     },
8065	//     "maxResults": {
8066	//       "description": "The maximum number of results to return per response.",
8067	//       "format": "uint32",
8068	//       "location": "query",
8069	//       "type": "integer"
8070	//     },
8071	//     "pageToken": {
8072	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
8073	//       "location": "query",
8074	//       "type": "string"
8075	//     },
8076	//     "project": {
8077	//       "description": "Project ID of the project for which to list Cloud SQL instances.",
8078	//       "location": "path",
8079	//       "required": true,
8080	//       "type": "string"
8081	//     }
8082	//   },
8083	//   "path": "v1/projects/{project}/instances",
8084	//   "response": {
8085	//     "$ref": "InstancesListResponse"
8086	//   },
8087	//   "scopes": [
8088	//     "https://www.googleapis.com/auth/cloud-platform",
8089	//     "https://www.googleapis.com/auth/sqlservice.admin"
8090	//   ]
8091	// }
8092
8093}
8094
8095// Pages invokes f for each page of results.
8096// A non-nil error returned from f will halt the iteration.
8097// The provided context supersedes any context provided to the Context method.
8098func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error {
8099	c.ctx_ = ctx
8100	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8101	for {
8102		x, err := c.Do()
8103		if err != nil {
8104			return err
8105		}
8106		if err := f(x); err != nil {
8107			return err
8108		}
8109		if x.NextPageToken == "" {
8110			return nil
8111		}
8112		c.PageToken(x.NextPageToken)
8113	}
8114}
8115
8116// method id "sql.instances.listServerCas":
8117
8118type InstancesListServerCasCall struct {
8119	s            *Service
8120	project      string
8121	instance     string
8122	urlParams_   gensupport.URLParams
8123	ifNoneMatch_ string
8124	ctx_         context.Context
8125	header_      http.Header
8126}
8127
8128// ListServerCas: Lists all of the trusted Certificate Authorities (CAs)
8129// for the specified instance. There can be up to three CAs listed: the
8130// CA that was used to sign the certificate that is currently in use, a
8131// CA that has been added but not yet used to sign a certificate, and a
8132// CA used to sign a certificate that has previously rotated out.
8133//
8134// - instance: Cloud SQL instance ID. This does not include the project
8135//   ID.
8136// - project: Project ID of the project that contains the instance.
8137func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall {
8138	c := &InstancesListServerCasCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8139	c.project = project
8140	c.instance = instance
8141	return c
8142}
8143
8144// Fields allows partial responses to be retrieved. See
8145// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8146// for more information.
8147func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall {
8148	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8149	return c
8150}
8151
8152// IfNoneMatch sets the optional parameter which makes the operation
8153// fail if the object's ETag matches the given value. This is useful for
8154// getting updates only after the object has changed since the last
8155// request. Use googleapi.IsNotModified to check whether the response
8156// error from Do is the result of In-None-Match.
8157func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall {
8158	c.ifNoneMatch_ = entityTag
8159	return c
8160}
8161
8162// Context sets the context to be used in this call's Do method. Any
8163// pending HTTP request will be aborted if the provided context is
8164// canceled.
8165func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall {
8166	c.ctx_ = ctx
8167	return c
8168}
8169
8170// Header returns an http.Header that can be modified by the caller to
8171// add HTTP headers to the request.
8172func (c *InstancesListServerCasCall) Header() http.Header {
8173	if c.header_ == nil {
8174		c.header_ = make(http.Header)
8175	}
8176	return c.header_
8177}
8178
8179func (c *InstancesListServerCasCall) doRequest(alt string) (*http.Response, error) {
8180	reqHeaders := make(http.Header)
8181	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8182	for k, v := range c.header_ {
8183		reqHeaders[k] = v
8184	}
8185	reqHeaders.Set("User-Agent", c.s.userAgent())
8186	if c.ifNoneMatch_ != "" {
8187		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8188	}
8189	var body io.Reader = nil
8190	c.urlParams_.Set("alt", alt)
8191	c.urlParams_.Set("prettyPrint", "false")
8192	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listServerCas")
8193	urls += "?" + c.urlParams_.Encode()
8194	req, err := http.NewRequest("GET", urls, body)
8195	if err != nil {
8196		return nil, err
8197	}
8198	req.Header = reqHeaders
8199	googleapi.Expand(req.URL, map[string]string{
8200		"project":  c.project,
8201		"instance": c.instance,
8202	})
8203	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8204}
8205
8206// Do executes the "sql.instances.listServerCas" call.
8207// Exactly one of *InstancesListServerCasResponse or error will be
8208// non-nil. Any non-2xx status code is an error. Response headers are in
8209// either *InstancesListServerCasResponse.ServerResponse.Header or (if a
8210// response was returned at all) in error.(*googleapi.Error).Header. Use
8211// googleapi.IsNotModified to check whether the returned error was
8212// because http.StatusNotModified was returned.
8213func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error) {
8214	gensupport.SetOptions(c.urlParams_, opts...)
8215	res, err := c.doRequest("json")
8216	if res != nil && res.StatusCode == http.StatusNotModified {
8217		if res.Body != nil {
8218			res.Body.Close()
8219		}
8220		return nil, &googleapi.Error{
8221			Code:   res.StatusCode,
8222			Header: res.Header,
8223		}
8224	}
8225	if err != nil {
8226		return nil, err
8227	}
8228	defer googleapi.CloseBody(res)
8229	if err := googleapi.CheckResponse(res); err != nil {
8230		return nil, err
8231	}
8232	ret := &InstancesListServerCasResponse{
8233		ServerResponse: googleapi.ServerResponse{
8234			Header:         res.Header,
8235			HTTPStatusCode: res.StatusCode,
8236		},
8237	}
8238	target := &ret
8239	if err := gensupport.DecodeResponse(target, res); err != nil {
8240		return nil, err
8241	}
8242	return ret, nil
8243	// {
8244	//   "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.",
8245	//   "flatPath": "v1/projects/{project}/instances/{instance}/listServerCas",
8246	//   "httpMethod": "GET",
8247	//   "id": "sql.instances.listServerCas",
8248	//   "parameterOrder": [
8249	//     "project",
8250	//     "instance"
8251	//   ],
8252	//   "parameters": {
8253	//     "instance": {
8254	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8255	//       "location": "path",
8256	//       "required": true,
8257	//       "type": "string"
8258	//     },
8259	//     "project": {
8260	//       "description": "Project ID of the project that contains the instance.",
8261	//       "location": "path",
8262	//       "required": true,
8263	//       "type": "string"
8264	//     }
8265	//   },
8266	//   "path": "v1/projects/{project}/instances/{instance}/listServerCas",
8267	//   "response": {
8268	//     "$ref": "InstancesListServerCasResponse"
8269	//   },
8270	//   "scopes": [
8271	//     "https://www.googleapis.com/auth/cloud-platform",
8272	//     "https://www.googleapis.com/auth/sqlservice.admin"
8273	//   ]
8274	// }
8275
8276}
8277
8278// method id "sql.instances.patch":
8279
8280type InstancesPatchCall struct {
8281	s                *Service
8282	project          string
8283	instance         string
8284	databaseinstance *DatabaseInstance
8285	urlParams_       gensupport.URLParams
8286	ctx_             context.Context
8287	header_          http.Header
8288}
8289
8290// Patch: Updates settings of a Cloud SQL instance. This method supports
8291// patch semantics.
8292//
8293// - instance: Cloud SQL instance ID. This does not include the project
8294//   ID.
8295// - project: Project ID of the project that contains the instance.
8296func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall {
8297	c := &InstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8298	c.project = project
8299	c.instance = instance
8300	c.databaseinstance = databaseinstance
8301	return c
8302}
8303
8304// Fields allows partial responses to be retrieved. See
8305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8306// for more information.
8307func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall {
8308	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8309	return c
8310}
8311
8312// Context sets the context to be used in this call's Do method. Any
8313// pending HTTP request will be aborted if the provided context is
8314// canceled.
8315func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall {
8316	c.ctx_ = ctx
8317	return c
8318}
8319
8320// Header returns an http.Header that can be modified by the caller to
8321// add HTTP headers to the request.
8322func (c *InstancesPatchCall) Header() http.Header {
8323	if c.header_ == nil {
8324		c.header_ = make(http.Header)
8325	}
8326	return c.header_
8327}
8328
8329func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) {
8330	reqHeaders := make(http.Header)
8331	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8332	for k, v := range c.header_ {
8333		reqHeaders[k] = v
8334	}
8335	reqHeaders.Set("User-Agent", c.s.userAgent())
8336	var body io.Reader = nil
8337	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
8338	if err != nil {
8339		return nil, err
8340	}
8341	reqHeaders.Set("Content-Type", "application/json")
8342	c.urlParams_.Set("alt", alt)
8343	c.urlParams_.Set("prettyPrint", "false")
8344	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
8345	urls += "?" + c.urlParams_.Encode()
8346	req, err := http.NewRequest("PATCH", urls, body)
8347	if err != nil {
8348		return nil, err
8349	}
8350	req.Header = reqHeaders
8351	googleapi.Expand(req.URL, map[string]string{
8352		"project":  c.project,
8353		"instance": c.instance,
8354	})
8355	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8356}
8357
8358// Do executes the "sql.instances.patch" call.
8359// Exactly one of *Operation or error will be non-nil. Any non-2xx
8360// status code is an error. Response headers are in either
8361// *Operation.ServerResponse.Header or (if a response was returned at
8362// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8363// to check whether the returned error was because
8364// http.StatusNotModified was returned.
8365func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8366	gensupport.SetOptions(c.urlParams_, opts...)
8367	res, err := c.doRequest("json")
8368	if res != nil && res.StatusCode == http.StatusNotModified {
8369		if res.Body != nil {
8370			res.Body.Close()
8371		}
8372		return nil, &googleapi.Error{
8373			Code:   res.StatusCode,
8374			Header: res.Header,
8375		}
8376	}
8377	if err != nil {
8378		return nil, err
8379	}
8380	defer googleapi.CloseBody(res)
8381	if err := googleapi.CheckResponse(res); err != nil {
8382		return nil, err
8383	}
8384	ret := &Operation{
8385		ServerResponse: googleapi.ServerResponse{
8386			Header:         res.Header,
8387			HTTPStatusCode: res.StatusCode,
8388		},
8389	}
8390	target := &ret
8391	if err := gensupport.DecodeResponse(target, res); err != nil {
8392		return nil, err
8393	}
8394	return ret, nil
8395	// {
8396	//   "description": "Updates settings of a Cloud SQL instance. This method supports patch semantics.",
8397	//   "flatPath": "v1/projects/{project}/instances/{instance}",
8398	//   "httpMethod": "PATCH",
8399	//   "id": "sql.instances.patch",
8400	//   "parameterOrder": [
8401	//     "project",
8402	//     "instance"
8403	//   ],
8404	//   "parameters": {
8405	//     "instance": {
8406	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8407	//       "location": "path",
8408	//       "required": true,
8409	//       "type": "string"
8410	//     },
8411	//     "project": {
8412	//       "description": "Project ID of the project that contains the instance.",
8413	//       "location": "path",
8414	//       "required": true,
8415	//       "type": "string"
8416	//     }
8417	//   },
8418	//   "path": "v1/projects/{project}/instances/{instance}",
8419	//   "request": {
8420	//     "$ref": "DatabaseInstance"
8421	//   },
8422	//   "response": {
8423	//     "$ref": "Operation"
8424	//   },
8425	//   "scopes": [
8426	//     "https://www.googleapis.com/auth/cloud-platform",
8427	//     "https://www.googleapis.com/auth/sqlservice.admin"
8428	//   ]
8429	// }
8430
8431}
8432
8433// method id "sql.instances.promoteReplica":
8434
8435type InstancesPromoteReplicaCall struct {
8436	s          *Service
8437	project    string
8438	instance   string
8439	urlParams_ gensupport.URLParams
8440	ctx_       context.Context
8441	header_    http.Header
8442}
8443
8444// PromoteReplica: Promotes the read replica instance to be a
8445// stand-alone Cloud SQL instance. Using this operation might cause your
8446// instance to restart.
8447//
8448// - instance: Cloud SQL read replica instance name.
8449// - project: ID of the project that contains the read replica.
8450func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall {
8451	c := &InstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8452	c.project = project
8453	c.instance = instance
8454	return c
8455}
8456
8457// Fields allows partial responses to be retrieved. See
8458// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8459// for more information.
8460func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall {
8461	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8462	return c
8463}
8464
8465// Context sets the context to be used in this call's Do method. Any
8466// pending HTTP request will be aborted if the provided context is
8467// canceled.
8468func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall {
8469	c.ctx_ = ctx
8470	return c
8471}
8472
8473// Header returns an http.Header that can be modified by the caller to
8474// add HTTP headers to the request.
8475func (c *InstancesPromoteReplicaCall) Header() http.Header {
8476	if c.header_ == nil {
8477		c.header_ = make(http.Header)
8478	}
8479	return c.header_
8480}
8481
8482func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
8483	reqHeaders := make(http.Header)
8484	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8485	for k, v := range c.header_ {
8486		reqHeaders[k] = v
8487	}
8488	reqHeaders.Set("User-Agent", c.s.userAgent())
8489	var body io.Reader = nil
8490	c.urlParams_.Set("alt", alt)
8491	c.urlParams_.Set("prettyPrint", "false")
8492	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/promoteReplica")
8493	urls += "?" + c.urlParams_.Encode()
8494	req, err := http.NewRequest("POST", urls, body)
8495	if err != nil {
8496		return nil, err
8497	}
8498	req.Header = reqHeaders
8499	googleapi.Expand(req.URL, map[string]string{
8500		"project":  c.project,
8501		"instance": c.instance,
8502	})
8503	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8504}
8505
8506// Do executes the "sql.instances.promoteReplica" call.
8507// Exactly one of *Operation or error will be non-nil. Any non-2xx
8508// status code is an error. Response headers are in either
8509// *Operation.ServerResponse.Header or (if a response was returned at
8510// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8511// to check whether the returned error was because
8512// http.StatusNotModified was returned.
8513func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8514	gensupport.SetOptions(c.urlParams_, opts...)
8515	res, err := c.doRequest("json")
8516	if res != nil && res.StatusCode == http.StatusNotModified {
8517		if res.Body != nil {
8518			res.Body.Close()
8519		}
8520		return nil, &googleapi.Error{
8521			Code:   res.StatusCode,
8522			Header: res.Header,
8523		}
8524	}
8525	if err != nil {
8526		return nil, err
8527	}
8528	defer googleapi.CloseBody(res)
8529	if err := googleapi.CheckResponse(res); err != nil {
8530		return nil, err
8531	}
8532	ret := &Operation{
8533		ServerResponse: googleapi.ServerResponse{
8534			Header:         res.Header,
8535			HTTPStatusCode: res.StatusCode,
8536		},
8537	}
8538	target := &ret
8539	if err := gensupport.DecodeResponse(target, res); err != nil {
8540		return nil, err
8541	}
8542	return ret, nil
8543	// {
8544	//   "description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.",
8545	//   "flatPath": "v1/projects/{project}/instances/{instance}/promoteReplica",
8546	//   "httpMethod": "POST",
8547	//   "id": "sql.instances.promoteReplica",
8548	//   "parameterOrder": [
8549	//     "project",
8550	//     "instance"
8551	//   ],
8552	//   "parameters": {
8553	//     "instance": {
8554	//       "description": "Cloud SQL read replica instance name.",
8555	//       "location": "path",
8556	//       "required": true,
8557	//       "type": "string"
8558	//     },
8559	//     "project": {
8560	//       "description": "ID of the project that contains the read replica.",
8561	//       "location": "path",
8562	//       "required": true,
8563	//       "type": "string"
8564	//     }
8565	//   },
8566	//   "path": "v1/projects/{project}/instances/{instance}/promoteReplica",
8567	//   "response": {
8568	//     "$ref": "Operation"
8569	//   },
8570	//   "scopes": [
8571	//     "https://www.googleapis.com/auth/cloud-platform",
8572	//     "https://www.googleapis.com/auth/sqlservice.admin"
8573	//   ]
8574	// }
8575
8576}
8577
8578// method id "sql.instances.resetSslConfig":
8579
8580type InstancesResetSslConfigCall struct {
8581	s          *Service
8582	project    string
8583	instance   string
8584	urlParams_ gensupport.URLParams
8585	ctx_       context.Context
8586	header_    http.Header
8587}
8588
8589// ResetSslConfig: Deletes all client certificates and generates a new
8590// server SSL certificate for the instance.
8591//
8592// - instance: Cloud SQL instance ID. This does not include the project
8593//   ID.
8594// - project: Project ID of the project that contains the instance.
8595func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall {
8596	c := &InstancesResetSslConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8597	c.project = project
8598	c.instance = instance
8599	return c
8600}
8601
8602// Fields allows partial responses to be retrieved. See
8603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8604// for more information.
8605func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall {
8606	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8607	return c
8608}
8609
8610// Context sets the context to be used in this call's Do method. Any
8611// pending HTTP request will be aborted if the provided context is
8612// canceled.
8613func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall {
8614	c.ctx_ = ctx
8615	return c
8616}
8617
8618// Header returns an http.Header that can be modified by the caller to
8619// add HTTP headers to the request.
8620func (c *InstancesResetSslConfigCall) Header() http.Header {
8621	if c.header_ == nil {
8622		c.header_ = make(http.Header)
8623	}
8624	return c.header_
8625}
8626
8627func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) {
8628	reqHeaders := make(http.Header)
8629	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8630	for k, v := range c.header_ {
8631		reqHeaders[k] = v
8632	}
8633	reqHeaders.Set("User-Agent", c.s.userAgent())
8634	var body io.Reader = nil
8635	c.urlParams_.Set("alt", alt)
8636	c.urlParams_.Set("prettyPrint", "false")
8637	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/resetSslConfig")
8638	urls += "?" + c.urlParams_.Encode()
8639	req, err := http.NewRequest("POST", urls, body)
8640	if err != nil {
8641		return nil, err
8642	}
8643	req.Header = reqHeaders
8644	googleapi.Expand(req.URL, map[string]string{
8645		"project":  c.project,
8646		"instance": c.instance,
8647	})
8648	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8649}
8650
8651// Do executes the "sql.instances.resetSslConfig" call.
8652// Exactly one of *Operation or error will be non-nil. Any non-2xx
8653// status code is an error. Response headers are in either
8654// *Operation.ServerResponse.Header or (if a response was returned at
8655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8656// to check whether the returned error was because
8657// http.StatusNotModified was returned.
8658func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8659	gensupport.SetOptions(c.urlParams_, opts...)
8660	res, err := c.doRequest("json")
8661	if res != nil && res.StatusCode == http.StatusNotModified {
8662		if res.Body != nil {
8663			res.Body.Close()
8664		}
8665		return nil, &googleapi.Error{
8666			Code:   res.StatusCode,
8667			Header: res.Header,
8668		}
8669	}
8670	if err != nil {
8671		return nil, err
8672	}
8673	defer googleapi.CloseBody(res)
8674	if err := googleapi.CheckResponse(res); err != nil {
8675		return nil, err
8676	}
8677	ret := &Operation{
8678		ServerResponse: googleapi.ServerResponse{
8679			Header:         res.Header,
8680			HTTPStatusCode: res.StatusCode,
8681		},
8682	}
8683	target := &ret
8684	if err := gensupport.DecodeResponse(target, res); err != nil {
8685		return nil, err
8686	}
8687	return ret, nil
8688	// {
8689	//   "description": "Deletes all client certificates and generates a new server SSL certificate for the instance.",
8690	//   "flatPath": "v1/projects/{project}/instances/{instance}/resetSslConfig",
8691	//   "httpMethod": "POST",
8692	//   "id": "sql.instances.resetSslConfig",
8693	//   "parameterOrder": [
8694	//     "project",
8695	//     "instance"
8696	//   ],
8697	//   "parameters": {
8698	//     "instance": {
8699	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8700	//       "location": "path",
8701	//       "required": true,
8702	//       "type": "string"
8703	//     },
8704	//     "project": {
8705	//       "description": "Project ID of the project that contains the instance.",
8706	//       "location": "path",
8707	//       "required": true,
8708	//       "type": "string"
8709	//     }
8710	//   },
8711	//   "path": "v1/projects/{project}/instances/{instance}/resetSslConfig",
8712	//   "response": {
8713	//     "$ref": "Operation"
8714	//   },
8715	//   "scopes": [
8716	//     "https://www.googleapis.com/auth/cloud-platform",
8717	//     "https://www.googleapis.com/auth/sqlservice.admin"
8718	//   ]
8719	// }
8720
8721}
8722
8723// method id "sql.instances.restart":
8724
8725type InstancesRestartCall struct {
8726	s          *Service
8727	project    string
8728	instance   string
8729	urlParams_ gensupport.URLParams
8730	ctx_       context.Context
8731	header_    http.Header
8732}
8733
8734// Restart: Restarts a Cloud SQL instance.
8735//
8736// - instance: Cloud SQL instance ID. This does not include the project
8737//   ID.
8738// - project: Project ID of the project that contains the instance to be
8739//   restarted.
8740func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall {
8741	c := &InstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8742	c.project = project
8743	c.instance = instance
8744	return c
8745}
8746
8747// Fields allows partial responses to be retrieved. See
8748// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8749// for more information.
8750func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall {
8751	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8752	return c
8753}
8754
8755// Context sets the context to be used in this call's Do method. Any
8756// pending HTTP request will be aborted if the provided context is
8757// canceled.
8758func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall {
8759	c.ctx_ = ctx
8760	return c
8761}
8762
8763// Header returns an http.Header that can be modified by the caller to
8764// add HTTP headers to the request.
8765func (c *InstancesRestartCall) Header() http.Header {
8766	if c.header_ == nil {
8767		c.header_ = make(http.Header)
8768	}
8769	return c.header_
8770}
8771
8772func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) {
8773	reqHeaders := make(http.Header)
8774	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8775	for k, v := range c.header_ {
8776		reqHeaders[k] = v
8777	}
8778	reqHeaders.Set("User-Agent", c.s.userAgent())
8779	var body io.Reader = nil
8780	c.urlParams_.Set("alt", alt)
8781	c.urlParams_.Set("prettyPrint", "false")
8782	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restart")
8783	urls += "?" + c.urlParams_.Encode()
8784	req, err := http.NewRequest("POST", urls, body)
8785	if err != nil {
8786		return nil, err
8787	}
8788	req.Header = reqHeaders
8789	googleapi.Expand(req.URL, map[string]string{
8790		"project":  c.project,
8791		"instance": c.instance,
8792	})
8793	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8794}
8795
8796// Do executes the "sql.instances.restart" call.
8797// Exactly one of *Operation or error will be non-nil. Any non-2xx
8798// status code is an error. Response headers are in either
8799// *Operation.ServerResponse.Header or (if a response was returned at
8800// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8801// to check whether the returned error was because
8802// http.StatusNotModified was returned.
8803func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8804	gensupport.SetOptions(c.urlParams_, opts...)
8805	res, err := c.doRequest("json")
8806	if res != nil && res.StatusCode == http.StatusNotModified {
8807		if res.Body != nil {
8808			res.Body.Close()
8809		}
8810		return nil, &googleapi.Error{
8811			Code:   res.StatusCode,
8812			Header: res.Header,
8813		}
8814	}
8815	if err != nil {
8816		return nil, err
8817	}
8818	defer googleapi.CloseBody(res)
8819	if err := googleapi.CheckResponse(res); err != nil {
8820		return nil, err
8821	}
8822	ret := &Operation{
8823		ServerResponse: googleapi.ServerResponse{
8824			Header:         res.Header,
8825			HTTPStatusCode: res.StatusCode,
8826		},
8827	}
8828	target := &ret
8829	if err := gensupport.DecodeResponse(target, res); err != nil {
8830		return nil, err
8831	}
8832	return ret, nil
8833	// {
8834	//   "description": "Restarts a Cloud SQL instance.",
8835	//   "flatPath": "v1/projects/{project}/instances/{instance}/restart",
8836	//   "httpMethod": "POST",
8837	//   "id": "sql.instances.restart",
8838	//   "parameterOrder": [
8839	//     "project",
8840	//     "instance"
8841	//   ],
8842	//   "parameters": {
8843	//     "instance": {
8844	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8845	//       "location": "path",
8846	//       "required": true,
8847	//       "type": "string"
8848	//     },
8849	//     "project": {
8850	//       "description": "Project ID of the project that contains the instance to be restarted.",
8851	//       "location": "path",
8852	//       "required": true,
8853	//       "type": "string"
8854	//     }
8855	//   },
8856	//   "path": "v1/projects/{project}/instances/{instance}/restart",
8857	//   "response": {
8858	//     "$ref": "Operation"
8859	//   },
8860	//   "scopes": [
8861	//     "https://www.googleapis.com/auth/cloud-platform",
8862	//     "https://www.googleapis.com/auth/sqlservice.admin"
8863	//   ]
8864	// }
8865
8866}
8867
8868// method id "sql.instances.restoreBackup":
8869
8870type InstancesRestoreBackupCall struct {
8871	s                             *Service
8872	project                       string
8873	instance                      string
8874	instancesrestorebackuprequest *InstancesRestoreBackupRequest
8875	urlParams_                    gensupport.URLParams
8876	ctx_                          context.Context
8877	header_                       http.Header
8878}
8879
8880// RestoreBackup: Restores a backup of a Cloud SQL instance. Using this
8881// operation might cause your instance to restart.
8882//
8883// - instance: Cloud SQL instance ID. This does not include the project
8884//   ID.
8885// - project: Project ID of the project that contains the instance.
8886func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall {
8887	c := &InstancesRestoreBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8888	c.project = project
8889	c.instance = instance
8890	c.instancesrestorebackuprequest = instancesrestorebackuprequest
8891	return c
8892}
8893
8894// Fields allows partial responses to be retrieved. See
8895// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8896// for more information.
8897func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall {
8898	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8899	return c
8900}
8901
8902// Context sets the context to be used in this call's Do method. Any
8903// pending HTTP request will be aborted if the provided context is
8904// canceled.
8905func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall {
8906	c.ctx_ = ctx
8907	return c
8908}
8909
8910// Header returns an http.Header that can be modified by the caller to
8911// add HTTP headers to the request.
8912func (c *InstancesRestoreBackupCall) Header() http.Header {
8913	if c.header_ == nil {
8914		c.header_ = make(http.Header)
8915	}
8916	return c.header_
8917}
8918
8919func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) {
8920	reqHeaders := make(http.Header)
8921	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8922	for k, v := range c.header_ {
8923		reqHeaders[k] = v
8924	}
8925	reqHeaders.Set("User-Agent", c.s.userAgent())
8926	var body io.Reader = nil
8927	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrestorebackuprequest)
8928	if err != nil {
8929		return nil, err
8930	}
8931	reqHeaders.Set("Content-Type", "application/json")
8932	c.urlParams_.Set("alt", alt)
8933	c.urlParams_.Set("prettyPrint", "false")
8934	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restoreBackup")
8935	urls += "?" + c.urlParams_.Encode()
8936	req, err := http.NewRequest("POST", urls, body)
8937	if err != nil {
8938		return nil, err
8939	}
8940	req.Header = reqHeaders
8941	googleapi.Expand(req.URL, map[string]string{
8942		"project":  c.project,
8943		"instance": c.instance,
8944	})
8945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8946}
8947
8948// Do executes the "sql.instances.restoreBackup" call.
8949// Exactly one of *Operation or error will be non-nil. Any non-2xx
8950// status code is an error. Response headers are in either
8951// *Operation.ServerResponse.Header or (if a response was returned at
8952// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8953// to check whether the returned error was because
8954// http.StatusNotModified was returned.
8955func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8956	gensupport.SetOptions(c.urlParams_, opts...)
8957	res, err := c.doRequest("json")
8958	if res != nil && res.StatusCode == http.StatusNotModified {
8959		if res.Body != nil {
8960			res.Body.Close()
8961		}
8962		return nil, &googleapi.Error{
8963			Code:   res.StatusCode,
8964			Header: res.Header,
8965		}
8966	}
8967	if err != nil {
8968		return nil, err
8969	}
8970	defer googleapi.CloseBody(res)
8971	if err := googleapi.CheckResponse(res); err != nil {
8972		return nil, err
8973	}
8974	ret := &Operation{
8975		ServerResponse: googleapi.ServerResponse{
8976			Header:         res.Header,
8977			HTTPStatusCode: res.StatusCode,
8978		},
8979	}
8980	target := &ret
8981	if err := gensupport.DecodeResponse(target, res); err != nil {
8982		return nil, err
8983	}
8984	return ret, nil
8985	// {
8986	//   "description": "Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.",
8987	//   "flatPath": "v1/projects/{project}/instances/{instance}/restoreBackup",
8988	//   "httpMethod": "POST",
8989	//   "id": "sql.instances.restoreBackup",
8990	//   "parameterOrder": [
8991	//     "project",
8992	//     "instance"
8993	//   ],
8994	//   "parameters": {
8995	//     "instance": {
8996	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8997	//       "location": "path",
8998	//       "required": true,
8999	//       "type": "string"
9000	//     },
9001	//     "project": {
9002	//       "description": "Project ID of the project that contains the instance.",
9003	//       "location": "path",
9004	//       "required": true,
9005	//       "type": "string"
9006	//     }
9007	//   },
9008	//   "path": "v1/projects/{project}/instances/{instance}/restoreBackup",
9009	//   "request": {
9010	//     "$ref": "InstancesRestoreBackupRequest"
9011	//   },
9012	//   "response": {
9013	//     "$ref": "Operation"
9014	//   },
9015	//   "scopes": [
9016	//     "https://www.googleapis.com/auth/cloud-platform",
9017	//     "https://www.googleapis.com/auth/sqlservice.admin"
9018	//   ]
9019	// }
9020
9021}
9022
9023// method id "sql.instances.rotateServerCa":
9024
9025type InstancesRotateServerCaCall struct {
9026	s                              *Service
9027	project                        string
9028	instance                       string
9029	instancesrotateservercarequest *InstancesRotateServerCaRequest
9030	urlParams_                     gensupport.URLParams
9031	ctx_                           context.Context
9032	header_                        http.Header
9033}
9034
9035// RotateServerCa: Rotates the server certificate to one signed by the
9036// Certificate Authority (CA) version previously added with the
9037// addServerCA method.
9038//
9039// - instance: Cloud SQL instance ID. This does not include the project
9040//   ID.
9041// - project: Project ID of the project that contains the instance.
9042func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall {
9043	c := &InstancesRotateServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9044	c.project = project
9045	c.instance = instance
9046	c.instancesrotateservercarequest = instancesrotateservercarequest
9047	return c
9048}
9049
9050// Fields allows partial responses to be retrieved. See
9051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9052// for more information.
9053func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall {
9054	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9055	return c
9056}
9057
9058// Context sets the context to be used in this call's Do method. Any
9059// pending HTTP request will be aborted if the provided context is
9060// canceled.
9061func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall {
9062	c.ctx_ = ctx
9063	return c
9064}
9065
9066// Header returns an http.Header that can be modified by the caller to
9067// add HTTP headers to the request.
9068func (c *InstancesRotateServerCaCall) Header() http.Header {
9069	if c.header_ == nil {
9070		c.header_ = make(http.Header)
9071	}
9072	return c.header_
9073}
9074
9075func (c *InstancesRotateServerCaCall) doRequest(alt string) (*http.Response, error) {
9076	reqHeaders := make(http.Header)
9077	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9078	for k, v := range c.header_ {
9079		reqHeaders[k] = v
9080	}
9081	reqHeaders.Set("User-Agent", c.s.userAgent())
9082	var body io.Reader = nil
9083	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrotateservercarequest)
9084	if err != nil {
9085		return nil, err
9086	}
9087	reqHeaders.Set("Content-Type", "application/json")
9088	c.urlParams_.Set("alt", alt)
9089	c.urlParams_.Set("prettyPrint", "false")
9090	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateServerCa")
9091	urls += "?" + c.urlParams_.Encode()
9092	req, err := http.NewRequest("POST", urls, body)
9093	if err != nil {
9094		return nil, err
9095	}
9096	req.Header = reqHeaders
9097	googleapi.Expand(req.URL, map[string]string{
9098		"project":  c.project,
9099		"instance": c.instance,
9100	})
9101	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9102}
9103
9104// Do executes the "sql.instances.rotateServerCa" call.
9105// Exactly one of *Operation or error will be non-nil. Any non-2xx
9106// status code is an error. Response headers are in either
9107// *Operation.ServerResponse.Header or (if a response was returned at
9108// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9109// to check whether the returned error was because
9110// http.StatusNotModified was returned.
9111func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9112	gensupport.SetOptions(c.urlParams_, opts...)
9113	res, err := c.doRequest("json")
9114	if res != nil && res.StatusCode == http.StatusNotModified {
9115		if res.Body != nil {
9116			res.Body.Close()
9117		}
9118		return nil, &googleapi.Error{
9119			Code:   res.StatusCode,
9120			Header: res.Header,
9121		}
9122	}
9123	if err != nil {
9124		return nil, err
9125	}
9126	defer googleapi.CloseBody(res)
9127	if err := googleapi.CheckResponse(res); err != nil {
9128		return nil, err
9129	}
9130	ret := &Operation{
9131		ServerResponse: googleapi.ServerResponse{
9132			Header:         res.Header,
9133			HTTPStatusCode: res.StatusCode,
9134		},
9135	}
9136	target := &ret
9137	if err := gensupport.DecodeResponse(target, res); err != nil {
9138		return nil, err
9139	}
9140	return ret, nil
9141	// {
9142	//   "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.",
9143	//   "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCa",
9144	//   "httpMethod": "POST",
9145	//   "id": "sql.instances.rotateServerCa",
9146	//   "parameterOrder": [
9147	//     "project",
9148	//     "instance"
9149	//   ],
9150	//   "parameters": {
9151	//     "instance": {
9152	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9153	//       "location": "path",
9154	//       "required": true,
9155	//       "type": "string"
9156	//     },
9157	//     "project": {
9158	//       "description": "Project ID of the project that contains the instance.",
9159	//       "location": "path",
9160	//       "required": true,
9161	//       "type": "string"
9162	//     }
9163	//   },
9164	//   "path": "v1/projects/{project}/instances/{instance}/rotateServerCa",
9165	//   "request": {
9166	//     "$ref": "InstancesRotateServerCaRequest"
9167	//   },
9168	//   "response": {
9169	//     "$ref": "Operation"
9170	//   },
9171	//   "scopes": [
9172	//     "https://www.googleapis.com/auth/cloud-platform",
9173	//     "https://www.googleapis.com/auth/sqlservice.admin"
9174	//   ]
9175	// }
9176
9177}
9178
9179// method id "sql.instances.startReplica":
9180
9181type InstancesStartReplicaCall struct {
9182	s          *Service
9183	project    string
9184	instance   string
9185	urlParams_ gensupport.URLParams
9186	ctx_       context.Context
9187	header_    http.Header
9188}
9189
9190// StartReplica: Starts the replication in the read replica instance.
9191//
9192// - instance: Cloud SQL read replica instance name.
9193// - project: ID of the project that contains the read replica.
9194func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall {
9195	c := &InstancesStartReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9196	c.project = project
9197	c.instance = instance
9198	return c
9199}
9200
9201// Fields allows partial responses to be retrieved. See
9202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9203// for more information.
9204func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall {
9205	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9206	return c
9207}
9208
9209// Context sets the context to be used in this call's Do method. Any
9210// pending HTTP request will be aborted if the provided context is
9211// canceled.
9212func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall {
9213	c.ctx_ = ctx
9214	return c
9215}
9216
9217// Header returns an http.Header that can be modified by the caller to
9218// add HTTP headers to the request.
9219func (c *InstancesStartReplicaCall) Header() http.Header {
9220	if c.header_ == nil {
9221		c.header_ = make(http.Header)
9222	}
9223	return c.header_
9224}
9225
9226func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) {
9227	reqHeaders := make(http.Header)
9228	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9229	for k, v := range c.header_ {
9230		reqHeaders[k] = v
9231	}
9232	reqHeaders.Set("User-Agent", c.s.userAgent())
9233	var body io.Reader = nil
9234	c.urlParams_.Set("alt", alt)
9235	c.urlParams_.Set("prettyPrint", "false")
9236	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startReplica")
9237	urls += "?" + c.urlParams_.Encode()
9238	req, err := http.NewRequest("POST", urls, body)
9239	if err != nil {
9240		return nil, err
9241	}
9242	req.Header = reqHeaders
9243	googleapi.Expand(req.URL, map[string]string{
9244		"project":  c.project,
9245		"instance": c.instance,
9246	})
9247	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9248}
9249
9250// Do executes the "sql.instances.startReplica" call.
9251// Exactly one of *Operation or error will be non-nil. Any non-2xx
9252// status code is an error. Response headers are in either
9253// *Operation.ServerResponse.Header or (if a response was returned at
9254// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9255// to check whether the returned error was because
9256// http.StatusNotModified was returned.
9257func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9258	gensupport.SetOptions(c.urlParams_, opts...)
9259	res, err := c.doRequest("json")
9260	if res != nil && res.StatusCode == http.StatusNotModified {
9261		if res.Body != nil {
9262			res.Body.Close()
9263		}
9264		return nil, &googleapi.Error{
9265			Code:   res.StatusCode,
9266			Header: res.Header,
9267		}
9268	}
9269	if err != nil {
9270		return nil, err
9271	}
9272	defer googleapi.CloseBody(res)
9273	if err := googleapi.CheckResponse(res); err != nil {
9274		return nil, err
9275	}
9276	ret := &Operation{
9277		ServerResponse: googleapi.ServerResponse{
9278			Header:         res.Header,
9279			HTTPStatusCode: res.StatusCode,
9280		},
9281	}
9282	target := &ret
9283	if err := gensupport.DecodeResponse(target, res); err != nil {
9284		return nil, err
9285	}
9286	return ret, nil
9287	// {
9288	//   "description": "Starts the replication in the read replica instance.",
9289	//   "flatPath": "v1/projects/{project}/instances/{instance}/startReplica",
9290	//   "httpMethod": "POST",
9291	//   "id": "sql.instances.startReplica",
9292	//   "parameterOrder": [
9293	//     "project",
9294	//     "instance"
9295	//   ],
9296	//   "parameters": {
9297	//     "instance": {
9298	//       "description": "Cloud SQL read replica instance name.",
9299	//       "location": "path",
9300	//       "required": true,
9301	//       "type": "string"
9302	//     },
9303	//     "project": {
9304	//       "description": "ID of the project that contains the read replica.",
9305	//       "location": "path",
9306	//       "required": true,
9307	//       "type": "string"
9308	//     }
9309	//   },
9310	//   "path": "v1/projects/{project}/instances/{instance}/startReplica",
9311	//   "response": {
9312	//     "$ref": "Operation"
9313	//   },
9314	//   "scopes": [
9315	//     "https://www.googleapis.com/auth/cloud-platform",
9316	//     "https://www.googleapis.com/auth/sqlservice.admin"
9317	//   ]
9318	// }
9319
9320}
9321
9322// method id "sql.instances.stopReplica":
9323
9324type InstancesStopReplicaCall struct {
9325	s          *Service
9326	project    string
9327	instance   string
9328	urlParams_ gensupport.URLParams
9329	ctx_       context.Context
9330	header_    http.Header
9331}
9332
9333// StopReplica: Stops the replication in the read replica instance.
9334//
9335// - instance: Cloud SQL read replica instance name.
9336// - project: ID of the project that contains the read replica.
9337func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall {
9338	c := &InstancesStopReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9339	c.project = project
9340	c.instance = instance
9341	return c
9342}
9343
9344// Fields allows partial responses to be retrieved. See
9345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9346// for more information.
9347func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall {
9348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9349	return c
9350}
9351
9352// Context sets the context to be used in this call's Do method. Any
9353// pending HTTP request will be aborted if the provided context is
9354// canceled.
9355func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall {
9356	c.ctx_ = ctx
9357	return c
9358}
9359
9360// Header returns an http.Header that can be modified by the caller to
9361// add HTTP headers to the request.
9362func (c *InstancesStopReplicaCall) Header() http.Header {
9363	if c.header_ == nil {
9364		c.header_ = make(http.Header)
9365	}
9366	return c.header_
9367}
9368
9369func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) {
9370	reqHeaders := make(http.Header)
9371	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9372	for k, v := range c.header_ {
9373		reqHeaders[k] = v
9374	}
9375	reqHeaders.Set("User-Agent", c.s.userAgent())
9376	var body io.Reader = nil
9377	c.urlParams_.Set("alt", alt)
9378	c.urlParams_.Set("prettyPrint", "false")
9379	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/stopReplica")
9380	urls += "?" + c.urlParams_.Encode()
9381	req, err := http.NewRequest("POST", urls, body)
9382	if err != nil {
9383		return nil, err
9384	}
9385	req.Header = reqHeaders
9386	googleapi.Expand(req.URL, map[string]string{
9387		"project":  c.project,
9388		"instance": c.instance,
9389	})
9390	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9391}
9392
9393// Do executes the "sql.instances.stopReplica" call.
9394// Exactly one of *Operation or error will be non-nil. Any non-2xx
9395// status code is an error. Response headers are in either
9396// *Operation.ServerResponse.Header or (if a response was returned at
9397// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9398// to check whether the returned error was because
9399// http.StatusNotModified was returned.
9400func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9401	gensupport.SetOptions(c.urlParams_, opts...)
9402	res, err := c.doRequest("json")
9403	if res != nil && res.StatusCode == http.StatusNotModified {
9404		if res.Body != nil {
9405			res.Body.Close()
9406		}
9407		return nil, &googleapi.Error{
9408			Code:   res.StatusCode,
9409			Header: res.Header,
9410		}
9411	}
9412	if err != nil {
9413		return nil, err
9414	}
9415	defer googleapi.CloseBody(res)
9416	if err := googleapi.CheckResponse(res); err != nil {
9417		return nil, err
9418	}
9419	ret := &Operation{
9420		ServerResponse: googleapi.ServerResponse{
9421			Header:         res.Header,
9422			HTTPStatusCode: res.StatusCode,
9423		},
9424	}
9425	target := &ret
9426	if err := gensupport.DecodeResponse(target, res); err != nil {
9427		return nil, err
9428	}
9429	return ret, nil
9430	// {
9431	//   "description": "Stops the replication in the read replica instance.",
9432	//   "flatPath": "v1/projects/{project}/instances/{instance}/stopReplica",
9433	//   "httpMethod": "POST",
9434	//   "id": "sql.instances.stopReplica",
9435	//   "parameterOrder": [
9436	//     "project",
9437	//     "instance"
9438	//   ],
9439	//   "parameters": {
9440	//     "instance": {
9441	//       "description": "Cloud SQL read replica instance name.",
9442	//       "location": "path",
9443	//       "required": true,
9444	//       "type": "string"
9445	//     },
9446	//     "project": {
9447	//       "description": "ID of the project that contains the read replica.",
9448	//       "location": "path",
9449	//       "required": true,
9450	//       "type": "string"
9451	//     }
9452	//   },
9453	//   "path": "v1/projects/{project}/instances/{instance}/stopReplica",
9454	//   "response": {
9455	//     "$ref": "Operation"
9456	//   },
9457	//   "scopes": [
9458	//     "https://www.googleapis.com/auth/cloud-platform",
9459	//     "https://www.googleapis.com/auth/sqlservice.admin"
9460	//   ]
9461	// }
9462
9463}
9464
9465// method id "sql.instances.truncateLog":
9466
9467type InstancesTruncateLogCall struct {
9468	s                           *Service
9469	project                     string
9470	instance                    string
9471	instancestruncatelogrequest *InstancesTruncateLogRequest
9472	urlParams_                  gensupport.URLParams
9473	ctx_                        context.Context
9474	header_                     http.Header
9475}
9476
9477// TruncateLog: Truncate MySQL general and slow query log tables MySQL
9478// only.
9479//
9480// - instance: Cloud SQL instance ID. This does not include the project
9481//   ID.
9482// - project: Project ID of the Cloud SQL project.
9483func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall {
9484	c := &InstancesTruncateLogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9485	c.project = project
9486	c.instance = instance
9487	c.instancestruncatelogrequest = instancestruncatelogrequest
9488	return c
9489}
9490
9491// Fields allows partial responses to be retrieved. See
9492// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9493// for more information.
9494func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall {
9495	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9496	return c
9497}
9498
9499// Context sets the context to be used in this call's Do method. Any
9500// pending HTTP request will be aborted if the provided context is
9501// canceled.
9502func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall {
9503	c.ctx_ = ctx
9504	return c
9505}
9506
9507// Header returns an http.Header that can be modified by the caller to
9508// add HTTP headers to the request.
9509func (c *InstancesTruncateLogCall) Header() http.Header {
9510	if c.header_ == nil {
9511		c.header_ = make(http.Header)
9512	}
9513	return c.header_
9514}
9515
9516func (c *InstancesTruncateLogCall) doRequest(alt string) (*http.Response, error) {
9517	reqHeaders := make(http.Header)
9518	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9519	for k, v := range c.header_ {
9520		reqHeaders[k] = v
9521	}
9522	reqHeaders.Set("User-Agent", c.s.userAgent())
9523	var body io.Reader = nil
9524	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancestruncatelogrequest)
9525	if err != nil {
9526		return nil, err
9527	}
9528	reqHeaders.Set("Content-Type", "application/json")
9529	c.urlParams_.Set("alt", alt)
9530	c.urlParams_.Set("prettyPrint", "false")
9531	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/truncateLog")
9532	urls += "?" + c.urlParams_.Encode()
9533	req, err := http.NewRequest("POST", urls, body)
9534	if err != nil {
9535		return nil, err
9536	}
9537	req.Header = reqHeaders
9538	googleapi.Expand(req.URL, map[string]string{
9539		"project":  c.project,
9540		"instance": c.instance,
9541	})
9542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9543}
9544
9545// Do executes the "sql.instances.truncateLog" call.
9546// Exactly one of *Operation or error will be non-nil. Any non-2xx
9547// status code is an error. Response headers are in either
9548// *Operation.ServerResponse.Header or (if a response was returned at
9549// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9550// to check whether the returned error was because
9551// http.StatusNotModified was returned.
9552func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9553	gensupport.SetOptions(c.urlParams_, opts...)
9554	res, err := c.doRequest("json")
9555	if res != nil && res.StatusCode == http.StatusNotModified {
9556		if res.Body != nil {
9557			res.Body.Close()
9558		}
9559		return nil, &googleapi.Error{
9560			Code:   res.StatusCode,
9561			Header: res.Header,
9562		}
9563	}
9564	if err != nil {
9565		return nil, err
9566	}
9567	defer googleapi.CloseBody(res)
9568	if err := googleapi.CheckResponse(res); err != nil {
9569		return nil, err
9570	}
9571	ret := &Operation{
9572		ServerResponse: googleapi.ServerResponse{
9573			Header:         res.Header,
9574			HTTPStatusCode: res.StatusCode,
9575		},
9576	}
9577	target := &ret
9578	if err := gensupport.DecodeResponse(target, res); err != nil {
9579		return nil, err
9580	}
9581	return ret, nil
9582	// {
9583	//   "description": "Truncate MySQL general and slow query log tables MySQL only.",
9584	//   "flatPath": "v1/projects/{project}/instances/{instance}/truncateLog",
9585	//   "httpMethod": "POST",
9586	//   "id": "sql.instances.truncateLog",
9587	//   "parameterOrder": [
9588	//     "project",
9589	//     "instance"
9590	//   ],
9591	//   "parameters": {
9592	//     "instance": {
9593	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9594	//       "location": "path",
9595	//       "required": true,
9596	//       "type": "string"
9597	//     },
9598	//     "project": {
9599	//       "description": "Project ID of the Cloud SQL project.",
9600	//       "location": "path",
9601	//       "required": true,
9602	//       "type": "string"
9603	//     }
9604	//   },
9605	//   "path": "v1/projects/{project}/instances/{instance}/truncateLog",
9606	//   "request": {
9607	//     "$ref": "InstancesTruncateLogRequest"
9608	//   },
9609	//   "response": {
9610	//     "$ref": "Operation"
9611	//   },
9612	//   "scopes": [
9613	//     "https://www.googleapis.com/auth/cloud-platform",
9614	//     "https://www.googleapis.com/auth/sqlservice.admin"
9615	//   ]
9616	// }
9617
9618}
9619
9620// method id "sql.instances.update":
9621
9622type InstancesUpdateCall struct {
9623	s                *Service
9624	project          string
9625	instance         string
9626	databaseinstance *DatabaseInstance
9627	urlParams_       gensupport.URLParams
9628	ctx_             context.Context
9629	header_          http.Header
9630}
9631
9632// Update: Updates settings of a Cloud SQL instance. Using this
9633// operation might cause your instance to restart.
9634//
9635// - instance: Cloud SQL instance ID. This does not include the project
9636//   ID.
9637// - project: Project ID of the project that contains the instance.
9638func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall {
9639	c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9640	c.project = project
9641	c.instance = instance
9642	c.databaseinstance = databaseinstance
9643	return c
9644}
9645
9646// Fields allows partial responses to be retrieved. See
9647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9648// for more information.
9649func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall {
9650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9651	return c
9652}
9653
9654// Context sets the context to be used in this call's Do method. Any
9655// pending HTTP request will be aborted if the provided context is
9656// canceled.
9657func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall {
9658	c.ctx_ = ctx
9659	return c
9660}
9661
9662// Header returns an http.Header that can be modified by the caller to
9663// add HTTP headers to the request.
9664func (c *InstancesUpdateCall) Header() http.Header {
9665	if c.header_ == nil {
9666		c.header_ = make(http.Header)
9667	}
9668	return c.header_
9669}
9670
9671func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
9672	reqHeaders := make(http.Header)
9673	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9674	for k, v := range c.header_ {
9675		reqHeaders[k] = v
9676	}
9677	reqHeaders.Set("User-Agent", c.s.userAgent())
9678	var body io.Reader = nil
9679	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
9680	if err != nil {
9681		return nil, err
9682	}
9683	reqHeaders.Set("Content-Type", "application/json")
9684	c.urlParams_.Set("alt", alt)
9685	c.urlParams_.Set("prettyPrint", "false")
9686	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
9687	urls += "?" + c.urlParams_.Encode()
9688	req, err := http.NewRequest("PUT", urls, body)
9689	if err != nil {
9690		return nil, err
9691	}
9692	req.Header = reqHeaders
9693	googleapi.Expand(req.URL, map[string]string{
9694		"project":  c.project,
9695		"instance": c.instance,
9696	})
9697	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9698}
9699
9700// Do executes the "sql.instances.update" call.
9701// Exactly one of *Operation or error will be non-nil. Any non-2xx
9702// status code is an error. Response headers are in either
9703// *Operation.ServerResponse.Header or (if a response was returned at
9704// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9705// to check whether the returned error was because
9706// http.StatusNotModified was returned.
9707func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9708	gensupport.SetOptions(c.urlParams_, opts...)
9709	res, err := c.doRequest("json")
9710	if res != nil && res.StatusCode == http.StatusNotModified {
9711		if res.Body != nil {
9712			res.Body.Close()
9713		}
9714		return nil, &googleapi.Error{
9715			Code:   res.StatusCode,
9716			Header: res.Header,
9717		}
9718	}
9719	if err != nil {
9720		return nil, err
9721	}
9722	defer googleapi.CloseBody(res)
9723	if err := googleapi.CheckResponse(res); err != nil {
9724		return nil, err
9725	}
9726	ret := &Operation{
9727		ServerResponse: googleapi.ServerResponse{
9728			Header:         res.Header,
9729			HTTPStatusCode: res.StatusCode,
9730		},
9731	}
9732	target := &ret
9733	if err := gensupport.DecodeResponse(target, res); err != nil {
9734		return nil, err
9735	}
9736	return ret, nil
9737	// {
9738	//   "description": "Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.",
9739	//   "flatPath": "v1/projects/{project}/instances/{instance}",
9740	//   "httpMethod": "PUT",
9741	//   "id": "sql.instances.update",
9742	//   "parameterOrder": [
9743	//     "project",
9744	//     "instance"
9745	//   ],
9746	//   "parameters": {
9747	//     "instance": {
9748	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9749	//       "location": "path",
9750	//       "required": true,
9751	//       "type": "string"
9752	//     },
9753	//     "project": {
9754	//       "description": "Project ID of the project that contains the instance.",
9755	//       "location": "path",
9756	//       "required": true,
9757	//       "type": "string"
9758	//     }
9759	//   },
9760	//   "path": "v1/projects/{project}/instances/{instance}",
9761	//   "request": {
9762	//     "$ref": "DatabaseInstance"
9763	//   },
9764	//   "response": {
9765	//     "$ref": "Operation"
9766	//   },
9767	//   "scopes": [
9768	//     "https://www.googleapis.com/auth/cloud-platform",
9769	//     "https://www.googleapis.com/auth/sqlservice.admin"
9770	//   ]
9771	// }
9772
9773}
9774
9775// method id "sql.operations.get":
9776
9777type OperationsGetCall struct {
9778	s            *Service
9779	project      string
9780	operation    string
9781	urlParams_   gensupport.URLParams
9782	ifNoneMatch_ string
9783	ctx_         context.Context
9784	header_      http.Header
9785}
9786
9787// Get: Retrieves an instance operation that has been performed on an
9788// instance.
9789//
9790// - operation: Instance operation ID.
9791// - project: Project ID of the project that contains the instance.
9792func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
9793	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9794	c.project = project
9795	c.operation = operation
9796	return c
9797}
9798
9799// Fields allows partial responses to be retrieved. See
9800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9801// for more information.
9802func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
9803	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9804	return c
9805}
9806
9807// IfNoneMatch sets the optional parameter which makes the operation
9808// fail if the object's ETag matches the given value. This is useful for
9809// getting updates only after the object has changed since the last
9810// request. Use googleapi.IsNotModified to check whether the response
9811// error from Do is the result of In-None-Match.
9812func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
9813	c.ifNoneMatch_ = entityTag
9814	return c
9815}
9816
9817// Context sets the context to be used in this call's Do method. Any
9818// pending HTTP request will be aborted if the provided context is
9819// canceled.
9820func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
9821	c.ctx_ = ctx
9822	return c
9823}
9824
9825// Header returns an http.Header that can be modified by the caller to
9826// add HTTP headers to the request.
9827func (c *OperationsGetCall) Header() http.Header {
9828	if c.header_ == nil {
9829		c.header_ = make(http.Header)
9830	}
9831	return c.header_
9832}
9833
9834func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
9835	reqHeaders := make(http.Header)
9836	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9837	for k, v := range c.header_ {
9838		reqHeaders[k] = v
9839	}
9840	reqHeaders.Set("User-Agent", c.s.userAgent())
9841	if c.ifNoneMatch_ != "" {
9842		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9843	}
9844	var body io.Reader = nil
9845	c.urlParams_.Set("alt", alt)
9846	c.urlParams_.Set("prettyPrint", "false")
9847	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations/{operation}")
9848	urls += "?" + c.urlParams_.Encode()
9849	req, err := http.NewRequest("GET", urls, body)
9850	if err != nil {
9851		return nil, err
9852	}
9853	req.Header = reqHeaders
9854	googleapi.Expand(req.URL, map[string]string{
9855		"project":   c.project,
9856		"operation": c.operation,
9857	})
9858	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9859}
9860
9861// Do executes the "sql.operations.get" call.
9862// Exactly one of *Operation or error will be non-nil. Any non-2xx
9863// status code is an error. Response headers are in either
9864// *Operation.ServerResponse.Header or (if a response was returned at
9865// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9866// to check whether the returned error was because
9867// http.StatusNotModified was returned.
9868func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9869	gensupport.SetOptions(c.urlParams_, opts...)
9870	res, err := c.doRequest("json")
9871	if res != nil && res.StatusCode == http.StatusNotModified {
9872		if res.Body != nil {
9873			res.Body.Close()
9874		}
9875		return nil, &googleapi.Error{
9876			Code:   res.StatusCode,
9877			Header: res.Header,
9878		}
9879	}
9880	if err != nil {
9881		return nil, err
9882	}
9883	defer googleapi.CloseBody(res)
9884	if err := googleapi.CheckResponse(res); err != nil {
9885		return nil, err
9886	}
9887	ret := &Operation{
9888		ServerResponse: googleapi.ServerResponse{
9889			Header:         res.Header,
9890			HTTPStatusCode: res.StatusCode,
9891		},
9892	}
9893	target := &ret
9894	if err := gensupport.DecodeResponse(target, res); err != nil {
9895		return nil, err
9896	}
9897	return ret, nil
9898	// {
9899	//   "description": "Retrieves an instance operation that has been performed on an instance.",
9900	//   "flatPath": "v1/projects/{project}/operations/{operation}",
9901	//   "httpMethod": "GET",
9902	//   "id": "sql.operations.get",
9903	//   "parameterOrder": [
9904	//     "project",
9905	//     "operation"
9906	//   ],
9907	//   "parameters": {
9908	//     "operation": {
9909	//       "description": "Instance operation ID.",
9910	//       "location": "path",
9911	//       "required": true,
9912	//       "type": "string"
9913	//     },
9914	//     "project": {
9915	//       "description": "Project ID of the project that contains the instance.",
9916	//       "location": "path",
9917	//       "required": true,
9918	//       "type": "string"
9919	//     }
9920	//   },
9921	//   "path": "v1/projects/{project}/operations/{operation}",
9922	//   "response": {
9923	//     "$ref": "Operation"
9924	//   },
9925	//   "scopes": [
9926	//     "https://www.googleapis.com/auth/cloud-platform",
9927	//     "https://www.googleapis.com/auth/sqlservice.admin"
9928	//   ]
9929	// }
9930
9931}
9932
9933// method id "sql.operations.list":
9934
9935type OperationsListCall struct {
9936	s            *Service
9937	project      string
9938	urlParams_   gensupport.URLParams
9939	ifNoneMatch_ string
9940	ctx_         context.Context
9941	header_      http.Header
9942}
9943
9944// List: Lists all instance operations that have been performed on the
9945// given Cloud SQL instance in the reverse chronological order of the
9946// start time.
9947//
9948// - project: Project ID of the project that contains the instance.
9949func (r *OperationsService) List(project string) *OperationsListCall {
9950	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9951	c.project = project
9952	return c
9953}
9954
9955// Instance sets the optional parameter "instance": Cloud SQL instance
9956// ID. This does not include the project ID.
9957func (c *OperationsListCall) Instance(instance string) *OperationsListCall {
9958	c.urlParams_.Set("instance", instance)
9959	return c
9960}
9961
9962// MaxResults sets the optional parameter "maxResults": Maximum number
9963// of operations per response.
9964func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
9965	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9966	return c
9967}
9968
9969// PageToken sets the optional parameter "pageToken": A
9970// previously-returned page token representing part of the larger set of
9971// results to view.
9972func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
9973	c.urlParams_.Set("pageToken", pageToken)
9974	return c
9975}
9976
9977// Fields allows partial responses to be retrieved. See
9978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9979// for more information.
9980func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
9981	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9982	return c
9983}
9984
9985// IfNoneMatch sets the optional parameter which makes the operation
9986// fail if the object's ETag matches the given value. This is useful for
9987// getting updates only after the object has changed since the last
9988// request. Use googleapi.IsNotModified to check whether the response
9989// error from Do is the result of In-None-Match.
9990func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
9991	c.ifNoneMatch_ = entityTag
9992	return c
9993}
9994
9995// Context sets the context to be used in this call's Do method. Any
9996// pending HTTP request will be aborted if the provided context is
9997// canceled.
9998func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
9999	c.ctx_ = ctx
10000	return c
10001}
10002
10003// Header returns an http.Header that can be modified by the caller to
10004// add HTTP headers to the request.
10005func (c *OperationsListCall) Header() http.Header {
10006	if c.header_ == nil {
10007		c.header_ = make(http.Header)
10008	}
10009	return c.header_
10010}
10011
10012func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
10013	reqHeaders := make(http.Header)
10014	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10015	for k, v := range c.header_ {
10016		reqHeaders[k] = v
10017	}
10018	reqHeaders.Set("User-Agent", c.s.userAgent())
10019	if c.ifNoneMatch_ != "" {
10020		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10021	}
10022	var body io.Reader = nil
10023	c.urlParams_.Set("alt", alt)
10024	c.urlParams_.Set("prettyPrint", "false")
10025	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations")
10026	urls += "?" + c.urlParams_.Encode()
10027	req, err := http.NewRequest("GET", urls, body)
10028	if err != nil {
10029		return nil, err
10030	}
10031	req.Header = reqHeaders
10032	googleapi.Expand(req.URL, map[string]string{
10033		"project": c.project,
10034	})
10035	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10036}
10037
10038// Do executes the "sql.operations.list" call.
10039// Exactly one of *OperationsListResponse or error will be non-nil. Any
10040// non-2xx status code is an error. Response headers are in either
10041// *OperationsListResponse.ServerResponse.Header or (if a response was
10042// returned at all) in error.(*googleapi.Error).Header. Use
10043// googleapi.IsNotModified to check whether the returned error was
10044// because http.StatusNotModified was returned.
10045func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
10046	gensupport.SetOptions(c.urlParams_, opts...)
10047	res, err := c.doRequest("json")
10048	if res != nil && res.StatusCode == http.StatusNotModified {
10049		if res.Body != nil {
10050			res.Body.Close()
10051		}
10052		return nil, &googleapi.Error{
10053			Code:   res.StatusCode,
10054			Header: res.Header,
10055		}
10056	}
10057	if err != nil {
10058		return nil, err
10059	}
10060	defer googleapi.CloseBody(res)
10061	if err := googleapi.CheckResponse(res); err != nil {
10062		return nil, err
10063	}
10064	ret := &OperationsListResponse{
10065		ServerResponse: googleapi.ServerResponse{
10066			Header:         res.Header,
10067			HTTPStatusCode: res.StatusCode,
10068		},
10069	}
10070	target := &ret
10071	if err := gensupport.DecodeResponse(target, res); err != nil {
10072		return nil, err
10073	}
10074	return ret, nil
10075	// {
10076	//   "description": "Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.",
10077	//   "flatPath": "v1/projects/{project}/operations",
10078	//   "httpMethod": "GET",
10079	//   "id": "sql.operations.list",
10080	//   "parameterOrder": [
10081	//     "project"
10082	//   ],
10083	//   "parameters": {
10084	//     "instance": {
10085	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10086	//       "location": "query",
10087	//       "type": "string"
10088	//     },
10089	//     "maxResults": {
10090	//       "description": "Maximum number of operations per response.",
10091	//       "format": "uint32",
10092	//       "location": "query",
10093	//       "type": "integer"
10094	//     },
10095	//     "pageToken": {
10096	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
10097	//       "location": "query",
10098	//       "type": "string"
10099	//     },
10100	//     "project": {
10101	//       "description": "Project ID of the project that contains the instance.",
10102	//       "location": "path",
10103	//       "required": true,
10104	//       "type": "string"
10105	//     }
10106	//   },
10107	//   "path": "v1/projects/{project}/operations",
10108	//   "response": {
10109	//     "$ref": "OperationsListResponse"
10110	//   },
10111	//   "scopes": [
10112	//     "https://www.googleapis.com/auth/cloud-platform",
10113	//     "https://www.googleapis.com/auth/sqlservice.admin"
10114	//   ]
10115	// }
10116
10117}
10118
10119// Pages invokes f for each page of results.
10120// A non-nil error returned from f will halt the iteration.
10121// The provided context supersedes any context provided to the Context method.
10122func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
10123	c.ctx_ = ctx
10124	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10125	for {
10126		x, err := c.Do()
10127		if err != nil {
10128			return err
10129		}
10130		if err := f(x); err != nil {
10131			return err
10132		}
10133		if x.NextPageToken == "" {
10134			return nil
10135		}
10136		c.PageToken(x.NextPageToken)
10137	}
10138}
10139
10140// method id "sql.projects.instances.rescheduleMaintenance":
10141
10142type ProjectsInstancesRescheduleMaintenanceCall struct {
10143	s                                            *Service
10144	project                                      string
10145	instance                                     string
10146	sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody
10147	urlParams_                                   gensupport.URLParams
10148	ctx_                                         context.Context
10149	header_                                      http.Header
10150}
10151
10152// RescheduleMaintenance: Reschedules the maintenance on the given
10153// instance.
10154//
10155// - instance: Cloud SQL instance ID. This does not include the project
10156//   ID.
10157// - project: ID of the project that contains the instance.
10158func (r *ProjectsInstancesService) RescheduleMaintenance(project string, instance string, sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody) *ProjectsInstancesRescheduleMaintenanceCall {
10159	c := &ProjectsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10160	c.project = project
10161	c.instance = instance
10162	c.sqlinstancesreschedulemaintenancerequestbody = sqlinstancesreschedulemaintenancerequestbody
10163	return c
10164}
10165
10166// Fields allows partial responses to be retrieved. See
10167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10168// for more information.
10169func (c *ProjectsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesRescheduleMaintenanceCall {
10170	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10171	return c
10172}
10173
10174// Context sets the context to be used in this call's Do method. Any
10175// pending HTTP request will be aborted if the provided context is
10176// canceled.
10177func (c *ProjectsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsInstancesRescheduleMaintenanceCall {
10178	c.ctx_ = ctx
10179	return c
10180}
10181
10182// Header returns an http.Header that can be modified by the caller to
10183// add HTTP headers to the request.
10184func (c *ProjectsInstancesRescheduleMaintenanceCall) Header() http.Header {
10185	if c.header_ == nil {
10186		c.header_ = make(http.Header)
10187	}
10188	return c.header_
10189}
10190
10191func (c *ProjectsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) {
10192	reqHeaders := make(http.Header)
10193	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10194	for k, v := range c.header_ {
10195		reqHeaders[k] = v
10196	}
10197	reqHeaders.Set("User-Agent", c.s.userAgent())
10198	var body io.Reader = nil
10199	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesreschedulemaintenancerequestbody)
10200	if err != nil {
10201		return nil, err
10202	}
10203	reqHeaders.Set("Content-Type", "application/json")
10204	c.urlParams_.Set("alt", alt)
10205	c.urlParams_.Set("prettyPrint", "false")
10206	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rescheduleMaintenance")
10207	urls += "?" + c.urlParams_.Encode()
10208	req, err := http.NewRequest("POST", urls, body)
10209	if err != nil {
10210		return nil, err
10211	}
10212	req.Header = reqHeaders
10213	googleapi.Expand(req.URL, map[string]string{
10214		"project":  c.project,
10215		"instance": c.instance,
10216	})
10217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10218}
10219
10220// Do executes the "sql.projects.instances.rescheduleMaintenance" call.
10221// Exactly one of *Operation or error will be non-nil. Any non-2xx
10222// status code is an error. Response headers are in either
10223// *Operation.ServerResponse.Header or (if a response was returned at
10224// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10225// to check whether the returned error was because
10226// http.StatusNotModified was returned.
10227func (c *ProjectsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10228	gensupport.SetOptions(c.urlParams_, opts...)
10229	res, err := c.doRequest("json")
10230	if res != nil && res.StatusCode == http.StatusNotModified {
10231		if res.Body != nil {
10232			res.Body.Close()
10233		}
10234		return nil, &googleapi.Error{
10235			Code:   res.StatusCode,
10236			Header: res.Header,
10237		}
10238	}
10239	if err != nil {
10240		return nil, err
10241	}
10242	defer googleapi.CloseBody(res)
10243	if err := googleapi.CheckResponse(res); err != nil {
10244		return nil, err
10245	}
10246	ret := &Operation{
10247		ServerResponse: googleapi.ServerResponse{
10248			Header:         res.Header,
10249			HTTPStatusCode: res.StatusCode,
10250		},
10251	}
10252	target := &ret
10253	if err := gensupport.DecodeResponse(target, res); err != nil {
10254		return nil, err
10255	}
10256	return ret, nil
10257	// {
10258	//   "description": "Reschedules the maintenance on the given instance.",
10259	//   "flatPath": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance",
10260	//   "httpMethod": "POST",
10261	//   "id": "sql.projects.instances.rescheduleMaintenance",
10262	//   "parameterOrder": [
10263	//     "project",
10264	//     "instance"
10265	//   ],
10266	//   "parameters": {
10267	//     "instance": {
10268	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10269	//       "location": "path",
10270	//       "required": true,
10271	//       "type": "string"
10272	//     },
10273	//     "project": {
10274	//       "description": "ID of the project that contains the instance.",
10275	//       "location": "path",
10276	//       "required": true,
10277	//       "type": "string"
10278	//     }
10279	//   },
10280	//   "path": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance",
10281	//   "request": {
10282	//     "$ref": "SqlInstancesRescheduleMaintenanceRequestBody"
10283	//   },
10284	//   "response": {
10285	//     "$ref": "Operation"
10286	//   },
10287	//   "scopes": [
10288	//     "https://www.googleapis.com/auth/cloud-platform",
10289	//     "https://www.googleapis.com/auth/sqlservice.admin"
10290	//   ]
10291	// }
10292
10293}
10294
10295// method id "sql.projects.instances.startExternalSync":
10296
10297type ProjectsInstancesStartExternalSyncCall struct {
10298	s                                    *Service
10299	project                              string
10300	instance                             string
10301	sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest
10302	urlParams_                           gensupport.URLParams
10303	ctx_                                 context.Context
10304	header_                              http.Header
10305}
10306
10307// StartExternalSync: Start External primary instance migration.
10308//
10309// - instance: Cloud SQL instance ID. This does not include the project
10310//   ID.
10311// - project: ID of the project that contains the instance.
10312func (r *ProjectsInstancesService) StartExternalSync(project string, instance string, sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest) *ProjectsInstancesStartExternalSyncCall {
10313	c := &ProjectsInstancesStartExternalSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10314	c.project = project
10315	c.instance = instance
10316	c.sqlinstancesstartexternalsyncrequest = sqlinstancesstartexternalsyncrequest
10317	return c
10318}
10319
10320// Fields allows partial responses to be retrieved. See
10321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10322// for more information.
10323func (c *ProjectsInstancesStartExternalSyncCall) Fields(s ...googleapi.Field) *ProjectsInstancesStartExternalSyncCall {
10324	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10325	return c
10326}
10327
10328// Context sets the context to be used in this call's Do method. Any
10329// pending HTTP request will be aborted if the provided context is
10330// canceled.
10331func (c *ProjectsInstancesStartExternalSyncCall) Context(ctx context.Context) *ProjectsInstancesStartExternalSyncCall {
10332	c.ctx_ = ctx
10333	return c
10334}
10335
10336// Header returns an http.Header that can be modified by the caller to
10337// add HTTP headers to the request.
10338func (c *ProjectsInstancesStartExternalSyncCall) Header() http.Header {
10339	if c.header_ == nil {
10340		c.header_ = make(http.Header)
10341	}
10342	return c.header_
10343}
10344
10345func (c *ProjectsInstancesStartExternalSyncCall) doRequest(alt string) (*http.Response, error) {
10346	reqHeaders := make(http.Header)
10347	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10348	for k, v := range c.header_ {
10349		reqHeaders[k] = v
10350	}
10351	reqHeaders.Set("User-Agent", c.s.userAgent())
10352	var body io.Reader = nil
10353	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesstartexternalsyncrequest)
10354	if err != nil {
10355		return nil, err
10356	}
10357	reqHeaders.Set("Content-Type", "application/json")
10358	c.urlParams_.Set("alt", alt)
10359	c.urlParams_.Set("prettyPrint", "false")
10360	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startExternalSync")
10361	urls += "?" + c.urlParams_.Encode()
10362	req, err := http.NewRequest("POST", urls, body)
10363	if err != nil {
10364		return nil, err
10365	}
10366	req.Header = reqHeaders
10367	googleapi.Expand(req.URL, map[string]string{
10368		"project":  c.project,
10369		"instance": c.instance,
10370	})
10371	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10372}
10373
10374// Do executes the "sql.projects.instances.startExternalSync" call.
10375// Exactly one of *Operation or error will be non-nil. Any non-2xx
10376// status code is an error. Response headers are in either
10377// *Operation.ServerResponse.Header or (if a response was returned at
10378// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10379// to check whether the returned error was because
10380// http.StatusNotModified was returned.
10381func (c *ProjectsInstancesStartExternalSyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10382	gensupport.SetOptions(c.urlParams_, opts...)
10383	res, err := c.doRequest("json")
10384	if res != nil && res.StatusCode == http.StatusNotModified {
10385		if res.Body != nil {
10386			res.Body.Close()
10387		}
10388		return nil, &googleapi.Error{
10389			Code:   res.StatusCode,
10390			Header: res.Header,
10391		}
10392	}
10393	if err != nil {
10394		return nil, err
10395	}
10396	defer googleapi.CloseBody(res)
10397	if err := googleapi.CheckResponse(res); err != nil {
10398		return nil, err
10399	}
10400	ret := &Operation{
10401		ServerResponse: googleapi.ServerResponse{
10402			Header:         res.Header,
10403			HTTPStatusCode: res.StatusCode,
10404		},
10405	}
10406	target := &ret
10407	if err := gensupport.DecodeResponse(target, res); err != nil {
10408		return nil, err
10409	}
10410	return ret, nil
10411	// {
10412	//   "description": "Start External primary instance migration.",
10413	//   "flatPath": "v1/projects/{project}/instances/{instance}/startExternalSync",
10414	//   "httpMethod": "POST",
10415	//   "id": "sql.projects.instances.startExternalSync",
10416	//   "parameterOrder": [
10417	//     "project",
10418	//     "instance"
10419	//   ],
10420	//   "parameters": {
10421	//     "instance": {
10422	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10423	//       "location": "path",
10424	//       "required": true,
10425	//       "type": "string"
10426	//     },
10427	//     "project": {
10428	//       "description": "ID of the project that contains the instance.",
10429	//       "location": "path",
10430	//       "required": true,
10431	//       "type": "string"
10432	//     }
10433	//   },
10434	//   "path": "v1/projects/{project}/instances/{instance}/startExternalSync",
10435	//   "request": {
10436	//     "$ref": "SqlInstancesStartExternalSyncRequest"
10437	//   },
10438	//   "response": {
10439	//     "$ref": "Operation"
10440	//   },
10441	//   "scopes": [
10442	//     "https://www.googleapis.com/auth/cloud-platform",
10443	//     "https://www.googleapis.com/auth/sqlservice.admin"
10444	//   ]
10445	// }
10446
10447}
10448
10449// method id "sql.projects.instances.verifyExternalSyncSettings":
10450
10451type ProjectsInstancesVerifyExternalSyncSettingsCall struct {
10452	s                                             *Service
10453	project                                       string
10454	instance                                      string
10455	sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest
10456	urlParams_                                    gensupport.URLParams
10457	ctx_                                          context.Context
10458	header_                                       http.Header
10459}
10460
10461// VerifyExternalSyncSettings: Verify External primary instance external
10462// sync settings.
10463//
10464// - instance: Cloud SQL instance ID. This does not include the project
10465//   ID.
10466// - project: Project ID of the project that contains the instance.
10467func (r *ProjectsInstancesService) VerifyExternalSyncSettings(project string, instance string, sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest) *ProjectsInstancesVerifyExternalSyncSettingsCall {
10468	c := &ProjectsInstancesVerifyExternalSyncSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10469	c.project = project
10470	c.instance = instance
10471	c.sqlinstancesverifyexternalsyncsettingsrequest = sqlinstancesverifyexternalsyncsettingsrequest
10472	return c
10473}
10474
10475// Fields allows partial responses to be retrieved. See
10476// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10477// for more information.
10478func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Fields(s ...googleapi.Field) *ProjectsInstancesVerifyExternalSyncSettingsCall {
10479	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10480	return c
10481}
10482
10483// Context sets the context to be used in this call's Do method. Any
10484// pending HTTP request will be aborted if the provided context is
10485// canceled.
10486func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Context(ctx context.Context) *ProjectsInstancesVerifyExternalSyncSettingsCall {
10487	c.ctx_ = ctx
10488	return c
10489}
10490
10491// Header returns an http.Header that can be modified by the caller to
10492// add HTTP headers to the request.
10493func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Header() http.Header {
10494	if c.header_ == nil {
10495		c.header_ = make(http.Header)
10496	}
10497	return c.header_
10498}
10499
10500func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) doRequest(alt string) (*http.Response, error) {
10501	reqHeaders := make(http.Header)
10502	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10503	for k, v := range c.header_ {
10504		reqHeaders[k] = v
10505	}
10506	reqHeaders.Set("User-Agent", c.s.userAgent())
10507	var body io.Reader = nil
10508	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesverifyexternalsyncsettingsrequest)
10509	if err != nil {
10510		return nil, err
10511	}
10512	reqHeaders.Set("Content-Type", "application/json")
10513	c.urlParams_.Set("alt", alt)
10514	c.urlParams_.Set("prettyPrint", "false")
10515	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings")
10516	urls += "?" + c.urlParams_.Encode()
10517	req, err := http.NewRequest("POST", urls, body)
10518	if err != nil {
10519		return nil, err
10520	}
10521	req.Header = reqHeaders
10522	googleapi.Expand(req.URL, map[string]string{
10523		"project":  c.project,
10524		"instance": c.instance,
10525	})
10526	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10527}
10528
10529// Do executes the "sql.projects.instances.verifyExternalSyncSettings" call.
10530// Exactly one of *SqlInstancesVerifyExternalSyncSettingsResponse or
10531// error will be non-nil. Any non-2xx status code is an error. Response
10532// headers are in either
10533// *SqlInstancesVerifyExternalSyncSettingsResponse.ServerResponse.Header
10534// or (if a response was returned at all) in
10535// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10536// whether the returned error was because http.StatusNotModified was
10537// returned.
10538func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Do(opts ...googleapi.CallOption) (*SqlInstancesVerifyExternalSyncSettingsResponse, error) {
10539	gensupport.SetOptions(c.urlParams_, opts...)
10540	res, err := c.doRequest("json")
10541	if res != nil && res.StatusCode == http.StatusNotModified {
10542		if res.Body != nil {
10543			res.Body.Close()
10544		}
10545		return nil, &googleapi.Error{
10546			Code:   res.StatusCode,
10547			Header: res.Header,
10548		}
10549	}
10550	if err != nil {
10551		return nil, err
10552	}
10553	defer googleapi.CloseBody(res)
10554	if err := googleapi.CheckResponse(res); err != nil {
10555		return nil, err
10556	}
10557	ret := &SqlInstancesVerifyExternalSyncSettingsResponse{
10558		ServerResponse: googleapi.ServerResponse{
10559			Header:         res.Header,
10560			HTTPStatusCode: res.StatusCode,
10561		},
10562	}
10563	target := &ret
10564	if err := gensupport.DecodeResponse(target, res); err != nil {
10565		return nil, err
10566	}
10567	return ret, nil
10568	// {
10569	//   "description": "Verify External primary instance external sync settings.",
10570	//   "flatPath": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings",
10571	//   "httpMethod": "POST",
10572	//   "id": "sql.projects.instances.verifyExternalSyncSettings",
10573	//   "parameterOrder": [
10574	//     "project",
10575	//     "instance"
10576	//   ],
10577	//   "parameters": {
10578	//     "instance": {
10579	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10580	//       "location": "path",
10581	//       "required": true,
10582	//       "type": "string"
10583	//     },
10584	//     "project": {
10585	//       "description": "Project ID of the project that contains the instance.",
10586	//       "location": "path",
10587	//       "required": true,
10588	//       "type": "string"
10589	//     }
10590	//   },
10591	//   "path": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings",
10592	//   "request": {
10593	//     "$ref": "SqlInstancesVerifyExternalSyncSettingsRequest"
10594	//   },
10595	//   "response": {
10596	//     "$ref": "SqlInstancesVerifyExternalSyncSettingsResponse"
10597	//   },
10598	//   "scopes": [
10599	//     "https://www.googleapis.com/auth/cloud-platform",
10600	//     "https://www.googleapis.com/auth/sqlservice.admin"
10601	//   ]
10602	// }
10603
10604}
10605
10606// method id "sql.sslCerts.createEphemeral":
10607
10608type SslCertsCreateEphemeralCall struct {
10609	s                              *Service
10610	project                        string
10611	instance                       string
10612	sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest
10613	urlParams_                     gensupport.URLParams
10614	ctx_                           context.Context
10615	header_                        http.Header
10616}
10617
10618// CreateEphemeral: Generates a short-lived X509 certificate containing
10619// the provided public key and signed by a private key specific to the
10620// target instance. Users may use the certificate to authenticate as
10621// themselves when connecting to the database.
10622//
10623// - instance: Cloud SQL instance ID. This does not include the project
10624//   ID.
10625// - project: Project ID of the Cloud SQL project.
10626func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall {
10627	c := &SslCertsCreateEphemeralCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10628	c.project = project
10629	c.instance = instance
10630	c.sslcertscreateephemeralrequest = sslcertscreateephemeralrequest
10631	return c
10632}
10633
10634// Fields allows partial responses to be retrieved. See
10635// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10636// for more information.
10637func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall {
10638	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10639	return c
10640}
10641
10642// Context sets the context to be used in this call's Do method. Any
10643// pending HTTP request will be aborted if the provided context is
10644// canceled.
10645func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall {
10646	c.ctx_ = ctx
10647	return c
10648}
10649
10650// Header returns an http.Header that can be modified by the caller to
10651// add HTTP headers to the request.
10652func (c *SslCertsCreateEphemeralCall) Header() http.Header {
10653	if c.header_ == nil {
10654		c.header_ = make(http.Header)
10655	}
10656	return c.header_
10657}
10658
10659func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) {
10660	reqHeaders := make(http.Header)
10661	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10662	for k, v := range c.header_ {
10663		reqHeaders[k] = v
10664	}
10665	reqHeaders.Set("User-Agent", c.s.userAgent())
10666	var body io.Reader = nil
10667	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertscreateephemeralrequest)
10668	if err != nil {
10669		return nil, err
10670	}
10671	reqHeaders.Set("Content-Type", "application/json")
10672	c.urlParams_.Set("alt", alt)
10673	c.urlParams_.Set("prettyPrint", "false")
10674	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/createEphemeral")
10675	urls += "?" + c.urlParams_.Encode()
10676	req, err := http.NewRequest("POST", urls, body)
10677	if err != nil {
10678		return nil, err
10679	}
10680	req.Header = reqHeaders
10681	googleapi.Expand(req.URL, map[string]string{
10682		"project":  c.project,
10683		"instance": c.instance,
10684	})
10685	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10686}
10687
10688// Do executes the "sql.sslCerts.createEphemeral" call.
10689// Exactly one of *SslCert or error will be non-nil. Any non-2xx status
10690// code is an error. Response headers are in either
10691// *SslCert.ServerResponse.Header or (if a response was returned at all)
10692// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10693// check whether the returned error was because http.StatusNotModified
10694// was returned.
10695func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
10696	gensupport.SetOptions(c.urlParams_, opts...)
10697	res, err := c.doRequest("json")
10698	if res != nil && res.StatusCode == http.StatusNotModified {
10699		if res.Body != nil {
10700			res.Body.Close()
10701		}
10702		return nil, &googleapi.Error{
10703			Code:   res.StatusCode,
10704			Header: res.Header,
10705		}
10706	}
10707	if err != nil {
10708		return nil, err
10709	}
10710	defer googleapi.CloseBody(res)
10711	if err := googleapi.CheckResponse(res); err != nil {
10712		return nil, err
10713	}
10714	ret := &SslCert{
10715		ServerResponse: googleapi.ServerResponse{
10716			Header:         res.Header,
10717			HTTPStatusCode: res.StatusCode,
10718		},
10719	}
10720	target := &ret
10721	if err := gensupport.DecodeResponse(target, res); err != nil {
10722		return nil, err
10723	}
10724	return ret, nil
10725	// {
10726	//   "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.",
10727	//   "flatPath": "v1/projects/{project}/instances/{instance}/createEphemeral",
10728	//   "httpMethod": "POST",
10729	//   "id": "sql.sslCerts.createEphemeral",
10730	//   "parameterOrder": [
10731	//     "project",
10732	//     "instance"
10733	//   ],
10734	//   "parameters": {
10735	//     "instance": {
10736	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10737	//       "location": "path",
10738	//       "required": true,
10739	//       "type": "string"
10740	//     },
10741	//     "project": {
10742	//       "description": "Project ID of the Cloud SQL project.",
10743	//       "location": "path",
10744	//       "required": true,
10745	//       "type": "string"
10746	//     }
10747	//   },
10748	//   "path": "v1/projects/{project}/instances/{instance}/createEphemeral",
10749	//   "request": {
10750	//     "$ref": "SslCertsCreateEphemeralRequest"
10751	//   },
10752	//   "response": {
10753	//     "$ref": "SslCert"
10754	//   },
10755	//   "scopes": [
10756	//     "https://www.googleapis.com/auth/cloud-platform",
10757	//     "https://www.googleapis.com/auth/sqlservice.admin"
10758	//   ]
10759	// }
10760
10761}
10762
10763// method id "sql.sslCerts.delete":
10764
10765type SslCertsDeleteCall struct {
10766	s               *Service
10767	project         string
10768	instance        string
10769	sha1Fingerprint string
10770	urlParams_      gensupport.URLParams
10771	ctx_            context.Context
10772	header_         http.Header
10773}
10774
10775// Delete: Deletes the SSL certificate. For First Generation instances,
10776// the certificate remains valid until the instance is restarted.
10777//
10778// - instance: Cloud SQL instance ID. This does not include the project
10779//   ID.
10780// - project: Project ID of the project that contains the instance.
10781// - sha1Fingerprint: Sha1 FingerPrint.
10782func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall {
10783	c := &SslCertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10784	c.project = project
10785	c.instance = instance
10786	c.sha1Fingerprint = sha1Fingerprint
10787	return c
10788}
10789
10790// Fields allows partial responses to be retrieved. See
10791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10792// for more information.
10793func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall {
10794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10795	return c
10796}
10797
10798// Context sets the context to be used in this call's Do method. Any
10799// pending HTTP request will be aborted if the provided context is
10800// canceled.
10801func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall {
10802	c.ctx_ = ctx
10803	return c
10804}
10805
10806// Header returns an http.Header that can be modified by the caller to
10807// add HTTP headers to the request.
10808func (c *SslCertsDeleteCall) Header() http.Header {
10809	if c.header_ == nil {
10810		c.header_ = make(http.Header)
10811	}
10812	return c.header_
10813}
10814
10815func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) {
10816	reqHeaders := make(http.Header)
10817	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10818	for k, v := range c.header_ {
10819		reqHeaders[k] = v
10820	}
10821	reqHeaders.Set("User-Agent", c.s.userAgent())
10822	var body io.Reader = nil
10823	c.urlParams_.Set("alt", alt)
10824	c.urlParams_.Set("prettyPrint", "false")
10825	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
10826	urls += "?" + c.urlParams_.Encode()
10827	req, err := http.NewRequest("DELETE", urls, body)
10828	if err != nil {
10829		return nil, err
10830	}
10831	req.Header = reqHeaders
10832	googleapi.Expand(req.URL, map[string]string{
10833		"project":         c.project,
10834		"instance":        c.instance,
10835		"sha1Fingerprint": c.sha1Fingerprint,
10836	})
10837	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10838}
10839
10840// Do executes the "sql.sslCerts.delete" call.
10841// Exactly one of *Operation or error will be non-nil. Any non-2xx
10842// status code is an error. Response headers are in either
10843// *Operation.ServerResponse.Header or (if a response was returned at
10844// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10845// to check whether the returned error was because
10846// http.StatusNotModified was returned.
10847func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10848	gensupport.SetOptions(c.urlParams_, opts...)
10849	res, err := c.doRequest("json")
10850	if res != nil && res.StatusCode == http.StatusNotModified {
10851		if res.Body != nil {
10852			res.Body.Close()
10853		}
10854		return nil, &googleapi.Error{
10855			Code:   res.StatusCode,
10856			Header: res.Header,
10857		}
10858	}
10859	if err != nil {
10860		return nil, err
10861	}
10862	defer googleapi.CloseBody(res)
10863	if err := googleapi.CheckResponse(res); err != nil {
10864		return nil, err
10865	}
10866	ret := &Operation{
10867		ServerResponse: googleapi.ServerResponse{
10868			Header:         res.Header,
10869			HTTPStatusCode: res.StatusCode,
10870		},
10871	}
10872	target := &ret
10873	if err := gensupport.DecodeResponse(target, res); err != nil {
10874		return nil, err
10875	}
10876	return ret, nil
10877	// {
10878	//   "description": "Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.",
10879	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
10880	//   "httpMethod": "DELETE",
10881	//   "id": "sql.sslCerts.delete",
10882	//   "parameterOrder": [
10883	//     "project",
10884	//     "instance",
10885	//     "sha1Fingerprint"
10886	//   ],
10887	//   "parameters": {
10888	//     "instance": {
10889	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10890	//       "location": "path",
10891	//       "required": true,
10892	//       "type": "string"
10893	//     },
10894	//     "project": {
10895	//       "description": "Project ID of the project that contains the instance.",
10896	//       "location": "path",
10897	//       "required": true,
10898	//       "type": "string"
10899	//     },
10900	//     "sha1Fingerprint": {
10901	//       "description": "Sha1 FingerPrint.",
10902	//       "location": "path",
10903	//       "required": true,
10904	//       "type": "string"
10905	//     }
10906	//   },
10907	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
10908	//   "response": {
10909	//     "$ref": "Operation"
10910	//   },
10911	//   "scopes": [
10912	//     "https://www.googleapis.com/auth/cloud-platform",
10913	//     "https://www.googleapis.com/auth/sqlservice.admin"
10914	//   ]
10915	// }
10916
10917}
10918
10919// method id "sql.sslCerts.get":
10920
10921type SslCertsGetCall struct {
10922	s               *Service
10923	project         string
10924	instance        string
10925	sha1Fingerprint string
10926	urlParams_      gensupport.URLParams
10927	ifNoneMatch_    string
10928	ctx_            context.Context
10929	header_         http.Header
10930}
10931
10932// Get: Retrieves a particular SSL certificate. Does not include the
10933// private key (required for usage). The private key must be saved from
10934// the response to initial creation.
10935//
10936// - instance: Cloud SQL instance ID. This does not include the project
10937//   ID.
10938// - project: Project ID of the project that contains the instance.
10939// - sha1Fingerprint: Sha1 FingerPrint.
10940func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall {
10941	c := &SslCertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10942	c.project = project
10943	c.instance = instance
10944	c.sha1Fingerprint = sha1Fingerprint
10945	return c
10946}
10947
10948// Fields allows partial responses to be retrieved. See
10949// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10950// for more information.
10951func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall {
10952	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10953	return c
10954}
10955
10956// IfNoneMatch sets the optional parameter which makes the operation
10957// fail if the object's ETag matches the given value. This is useful for
10958// getting updates only after the object has changed since the last
10959// request. Use googleapi.IsNotModified to check whether the response
10960// error from Do is the result of In-None-Match.
10961func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall {
10962	c.ifNoneMatch_ = entityTag
10963	return c
10964}
10965
10966// Context sets the context to be used in this call's Do method. Any
10967// pending HTTP request will be aborted if the provided context is
10968// canceled.
10969func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall {
10970	c.ctx_ = ctx
10971	return c
10972}
10973
10974// Header returns an http.Header that can be modified by the caller to
10975// add HTTP headers to the request.
10976func (c *SslCertsGetCall) Header() http.Header {
10977	if c.header_ == nil {
10978		c.header_ = make(http.Header)
10979	}
10980	return c.header_
10981}
10982
10983func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) {
10984	reqHeaders := make(http.Header)
10985	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10986	for k, v := range c.header_ {
10987		reqHeaders[k] = v
10988	}
10989	reqHeaders.Set("User-Agent", c.s.userAgent())
10990	if c.ifNoneMatch_ != "" {
10991		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10992	}
10993	var body io.Reader = nil
10994	c.urlParams_.Set("alt", alt)
10995	c.urlParams_.Set("prettyPrint", "false")
10996	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
10997	urls += "?" + c.urlParams_.Encode()
10998	req, err := http.NewRequest("GET", urls, body)
10999	if err != nil {
11000		return nil, err
11001	}
11002	req.Header = reqHeaders
11003	googleapi.Expand(req.URL, map[string]string{
11004		"project":         c.project,
11005		"instance":        c.instance,
11006		"sha1Fingerprint": c.sha1Fingerprint,
11007	})
11008	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11009}
11010
11011// Do executes the "sql.sslCerts.get" call.
11012// Exactly one of *SslCert or error will be non-nil. Any non-2xx status
11013// code is an error. Response headers are in either
11014// *SslCert.ServerResponse.Header or (if a response was returned at all)
11015// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11016// check whether the returned error was because http.StatusNotModified
11017// was returned.
11018func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
11019	gensupport.SetOptions(c.urlParams_, opts...)
11020	res, err := c.doRequest("json")
11021	if res != nil && res.StatusCode == http.StatusNotModified {
11022		if res.Body != nil {
11023			res.Body.Close()
11024		}
11025		return nil, &googleapi.Error{
11026			Code:   res.StatusCode,
11027			Header: res.Header,
11028		}
11029	}
11030	if err != nil {
11031		return nil, err
11032	}
11033	defer googleapi.CloseBody(res)
11034	if err := googleapi.CheckResponse(res); err != nil {
11035		return nil, err
11036	}
11037	ret := &SslCert{
11038		ServerResponse: googleapi.ServerResponse{
11039			Header:         res.Header,
11040			HTTPStatusCode: res.StatusCode,
11041		},
11042	}
11043	target := &ret
11044	if err := gensupport.DecodeResponse(target, res); err != nil {
11045		return nil, err
11046	}
11047	return ret, nil
11048	// {
11049	//   "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.",
11050	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
11051	//   "httpMethod": "GET",
11052	//   "id": "sql.sslCerts.get",
11053	//   "parameterOrder": [
11054	//     "project",
11055	//     "instance",
11056	//     "sha1Fingerprint"
11057	//   ],
11058	//   "parameters": {
11059	//     "instance": {
11060	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11061	//       "location": "path",
11062	//       "required": true,
11063	//       "type": "string"
11064	//     },
11065	//     "project": {
11066	//       "description": "Project ID of the project that contains the instance.",
11067	//       "location": "path",
11068	//       "required": true,
11069	//       "type": "string"
11070	//     },
11071	//     "sha1Fingerprint": {
11072	//       "description": "Sha1 FingerPrint.",
11073	//       "location": "path",
11074	//       "required": true,
11075	//       "type": "string"
11076	//     }
11077	//   },
11078	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
11079	//   "response": {
11080	//     "$ref": "SslCert"
11081	//   },
11082	//   "scopes": [
11083	//     "https://www.googleapis.com/auth/cloud-platform",
11084	//     "https://www.googleapis.com/auth/sqlservice.admin"
11085	//   ]
11086	// }
11087
11088}
11089
11090// method id "sql.sslCerts.insert":
11091
11092type SslCertsInsertCall struct {
11093	s                     *Service
11094	project               string
11095	instance              string
11096	sslcertsinsertrequest *SslCertsInsertRequest
11097	urlParams_            gensupport.URLParams
11098	ctx_                  context.Context
11099	header_               http.Header
11100}
11101
11102// Insert: Creates an SSL certificate and returns it along with the
11103// private key and server certificate authority. The new certificate
11104// will not be usable until the instance is restarted.
11105//
11106// - instance: Cloud SQL instance ID. This does not include the project
11107//   ID.
11108// - project: Project ID of the project that contains the instance.
11109func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall {
11110	c := &SslCertsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11111	c.project = project
11112	c.instance = instance
11113	c.sslcertsinsertrequest = sslcertsinsertrequest
11114	return c
11115}
11116
11117// Fields allows partial responses to be retrieved. See
11118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11119// for more information.
11120func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall {
11121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11122	return c
11123}
11124
11125// Context sets the context to be used in this call's Do method. Any
11126// pending HTTP request will be aborted if the provided context is
11127// canceled.
11128func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall {
11129	c.ctx_ = ctx
11130	return c
11131}
11132
11133// Header returns an http.Header that can be modified by the caller to
11134// add HTTP headers to the request.
11135func (c *SslCertsInsertCall) Header() http.Header {
11136	if c.header_ == nil {
11137		c.header_ = make(http.Header)
11138	}
11139	return c.header_
11140}
11141
11142func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) {
11143	reqHeaders := make(http.Header)
11144	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11145	for k, v := range c.header_ {
11146		reqHeaders[k] = v
11147	}
11148	reqHeaders.Set("User-Agent", c.s.userAgent())
11149	var body io.Reader = nil
11150	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest)
11151	if err != nil {
11152		return nil, err
11153	}
11154	reqHeaders.Set("Content-Type", "application/json")
11155	c.urlParams_.Set("alt", alt)
11156	c.urlParams_.Set("prettyPrint", "false")
11157	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts")
11158	urls += "?" + c.urlParams_.Encode()
11159	req, err := http.NewRequest("POST", urls, body)
11160	if err != nil {
11161		return nil, err
11162	}
11163	req.Header = reqHeaders
11164	googleapi.Expand(req.URL, map[string]string{
11165		"project":  c.project,
11166		"instance": c.instance,
11167	})
11168	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11169}
11170
11171// Do executes the "sql.sslCerts.insert" call.
11172// Exactly one of *SslCertsInsertResponse or error will be non-nil. Any
11173// non-2xx status code is an error. Response headers are in either
11174// *SslCertsInsertResponse.ServerResponse.Header or (if a response was
11175// returned at all) in error.(*googleapi.Error).Header. Use
11176// googleapi.IsNotModified to check whether the returned error was
11177// because http.StatusNotModified was returned.
11178func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error) {
11179	gensupport.SetOptions(c.urlParams_, opts...)
11180	res, err := c.doRequest("json")
11181	if res != nil && res.StatusCode == http.StatusNotModified {
11182		if res.Body != nil {
11183			res.Body.Close()
11184		}
11185		return nil, &googleapi.Error{
11186			Code:   res.StatusCode,
11187			Header: res.Header,
11188		}
11189	}
11190	if err != nil {
11191		return nil, err
11192	}
11193	defer googleapi.CloseBody(res)
11194	if err := googleapi.CheckResponse(res); err != nil {
11195		return nil, err
11196	}
11197	ret := &SslCertsInsertResponse{
11198		ServerResponse: googleapi.ServerResponse{
11199			Header:         res.Header,
11200			HTTPStatusCode: res.StatusCode,
11201		},
11202	}
11203	target := &ret
11204	if err := gensupport.DecodeResponse(target, res); err != nil {
11205		return nil, err
11206	}
11207	return ret, nil
11208	// {
11209	//   "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.",
11210	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts",
11211	//   "httpMethod": "POST",
11212	//   "id": "sql.sslCerts.insert",
11213	//   "parameterOrder": [
11214	//     "project",
11215	//     "instance"
11216	//   ],
11217	//   "parameters": {
11218	//     "instance": {
11219	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11220	//       "location": "path",
11221	//       "required": true,
11222	//       "type": "string"
11223	//     },
11224	//     "project": {
11225	//       "description": "Project ID of the project that contains the instance.",
11226	//       "location": "path",
11227	//       "required": true,
11228	//       "type": "string"
11229	//     }
11230	//   },
11231	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts",
11232	//   "request": {
11233	//     "$ref": "SslCertsInsertRequest"
11234	//   },
11235	//   "response": {
11236	//     "$ref": "SslCertsInsertResponse"
11237	//   },
11238	//   "scopes": [
11239	//     "https://www.googleapis.com/auth/cloud-platform",
11240	//     "https://www.googleapis.com/auth/sqlservice.admin"
11241	//   ]
11242	// }
11243
11244}
11245
11246// method id "sql.sslCerts.list":
11247
11248type SslCertsListCall struct {
11249	s            *Service
11250	project      string
11251	instance     string
11252	urlParams_   gensupport.URLParams
11253	ifNoneMatch_ string
11254	ctx_         context.Context
11255	header_      http.Header
11256}
11257
11258// List: Lists all of the current SSL certificates for the instance.
11259//
11260// - instance: Cloud SQL instance ID. This does not include the project
11261//   ID.
11262// - project: Project ID of the project that contains the instance.
11263func (r *SslCertsService) List(project string, instance string) *SslCertsListCall {
11264	c := &SslCertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11265	c.project = project
11266	c.instance = instance
11267	return c
11268}
11269
11270// Fields allows partial responses to be retrieved. See
11271// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11272// for more information.
11273func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall {
11274	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11275	return c
11276}
11277
11278// IfNoneMatch sets the optional parameter which makes the operation
11279// fail if the object's ETag matches the given value. This is useful for
11280// getting updates only after the object has changed since the last
11281// request. Use googleapi.IsNotModified to check whether the response
11282// error from Do is the result of In-None-Match.
11283func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall {
11284	c.ifNoneMatch_ = entityTag
11285	return c
11286}
11287
11288// Context sets the context to be used in this call's Do method. Any
11289// pending HTTP request will be aborted if the provided context is
11290// canceled.
11291func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall {
11292	c.ctx_ = ctx
11293	return c
11294}
11295
11296// Header returns an http.Header that can be modified by the caller to
11297// add HTTP headers to the request.
11298func (c *SslCertsListCall) Header() http.Header {
11299	if c.header_ == nil {
11300		c.header_ = make(http.Header)
11301	}
11302	return c.header_
11303}
11304
11305func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) {
11306	reqHeaders := make(http.Header)
11307	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11308	for k, v := range c.header_ {
11309		reqHeaders[k] = v
11310	}
11311	reqHeaders.Set("User-Agent", c.s.userAgent())
11312	if c.ifNoneMatch_ != "" {
11313		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11314	}
11315	var body io.Reader = nil
11316	c.urlParams_.Set("alt", alt)
11317	c.urlParams_.Set("prettyPrint", "false")
11318	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts")
11319	urls += "?" + c.urlParams_.Encode()
11320	req, err := http.NewRequest("GET", urls, body)
11321	if err != nil {
11322		return nil, err
11323	}
11324	req.Header = reqHeaders
11325	googleapi.Expand(req.URL, map[string]string{
11326		"project":  c.project,
11327		"instance": c.instance,
11328	})
11329	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11330}
11331
11332// Do executes the "sql.sslCerts.list" call.
11333// Exactly one of *SslCertsListResponse or error will be non-nil. Any
11334// non-2xx status code is an error. Response headers are in either
11335// *SslCertsListResponse.ServerResponse.Header or (if a response was
11336// returned at all) in error.(*googleapi.Error).Header. Use
11337// googleapi.IsNotModified to check whether the returned error was
11338// because http.StatusNotModified was returned.
11339func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error) {
11340	gensupport.SetOptions(c.urlParams_, opts...)
11341	res, err := c.doRequest("json")
11342	if res != nil && res.StatusCode == http.StatusNotModified {
11343		if res.Body != nil {
11344			res.Body.Close()
11345		}
11346		return nil, &googleapi.Error{
11347			Code:   res.StatusCode,
11348			Header: res.Header,
11349		}
11350	}
11351	if err != nil {
11352		return nil, err
11353	}
11354	defer googleapi.CloseBody(res)
11355	if err := googleapi.CheckResponse(res); err != nil {
11356		return nil, err
11357	}
11358	ret := &SslCertsListResponse{
11359		ServerResponse: googleapi.ServerResponse{
11360			Header:         res.Header,
11361			HTTPStatusCode: res.StatusCode,
11362		},
11363	}
11364	target := &ret
11365	if err := gensupport.DecodeResponse(target, res); err != nil {
11366		return nil, err
11367	}
11368	return ret, nil
11369	// {
11370	//   "description": "Lists all of the current SSL certificates for the instance.",
11371	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts",
11372	//   "httpMethod": "GET",
11373	//   "id": "sql.sslCerts.list",
11374	//   "parameterOrder": [
11375	//     "project",
11376	//     "instance"
11377	//   ],
11378	//   "parameters": {
11379	//     "instance": {
11380	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11381	//       "location": "path",
11382	//       "required": true,
11383	//       "type": "string"
11384	//     },
11385	//     "project": {
11386	//       "description": "Project ID of the project that contains the instance.",
11387	//       "location": "path",
11388	//       "required": true,
11389	//       "type": "string"
11390	//     }
11391	//   },
11392	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts",
11393	//   "response": {
11394	//     "$ref": "SslCertsListResponse"
11395	//   },
11396	//   "scopes": [
11397	//     "https://www.googleapis.com/auth/cloud-platform",
11398	//     "https://www.googleapis.com/auth/sqlservice.admin"
11399	//   ]
11400	// }
11401
11402}
11403
11404// method id "sql.tiers.list":
11405
11406type TiersListCall struct {
11407	s            *Service
11408	project      string
11409	urlParams_   gensupport.URLParams
11410	ifNoneMatch_ string
11411	ctx_         context.Context
11412	header_      http.Header
11413}
11414
11415// List: Lists all available machine types (tiers) for Cloud SQL, for
11416// example, db-custom-1-3840. For more information, see
11417// https://cloud.google.com/sql/pricing.
11418//
11419// - project: Project ID of the project for which to list tiers.
11420func (r *TiersService) List(project string) *TiersListCall {
11421	c := &TiersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11422	c.project = project
11423	return c
11424}
11425
11426// Fields allows partial responses to be retrieved. See
11427// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11428// for more information.
11429func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall {
11430	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11431	return c
11432}
11433
11434// IfNoneMatch sets the optional parameter which makes the operation
11435// fail if the object's ETag matches the given value. This is useful for
11436// getting updates only after the object has changed since the last
11437// request. Use googleapi.IsNotModified to check whether the response
11438// error from Do is the result of In-None-Match.
11439func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall {
11440	c.ifNoneMatch_ = entityTag
11441	return c
11442}
11443
11444// Context sets the context to be used in this call's Do method. Any
11445// pending HTTP request will be aborted if the provided context is
11446// canceled.
11447func (c *TiersListCall) Context(ctx context.Context) *TiersListCall {
11448	c.ctx_ = ctx
11449	return c
11450}
11451
11452// Header returns an http.Header that can be modified by the caller to
11453// add HTTP headers to the request.
11454func (c *TiersListCall) Header() http.Header {
11455	if c.header_ == nil {
11456		c.header_ = make(http.Header)
11457	}
11458	return c.header_
11459}
11460
11461func (c *TiersListCall) doRequest(alt string) (*http.Response, error) {
11462	reqHeaders := make(http.Header)
11463	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11464	for k, v := range c.header_ {
11465		reqHeaders[k] = v
11466	}
11467	reqHeaders.Set("User-Agent", c.s.userAgent())
11468	if c.ifNoneMatch_ != "" {
11469		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11470	}
11471	var body io.Reader = nil
11472	c.urlParams_.Set("alt", alt)
11473	c.urlParams_.Set("prettyPrint", "false")
11474	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/tiers")
11475	urls += "?" + c.urlParams_.Encode()
11476	req, err := http.NewRequest("GET", urls, body)
11477	if err != nil {
11478		return nil, err
11479	}
11480	req.Header = reqHeaders
11481	googleapi.Expand(req.URL, map[string]string{
11482		"project": c.project,
11483	})
11484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11485}
11486
11487// Do executes the "sql.tiers.list" call.
11488// Exactly one of *TiersListResponse or error will be non-nil. Any
11489// non-2xx status code is an error. Response headers are in either
11490// *TiersListResponse.ServerResponse.Header or (if a response was
11491// returned at all) in error.(*googleapi.Error).Header. Use
11492// googleapi.IsNotModified to check whether the returned error was
11493// because http.StatusNotModified was returned.
11494func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error) {
11495	gensupport.SetOptions(c.urlParams_, opts...)
11496	res, err := c.doRequest("json")
11497	if res != nil && res.StatusCode == http.StatusNotModified {
11498		if res.Body != nil {
11499			res.Body.Close()
11500		}
11501		return nil, &googleapi.Error{
11502			Code:   res.StatusCode,
11503			Header: res.Header,
11504		}
11505	}
11506	if err != nil {
11507		return nil, err
11508	}
11509	defer googleapi.CloseBody(res)
11510	if err := googleapi.CheckResponse(res); err != nil {
11511		return nil, err
11512	}
11513	ret := &TiersListResponse{
11514		ServerResponse: googleapi.ServerResponse{
11515			Header:         res.Header,
11516			HTTPStatusCode: res.StatusCode,
11517		},
11518	}
11519	target := &ret
11520	if err := gensupport.DecodeResponse(target, res); err != nil {
11521		return nil, err
11522	}
11523	return ret, nil
11524	// {
11525	//   "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.",
11526	//   "flatPath": "v1/projects/{project}/tiers",
11527	//   "httpMethod": "GET",
11528	//   "id": "sql.tiers.list",
11529	//   "parameterOrder": [
11530	//     "project"
11531	//   ],
11532	//   "parameters": {
11533	//     "project": {
11534	//       "description": "Project ID of the project for which to list tiers.",
11535	//       "location": "path",
11536	//       "required": true,
11537	//       "type": "string"
11538	//     }
11539	//   },
11540	//   "path": "v1/projects/{project}/tiers",
11541	//   "response": {
11542	//     "$ref": "TiersListResponse"
11543	//   },
11544	//   "scopes": [
11545	//     "https://www.googleapis.com/auth/cloud-platform",
11546	//     "https://www.googleapis.com/auth/sqlservice.admin"
11547	//   ]
11548	// }
11549
11550}
11551
11552// method id "sql.users.delete":
11553
11554type UsersDeleteCall struct {
11555	s          *Service
11556	project    string
11557	instance   string
11558	urlParams_ gensupport.URLParams
11559	ctx_       context.Context
11560	header_    http.Header
11561}
11562
11563// Delete: Deletes a user from a Cloud SQL instance.
11564//
11565// - instance: Database instance ID. This does not include the project
11566//   ID.
11567// - project: Project ID of the project that contains the instance.
11568func (r *UsersService) Delete(project string, instance string) *UsersDeleteCall {
11569	c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11570	c.project = project
11571	c.instance = instance
11572	return c
11573}
11574
11575// Host sets the optional parameter "host": Host of the user in the
11576// instance.
11577func (c *UsersDeleteCall) Host(host string) *UsersDeleteCall {
11578	c.urlParams_.Set("host", host)
11579	return c
11580}
11581
11582// Name sets the optional parameter "name": Name of the user in the
11583// instance.
11584func (c *UsersDeleteCall) Name(name string) *UsersDeleteCall {
11585	c.urlParams_.Set("name", name)
11586	return c
11587}
11588
11589// Fields allows partial responses to be retrieved. See
11590// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11591// for more information.
11592func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
11593	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11594	return c
11595}
11596
11597// Context sets the context to be used in this call's Do method. Any
11598// pending HTTP request will be aborted if the provided context is
11599// canceled.
11600func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
11601	c.ctx_ = ctx
11602	return c
11603}
11604
11605// Header returns an http.Header that can be modified by the caller to
11606// add HTTP headers to the request.
11607func (c *UsersDeleteCall) Header() http.Header {
11608	if c.header_ == nil {
11609		c.header_ = make(http.Header)
11610	}
11611	return c.header_
11612}
11613
11614func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
11615	reqHeaders := make(http.Header)
11616	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11617	for k, v := range c.header_ {
11618		reqHeaders[k] = v
11619	}
11620	reqHeaders.Set("User-Agent", c.s.userAgent())
11621	var body io.Reader = nil
11622	c.urlParams_.Set("alt", alt)
11623	c.urlParams_.Set("prettyPrint", "false")
11624	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11625	urls += "?" + c.urlParams_.Encode()
11626	req, err := http.NewRequest("DELETE", urls, body)
11627	if err != nil {
11628		return nil, err
11629	}
11630	req.Header = reqHeaders
11631	googleapi.Expand(req.URL, map[string]string{
11632		"project":  c.project,
11633		"instance": c.instance,
11634	})
11635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11636}
11637
11638// Do executes the "sql.users.delete" call.
11639// Exactly one of *Operation or error will be non-nil. Any non-2xx
11640// status code is an error. Response headers are in either
11641// *Operation.ServerResponse.Header or (if a response was returned at
11642// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11643// to check whether the returned error was because
11644// http.StatusNotModified was returned.
11645func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11646	gensupport.SetOptions(c.urlParams_, opts...)
11647	res, err := c.doRequest("json")
11648	if res != nil && res.StatusCode == http.StatusNotModified {
11649		if res.Body != nil {
11650			res.Body.Close()
11651		}
11652		return nil, &googleapi.Error{
11653			Code:   res.StatusCode,
11654			Header: res.Header,
11655		}
11656	}
11657	if err != nil {
11658		return nil, err
11659	}
11660	defer googleapi.CloseBody(res)
11661	if err := googleapi.CheckResponse(res); err != nil {
11662		return nil, err
11663	}
11664	ret := &Operation{
11665		ServerResponse: googleapi.ServerResponse{
11666			Header:         res.Header,
11667			HTTPStatusCode: res.StatusCode,
11668		},
11669	}
11670	target := &ret
11671	if err := gensupport.DecodeResponse(target, res); err != nil {
11672		return nil, err
11673	}
11674	return ret, nil
11675	// {
11676	//   "description": "Deletes a user from a Cloud SQL instance.",
11677	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
11678	//   "httpMethod": "DELETE",
11679	//   "id": "sql.users.delete",
11680	//   "parameterOrder": [
11681	//     "project",
11682	//     "instance"
11683	//   ],
11684	//   "parameters": {
11685	//     "host": {
11686	//       "description": "Host of the user in the instance.",
11687	//       "location": "query",
11688	//       "type": "string"
11689	//     },
11690	//     "instance": {
11691	//       "description": "Database instance ID. This does not include the project ID.",
11692	//       "location": "path",
11693	//       "required": true,
11694	//       "type": "string"
11695	//     },
11696	//     "name": {
11697	//       "description": "Name of the user in the instance.",
11698	//       "location": "query",
11699	//       "type": "string"
11700	//     },
11701	//     "project": {
11702	//       "description": "Project ID of the project that contains the instance.",
11703	//       "location": "path",
11704	//       "required": true,
11705	//       "type": "string"
11706	//     }
11707	//   },
11708	//   "path": "v1/projects/{project}/instances/{instance}/users",
11709	//   "response": {
11710	//     "$ref": "Operation"
11711	//   },
11712	//   "scopes": [
11713	//     "https://www.googleapis.com/auth/cloud-platform",
11714	//     "https://www.googleapis.com/auth/sqlservice.admin"
11715	//   ]
11716	// }
11717
11718}
11719
11720// method id "sql.users.insert":
11721
11722type UsersInsertCall struct {
11723	s          *Service
11724	project    string
11725	instance   string
11726	user       *User
11727	urlParams_ gensupport.URLParams
11728	ctx_       context.Context
11729	header_    http.Header
11730}
11731
11732// Insert: Creates a new user in a Cloud SQL instance.
11733//
11734// - instance: Database instance ID. This does not include the project
11735//   ID.
11736// - project: Project ID of the project that contains the instance.
11737func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall {
11738	c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11739	c.project = project
11740	c.instance = instance
11741	c.user = user
11742	return c
11743}
11744
11745// Fields allows partial responses to be retrieved. See
11746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11747// for more information.
11748func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
11749	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11750	return c
11751}
11752
11753// Context sets the context to be used in this call's Do method. Any
11754// pending HTTP request will be aborted if the provided context is
11755// canceled.
11756func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
11757	c.ctx_ = ctx
11758	return c
11759}
11760
11761// Header returns an http.Header that can be modified by the caller to
11762// add HTTP headers to the request.
11763func (c *UsersInsertCall) Header() http.Header {
11764	if c.header_ == nil {
11765		c.header_ = make(http.Header)
11766	}
11767	return c.header_
11768}
11769
11770func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
11771	reqHeaders := make(http.Header)
11772	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11773	for k, v := range c.header_ {
11774		reqHeaders[k] = v
11775	}
11776	reqHeaders.Set("User-Agent", c.s.userAgent())
11777	var body io.Reader = nil
11778	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
11779	if err != nil {
11780		return nil, err
11781	}
11782	reqHeaders.Set("Content-Type", "application/json")
11783	c.urlParams_.Set("alt", alt)
11784	c.urlParams_.Set("prettyPrint", "false")
11785	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11786	urls += "?" + c.urlParams_.Encode()
11787	req, err := http.NewRequest("POST", urls, body)
11788	if err != nil {
11789		return nil, err
11790	}
11791	req.Header = reqHeaders
11792	googleapi.Expand(req.URL, map[string]string{
11793		"project":  c.project,
11794		"instance": c.instance,
11795	})
11796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11797}
11798
11799// Do executes the "sql.users.insert" call.
11800// Exactly one of *Operation or error will be non-nil. Any non-2xx
11801// status code is an error. Response headers are in either
11802// *Operation.ServerResponse.Header or (if a response was returned at
11803// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11804// to check whether the returned error was because
11805// http.StatusNotModified was returned.
11806func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11807	gensupport.SetOptions(c.urlParams_, opts...)
11808	res, err := c.doRequest("json")
11809	if res != nil && res.StatusCode == http.StatusNotModified {
11810		if res.Body != nil {
11811			res.Body.Close()
11812		}
11813		return nil, &googleapi.Error{
11814			Code:   res.StatusCode,
11815			Header: res.Header,
11816		}
11817	}
11818	if err != nil {
11819		return nil, err
11820	}
11821	defer googleapi.CloseBody(res)
11822	if err := googleapi.CheckResponse(res); err != nil {
11823		return nil, err
11824	}
11825	ret := &Operation{
11826		ServerResponse: googleapi.ServerResponse{
11827			Header:         res.Header,
11828			HTTPStatusCode: res.StatusCode,
11829		},
11830	}
11831	target := &ret
11832	if err := gensupport.DecodeResponse(target, res); err != nil {
11833		return nil, err
11834	}
11835	return ret, nil
11836	// {
11837	//   "description": "Creates a new user in a Cloud SQL instance.",
11838	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
11839	//   "httpMethod": "POST",
11840	//   "id": "sql.users.insert",
11841	//   "parameterOrder": [
11842	//     "project",
11843	//     "instance"
11844	//   ],
11845	//   "parameters": {
11846	//     "instance": {
11847	//       "description": "Database instance ID. This does not include the project ID.",
11848	//       "location": "path",
11849	//       "required": true,
11850	//       "type": "string"
11851	//     },
11852	//     "project": {
11853	//       "description": "Project ID of the project that contains the instance.",
11854	//       "location": "path",
11855	//       "required": true,
11856	//       "type": "string"
11857	//     }
11858	//   },
11859	//   "path": "v1/projects/{project}/instances/{instance}/users",
11860	//   "request": {
11861	//     "$ref": "User"
11862	//   },
11863	//   "response": {
11864	//     "$ref": "Operation"
11865	//   },
11866	//   "scopes": [
11867	//     "https://www.googleapis.com/auth/cloud-platform",
11868	//     "https://www.googleapis.com/auth/sqlservice.admin"
11869	//   ]
11870	// }
11871
11872}
11873
11874// method id "sql.users.list":
11875
11876type UsersListCall struct {
11877	s            *Service
11878	project      string
11879	instance     string
11880	urlParams_   gensupport.URLParams
11881	ifNoneMatch_ string
11882	ctx_         context.Context
11883	header_      http.Header
11884}
11885
11886// List: Lists users in the specified Cloud SQL instance.
11887//
11888// - instance: Database instance ID. This does not include the project
11889//   ID.
11890// - project: Project ID of the project that contains the instance.
11891func (r *UsersService) List(project string, instance string) *UsersListCall {
11892	c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11893	c.project = project
11894	c.instance = instance
11895	return c
11896}
11897
11898// Fields allows partial responses to be retrieved. See
11899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11900// for more information.
11901func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
11902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11903	return c
11904}
11905
11906// IfNoneMatch sets the optional parameter which makes the operation
11907// fail if the object's ETag matches the given value. This is useful for
11908// getting updates only after the object has changed since the last
11909// request. Use googleapi.IsNotModified to check whether the response
11910// error from Do is the result of In-None-Match.
11911func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
11912	c.ifNoneMatch_ = entityTag
11913	return c
11914}
11915
11916// Context sets the context to be used in this call's Do method. Any
11917// pending HTTP request will be aborted if the provided context is
11918// canceled.
11919func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
11920	c.ctx_ = ctx
11921	return c
11922}
11923
11924// Header returns an http.Header that can be modified by the caller to
11925// add HTTP headers to the request.
11926func (c *UsersListCall) Header() http.Header {
11927	if c.header_ == nil {
11928		c.header_ = make(http.Header)
11929	}
11930	return c.header_
11931}
11932
11933func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
11934	reqHeaders := make(http.Header)
11935	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11936	for k, v := range c.header_ {
11937		reqHeaders[k] = v
11938	}
11939	reqHeaders.Set("User-Agent", c.s.userAgent())
11940	if c.ifNoneMatch_ != "" {
11941		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11942	}
11943	var body io.Reader = nil
11944	c.urlParams_.Set("alt", alt)
11945	c.urlParams_.Set("prettyPrint", "false")
11946	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11947	urls += "?" + c.urlParams_.Encode()
11948	req, err := http.NewRequest("GET", urls, body)
11949	if err != nil {
11950		return nil, err
11951	}
11952	req.Header = reqHeaders
11953	googleapi.Expand(req.URL, map[string]string{
11954		"project":  c.project,
11955		"instance": c.instance,
11956	})
11957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11958}
11959
11960// Do executes the "sql.users.list" call.
11961// Exactly one of *UsersListResponse or error will be non-nil. Any
11962// non-2xx status code is an error. Response headers are in either
11963// *UsersListResponse.ServerResponse.Header or (if a response was
11964// returned at all) in error.(*googleapi.Error).Header. Use
11965// googleapi.IsNotModified to check whether the returned error was
11966// because http.StatusNotModified was returned.
11967func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) {
11968	gensupport.SetOptions(c.urlParams_, opts...)
11969	res, err := c.doRequest("json")
11970	if res != nil && res.StatusCode == http.StatusNotModified {
11971		if res.Body != nil {
11972			res.Body.Close()
11973		}
11974		return nil, &googleapi.Error{
11975			Code:   res.StatusCode,
11976			Header: res.Header,
11977		}
11978	}
11979	if err != nil {
11980		return nil, err
11981	}
11982	defer googleapi.CloseBody(res)
11983	if err := googleapi.CheckResponse(res); err != nil {
11984		return nil, err
11985	}
11986	ret := &UsersListResponse{
11987		ServerResponse: googleapi.ServerResponse{
11988			Header:         res.Header,
11989			HTTPStatusCode: res.StatusCode,
11990		},
11991	}
11992	target := &ret
11993	if err := gensupport.DecodeResponse(target, res); err != nil {
11994		return nil, err
11995	}
11996	return ret, nil
11997	// {
11998	//   "description": "Lists users in the specified Cloud SQL instance.",
11999	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
12000	//   "httpMethod": "GET",
12001	//   "id": "sql.users.list",
12002	//   "parameterOrder": [
12003	//     "project",
12004	//     "instance"
12005	//   ],
12006	//   "parameters": {
12007	//     "instance": {
12008	//       "description": "Database instance ID. This does not include the project ID.",
12009	//       "location": "path",
12010	//       "required": true,
12011	//       "type": "string"
12012	//     },
12013	//     "project": {
12014	//       "description": "Project ID of the project that contains the instance.",
12015	//       "location": "path",
12016	//       "required": true,
12017	//       "type": "string"
12018	//     }
12019	//   },
12020	//   "path": "v1/projects/{project}/instances/{instance}/users",
12021	//   "response": {
12022	//     "$ref": "UsersListResponse"
12023	//   },
12024	//   "scopes": [
12025	//     "https://www.googleapis.com/auth/cloud-platform",
12026	//     "https://www.googleapis.com/auth/sqlservice.admin"
12027	//   ]
12028	// }
12029
12030}
12031
12032// method id "sql.users.update":
12033
12034type UsersUpdateCall struct {
12035	s          *Service
12036	project    string
12037	instance   string
12038	user       *User
12039	urlParams_ gensupport.URLParams
12040	ctx_       context.Context
12041	header_    http.Header
12042}
12043
12044// Update: Updates an existing user in a Cloud SQL instance.
12045//
12046// - instance: Database instance ID. This does not include the project
12047//   ID.
12048// - project: Project ID of the project that contains the instance.
12049func (r *UsersService) Update(project string, instance string, user *User) *UsersUpdateCall {
12050	c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12051	c.project = project
12052	c.instance = instance
12053	c.user = user
12054	return c
12055}
12056
12057// Host sets the optional parameter "host": Host of the user in the
12058// instance.
12059func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall {
12060	c.urlParams_.Set("host", host)
12061	return c
12062}
12063
12064// Name sets the optional parameter "name": Name of the user in the
12065// instance.
12066func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall {
12067	c.urlParams_.Set("name", name)
12068	return c
12069}
12070
12071// Fields allows partial responses to be retrieved. See
12072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12073// for more information.
12074func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
12075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12076	return c
12077}
12078
12079// Context sets the context to be used in this call's Do method. Any
12080// pending HTTP request will be aborted if the provided context is
12081// canceled.
12082func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
12083	c.ctx_ = ctx
12084	return c
12085}
12086
12087// Header returns an http.Header that can be modified by the caller to
12088// add HTTP headers to the request.
12089func (c *UsersUpdateCall) Header() http.Header {
12090	if c.header_ == nil {
12091		c.header_ = make(http.Header)
12092	}
12093	return c.header_
12094}
12095
12096func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
12097	reqHeaders := make(http.Header)
12098	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12099	for k, v := range c.header_ {
12100		reqHeaders[k] = v
12101	}
12102	reqHeaders.Set("User-Agent", c.s.userAgent())
12103	var body io.Reader = nil
12104	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
12105	if err != nil {
12106		return nil, err
12107	}
12108	reqHeaders.Set("Content-Type", "application/json")
12109	c.urlParams_.Set("alt", alt)
12110	c.urlParams_.Set("prettyPrint", "false")
12111	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
12112	urls += "?" + c.urlParams_.Encode()
12113	req, err := http.NewRequest("PUT", urls, body)
12114	if err != nil {
12115		return nil, err
12116	}
12117	req.Header = reqHeaders
12118	googleapi.Expand(req.URL, map[string]string{
12119		"project":  c.project,
12120		"instance": c.instance,
12121	})
12122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12123}
12124
12125// Do executes the "sql.users.update" call.
12126// Exactly one of *Operation or error will be non-nil. Any non-2xx
12127// status code is an error. Response headers are in either
12128// *Operation.ServerResponse.Header or (if a response was returned at
12129// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12130// to check whether the returned error was because
12131// http.StatusNotModified was returned.
12132func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12133	gensupport.SetOptions(c.urlParams_, opts...)
12134	res, err := c.doRequest("json")
12135	if res != nil && res.StatusCode == http.StatusNotModified {
12136		if res.Body != nil {
12137			res.Body.Close()
12138		}
12139		return nil, &googleapi.Error{
12140			Code:   res.StatusCode,
12141			Header: res.Header,
12142		}
12143	}
12144	if err != nil {
12145		return nil, err
12146	}
12147	defer googleapi.CloseBody(res)
12148	if err := googleapi.CheckResponse(res); err != nil {
12149		return nil, err
12150	}
12151	ret := &Operation{
12152		ServerResponse: googleapi.ServerResponse{
12153			Header:         res.Header,
12154			HTTPStatusCode: res.StatusCode,
12155		},
12156	}
12157	target := &ret
12158	if err := gensupport.DecodeResponse(target, res); err != nil {
12159		return nil, err
12160	}
12161	return ret, nil
12162	// {
12163	//   "description": "Updates an existing user in a Cloud SQL instance.",
12164	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
12165	//   "httpMethod": "PUT",
12166	//   "id": "sql.users.update",
12167	//   "parameterOrder": [
12168	//     "project",
12169	//     "instance"
12170	//   ],
12171	//   "parameters": {
12172	//     "host": {
12173	//       "description": "Optional. Host of the user in the instance.",
12174	//       "location": "query",
12175	//       "type": "string"
12176	//     },
12177	//     "instance": {
12178	//       "description": "Database instance ID. This does not include the project ID.",
12179	//       "location": "path",
12180	//       "required": true,
12181	//       "type": "string"
12182	//     },
12183	//     "name": {
12184	//       "description": "Name of the user in the instance.",
12185	//       "location": "query",
12186	//       "type": "string"
12187	//     },
12188	//     "project": {
12189	//       "description": "Project ID of the project that contains the instance.",
12190	//       "location": "path",
12191	//       "required": true,
12192	//       "type": "string"
12193	//     }
12194	//   },
12195	//   "path": "v1/projects/{project}/instances/{instance}/users",
12196	//   "request": {
12197	//     "$ref": "User"
12198	//   },
12199	//   "response": {
12200	//     "$ref": "Operation"
12201	//   },
12202	//   "scopes": [
12203	//     "https://www.googleapis.com/auth/cloud-platform",
12204	//     "https://www.googleapis.com/auth/sqlservice.admin"
12205	//   ]
12206	// }
12207
12208}
12209