1// Copyright 2020 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 sql 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/sql/v1beta4"
16//   ...
17//   ctx := context.Background()
18//   sqlService, err := sql.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//   sqlService, err := sql.NewService(ctx, option.WithScopes(sql.SqlserviceAdminScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   sqlService, err := sql.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//   sqlService, err := sql.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42//
43// Deprecated: please use "google.golang.org/api/sqladmin/v1beta4" instead. This
44// client was accidentally generated under the wrong package. The correct package
45// is "sqladmin". This client will be removed in a future release.
46package sql // import "google.golang.org/api/sql/v1beta4"
47
48import (
49	"bytes"
50	"context"
51	"encoding/json"
52	"errors"
53	"fmt"
54	"io"
55	"net/http"
56	"net/url"
57	"strconv"
58	"strings"
59
60	googleapi "google.golang.org/api/googleapi"
61	gensupport "google.golang.org/api/internal/gensupport"
62	option "google.golang.org/api/option"
63	internaloption "google.golang.org/api/option/internaloption"
64	htransport "google.golang.org/api/transport/http"
65)
66
67// Always reference these packages, just in case the auto-generated code
68// below doesn't.
69var _ = bytes.NewBuffer
70var _ = strconv.Itoa
71var _ = fmt.Sprintf
72var _ = json.NewDecoder
73var _ = io.Copy
74var _ = url.Parse
75var _ = gensupport.MarshalJSON
76var _ = googleapi.Version
77var _ = errors.New
78var _ = strings.Replace
79var _ = context.Canceled
80var _ = internaloption.WithDefaultEndpoint
81
82const apiId = "sql:v1beta4"
83const apiName = "sql"
84const apiVersion = "v1beta4"
85const basePath = "https://sqladmin.googleapis.com/"
86
87// OAuth2 scopes used by this API.
88const (
89	// View and manage your data across Google Cloud Platform services
90	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
91
92	// Manage your Google SQL Service instances
93	SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin"
94)
95
96// NewService creates a new Service.
97func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
98	scopesOption := option.WithScopes(
99		"https://www.googleapis.com/auth/cloud-platform",
100		"https://www.googleapis.com/auth/sqlservice.admin",
101	)
102	// NOTE: prepend, so we don't override user-specified scopes.
103	opts = append([]option.ClientOption{scopesOption}, opts...)
104	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
105	client, endpoint, err := htransport.NewClient(ctx, opts...)
106	if err != nil {
107		return nil, err
108	}
109	s, err := New(client)
110	if err != nil {
111		return nil, err
112	}
113	if endpoint != "" {
114		s.BasePath = endpoint
115	}
116	return s, nil
117}
118
119// New creates a new Service. It uses the provided http.Client for requests.
120//
121// Deprecated: please use NewService instead.
122// To provide a custom HTTP client, use option.WithHTTPClient.
123// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
124func New(client *http.Client) (*Service, error) {
125	if client == nil {
126		return nil, errors.New("client is nil")
127	}
128	s := &Service{client: client, BasePath: basePath}
129	s.BackupRuns = NewBackupRunsService(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	Databases *DatabasesService
149
150	Flags *FlagsService
151
152	Instances *InstancesService
153
154	Operations *OperationsService
155
156	Projects *ProjectsService
157
158	SslCerts *SslCertsService
159
160	Tiers *TiersService
161
162	Users *UsersService
163}
164
165func (s *Service) userAgent() string {
166	if s.UserAgent == "" {
167		return googleapi.UserAgent
168	}
169	return googleapi.UserAgent + " " + s.UserAgent
170}
171
172func NewBackupRunsService(s *Service) *BackupRunsService {
173	rs := &BackupRunsService{s: s}
174	return rs
175}
176
177type BackupRunsService struct {
178	s *Service
179}
180
181func NewDatabasesService(s *Service) *DatabasesService {
182	rs := &DatabasesService{s: s}
183	return rs
184}
185
186type DatabasesService struct {
187	s *Service
188}
189
190func NewFlagsService(s *Service) *FlagsService {
191	rs := &FlagsService{s: s}
192	return rs
193}
194
195type FlagsService struct {
196	s *Service
197}
198
199func NewInstancesService(s *Service) *InstancesService {
200	rs := &InstancesService{s: s}
201	return rs
202}
203
204type InstancesService struct {
205	s *Service
206}
207
208func NewOperationsService(s *Service) *OperationsService {
209	rs := &OperationsService{s: s}
210	return rs
211}
212
213type OperationsService struct {
214	s *Service
215}
216
217func NewProjectsService(s *Service) *ProjectsService {
218	rs := &ProjectsService{s: s}
219	rs.Instances = NewProjectsInstancesService(s)
220	return rs
221}
222
223type ProjectsService struct {
224	s *Service
225
226	Instances *ProjectsInstancesService
227}
228
229func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
230	rs := &ProjectsInstancesService{s: s}
231	return rs
232}
233
234type ProjectsInstancesService struct {
235	s *Service
236}
237
238func NewSslCertsService(s *Service) *SslCertsService {
239	rs := &SslCertsService{s: s}
240	return rs
241}
242
243type SslCertsService struct {
244	s *Service
245}
246
247func NewTiersService(s *Service) *TiersService {
248	rs := &TiersService{s: s}
249	return rs
250}
251
252type TiersService struct {
253	s *Service
254}
255
256func NewUsersService(s *Service) *UsersService {
257	rs := &UsersService{s: s}
258	return rs
259}
260
261type UsersService struct {
262	s *Service
263}
264
265// AclEntry: An entry for an Access Control list.
266type AclEntry struct {
267	// ExpirationTime: The time when this access control entry expires in
268	// <a
269	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
270	// example
271	// <code>2012-11-15T16:19:00.094Z</code>.
272	ExpirationTime string `json:"expirationTime,omitempty"`
273
274	// Kind: This is always <code>sql#aclEntry</code>.
275	Kind string `json:"kind,omitempty"`
276
277	// Name: Optional. A label to identify this entry.
278	Name string `json:"name,omitempty"`
279
280	// Value: The whitelisted value for the access control list.
281	Value string `json:"value,omitempty"`
282
283	// ForceSendFields is a list of field names (e.g. "ExpirationTime") to
284	// unconditionally include in API requests. By default, fields with
285	// empty values are omitted from API requests. However, any non-pointer,
286	// non-interface field appearing in ForceSendFields will be sent to the
287	// server regardless of whether the field is empty or not. This may be
288	// used to include empty fields in Patch requests.
289	ForceSendFields []string `json:"-"`
290
291	// NullFields is a list of field names (e.g. "ExpirationTime") to
292	// include in API requests with the JSON null value. By default, fields
293	// with empty values are omitted from API requests. However, any field
294	// with an empty value appearing in NullFields will be sent to the
295	// server as null. It is an error if a field in this list has a
296	// non-empty value. This may be used to include null fields in Patch
297	// requests.
298	NullFields []string `json:"-"`
299}
300
301func (s *AclEntry) MarshalJSON() ([]byte, error) {
302	type NoMethod AclEntry
303	raw := NoMethod(*s)
304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
305}
306
307// ApiWarning: An Admin API warning message.
308type ApiWarning struct {
309	// Code: Code to uniquely identify the warning type.
310	//
311	// Possible values:
312	//   "SQL_API_WARNING_CODE_UNSPECIFIED" - An unknown or unset warning
313	// type from Cloud SQL API.
314	//   "REGION_UNREACHABLE" - Warning when one or more regions are not
315	// reachable.  The returned result
316	// set may be incomplete.
317	Code string `json:"code,omitempty"`
318
319	// Message: The warning message.
320	Message string `json:"message,omitempty"`
321
322	// ForceSendFields is a list of field names (e.g. "Code") to
323	// unconditionally include in API requests. By default, fields with
324	// empty values are omitted from API requests. However, any non-pointer,
325	// non-interface field appearing in ForceSendFields will be sent to the
326	// server regardless of whether the field is empty or not. This may be
327	// used to include empty fields in Patch requests.
328	ForceSendFields []string `json:"-"`
329
330	// NullFields is a list of field names (e.g. "Code") to include in API
331	// requests with the JSON null value. By default, fields with empty
332	// values are omitted from API requests. However, any field with an
333	// empty value appearing in NullFields will be sent to the server as
334	// null. It is an error if a field in this list has a non-empty value.
335	// This may be used to include null fields in Patch requests.
336	NullFields []string `json:"-"`
337}
338
339func (s *ApiWarning) MarshalJSON() ([]byte, error) {
340	type NoMethod ApiWarning
341	raw := NoMethod(*s)
342	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
343}
344
345// BackupConfiguration: Database instance backup configuration.
346type BackupConfiguration struct {
347	// BinaryLogEnabled: (MySQL only) Whether binary log is enabled. If
348	// backup configuration is
349	// disabled, binarylog must be disabled as well.
350	BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"`
351
352	// Enabled: Whether this configuration is enabled.
353	Enabled bool `json:"enabled,omitempty"`
354
355	// Kind: This is always <code>sql#backupConfiguration</code>.
356	Kind string `json:"kind,omitempty"`
357
358	// Location: Location of the backup
359	Location string `json:"location,omitempty"`
360
361	// PointInTimeRecoveryEnabled: Reserved for future use.
362	PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"`
363
364	// ReplicationLogArchivingEnabled: Reserved for future use.
365	ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"`
366
367	// StartTime: Start time for the daily backup configuration in UTC
368	// timezone in the 24
369	// hour format - <code>HH:MM</code>.
370	StartTime string `json:"startTime,omitempty"`
371
372	// ForceSendFields is a list of field names (e.g. "BinaryLogEnabled") to
373	// unconditionally include in API requests. By default, fields with
374	// empty values are omitted from API requests. However, any non-pointer,
375	// non-interface field appearing in ForceSendFields will be sent to the
376	// server regardless of whether the field is empty or not. This may be
377	// used to include empty fields in Patch requests.
378	ForceSendFields []string `json:"-"`
379
380	// NullFields is a list of field names (e.g. "BinaryLogEnabled") to
381	// include in API requests with the JSON null value. By default, fields
382	// with empty values are omitted from API requests. However, any field
383	// with an empty value appearing in NullFields will be sent to the
384	// server as null. It is an error if a field in this list has a
385	// non-empty value. This may be used to include null fields in Patch
386	// requests.
387	NullFields []string `json:"-"`
388}
389
390func (s *BackupConfiguration) MarshalJSON() ([]byte, error) {
391	type NoMethod BackupConfiguration
392	raw := NoMethod(*s)
393	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
394}
395
396// BackupRun: A BackupRun resource.
397type BackupRun struct {
398	// Description: The description of this run, only applicable to
399	// on-demand backups.
400	Description string `json:"description,omitempty"`
401
402	// DiskEncryptionConfiguration: Encryption configuration specific to a
403	// backup.
404	// Applies only to Second Generation instances.
405	DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
406
407	// DiskEncryptionStatus: Encryption status specific to a backup.
408	// Applies only to Second Generation instances.
409	DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
410
411	// EndTime: The time the backup operation completed in UTC timezone in
412	// <a
413	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
414	// example
415	// <code>2012-11-15T16:19:00.094Z</code>.
416	EndTime string `json:"endTime,omitempty"`
417
418	// EnqueuedTime: The time the run was enqueued in UTC timezone in
419	// <a
420	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
421	// example
422	// <code>2012-11-15T16:19:00.094Z</code>.
423	EnqueuedTime string `json:"enqueuedTime,omitempty"`
424
425	// Error: Information about why the backup operation failed. This is
426	// only present if
427	// the run has the FAILED status.
428	Error *OperationError `json:"error,omitempty"`
429
430	// Id: The identifier for this backup run. Unique only for a specific
431	// Cloud SQL
432	// instance.
433	Id int64 `json:"id,omitempty,string"`
434
435	// Instance: Name of the database instance.
436	Instance string `json:"instance,omitempty"`
437
438	// Kind: This is always <code>sql#backupRun</code>.
439	Kind string `json:"kind,omitempty"`
440
441	// Location: Location of the backups.
442	Location string `json:"location,omitempty"`
443
444	// SelfLink: The URI of this resource.
445	SelfLink string `json:"selfLink,omitempty"`
446
447	// StartTime: The time the backup operation actually started in UTC
448	// timezone in <a
449	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
450	// example
451	// <code>2012-11-15T16:19:00.094Z</code>.
452	StartTime string `json:"startTime,omitempty"`
453
454	// Status: The status of this run.
455	//
456	// Possible values:
457	//   "SQL_BACKUP_RUN_STATUS_UNSPECIFIED" - The status of the run is
458	// unknown.
459	//   "ENQUEUED" - The backup operation was enqueued.
460	//   "OVERDUE" - The backup is overdue across a given backup window.
461	// Indicates a
462	// problem. Example: Long-running operation in progress during
463	// the whole window.
464	//   "RUNNING" - The backup is in progress.
465	//   "FAILED" - The backup failed.
466	//   "SUCCESSFUL" - The backup was successful.
467	//   "SKIPPED" - The backup was skipped (without problems) for a given
468	// backup
469	// window. Example: Instance was idle.
470	//   "DELETION_PENDING" - The backup is about to be deleted.
471	//   "DELETION_FAILED" - The backup deletion failed.
472	//   "DELETED" - The backup has been deleted.
473	Status string `json:"status,omitempty"`
474
475	// Type: The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
476	//
477	// Possible values:
478	//   "SQL_BACKUP_RUN_TYPE_UNSPECIFIED" - This is an unknown BackupRun
479	// type.
480	//   "AUTOMATED" - The backup schedule automatically triggers a backup.
481	//   "ON_DEMAND" - The user manually triggers a backup.
482	Type string `json:"type,omitempty"`
483
484	// WindowStartTime: The start time of the backup window during which
485	// this the backup was
486	// attempted in <a href="https://tools.ietf.org/html/rfc3339">RFC
487	// 3339</a>
488	// format, for example <code>2012-11-15T16:19:00.094Z</code>.
489	WindowStartTime string `json:"windowStartTime,omitempty"`
490
491	// ServerResponse contains the HTTP response code and headers from the
492	// server.
493	googleapi.ServerResponse `json:"-"`
494
495	// ForceSendFields is a list of field names (e.g. "Description") to
496	// unconditionally include in API requests. By default, fields with
497	// empty values are omitted from API requests. However, any non-pointer,
498	// non-interface field appearing in ForceSendFields will be sent to the
499	// server regardless of whether the field is empty or not. This may be
500	// used to include empty fields in Patch requests.
501	ForceSendFields []string `json:"-"`
502
503	// NullFields is a list of field names (e.g. "Description") to include
504	// in API requests with the JSON null value. By default, fields with
505	// empty values are omitted from API requests. However, any field with
506	// an empty value appearing in NullFields will be sent to the server as
507	// null. It is an error if a field in this list has a non-empty value.
508	// This may be used to include null fields in Patch requests.
509	NullFields []string `json:"-"`
510}
511
512func (s *BackupRun) MarshalJSON() ([]byte, error) {
513	type NoMethod BackupRun
514	raw := NoMethod(*s)
515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
516}
517
518// BackupRunsListResponse: Backup run list results.
519type BackupRunsListResponse struct {
520	// Items: A list of backup runs in reverse chronological order of the
521	// enqueued time.
522	Items []*BackupRun `json:"items,omitempty"`
523
524	// Kind: This is always <code>sql#backupRunsList</code>.
525	Kind string `json:"kind,omitempty"`
526
527	// NextPageToken: The continuation token, used to page through large
528	// result sets. Provide
529	// this value in a subsequent request to return the next page of
530	// results.
531	NextPageToken string `json:"nextPageToken,omitempty"`
532
533	// ServerResponse contains the HTTP response code and headers from the
534	// server.
535	googleapi.ServerResponse `json:"-"`
536
537	// ForceSendFields is a list of field names (e.g. "Items") to
538	// unconditionally include in API requests. By default, fields with
539	// empty values are omitted from API requests. However, any non-pointer,
540	// non-interface field appearing in ForceSendFields will be sent to the
541	// server regardless of whether the field is empty or not. This may be
542	// used to include empty fields in Patch requests.
543	ForceSendFields []string `json:"-"`
544
545	// NullFields is a list of field names (e.g. "Items") to include in API
546	// requests with the JSON null value. By default, fields with empty
547	// values are omitted from API requests. However, any field with an
548	// empty value appearing in NullFields will be sent to the server as
549	// null. It is an error if a field in this list has a non-empty value.
550	// This may be used to include null fields in Patch requests.
551	NullFields []string `json:"-"`
552}
553
554func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error) {
555	type NoMethod BackupRunsListResponse
556	raw := NoMethod(*s)
557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
558}
559
560// BinLogCoordinates: Binary log coordinates.
561type BinLogCoordinates struct {
562	// BinLogFileName: Name of the binary log file for a Cloud SQL instance.
563	BinLogFileName string `json:"binLogFileName,omitempty"`
564
565	// BinLogPosition: Position (offset) within the binary log file.
566	BinLogPosition int64 `json:"binLogPosition,omitempty,string"`
567
568	// Kind: This is always <code>sql#binLogCoordinates</code>.
569	Kind string `json:"kind,omitempty"`
570
571	// ForceSendFields is a list of field names (e.g. "BinLogFileName") to
572	// unconditionally include in API requests. By default, fields with
573	// empty values are omitted from API requests. However, any non-pointer,
574	// non-interface field appearing in ForceSendFields will be sent to the
575	// server regardless of whether the field is empty or not. This may be
576	// used to include empty fields in Patch requests.
577	ForceSendFields []string `json:"-"`
578
579	// NullFields is a list of field names (e.g. "BinLogFileName") to
580	// include in API requests with the JSON null value. By default, fields
581	// with empty values are omitted from API requests. However, any field
582	// with an empty value appearing in NullFields will be sent to the
583	// server as null. It is an error if a field in this list has a
584	// non-empty value. This may be used to include null fields in Patch
585	// requests.
586	NullFields []string `json:"-"`
587}
588
589func (s *BinLogCoordinates) MarshalJSON() ([]byte, error) {
590	type NoMethod BinLogCoordinates
591	raw := NoMethod(*s)
592	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
593}
594
595// CloneContext: Database instance clone context.
596type CloneContext struct {
597	// BinLogCoordinates: Binary log coordinates, if specified, identify the
598	// position up to which the
599	// source instance should be cloned. If not specified, the source
600	// instance is
601	// cloned up to the most recent binary log coordinates.
602	BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"`
603
604	// DestinationInstanceName: Name of the Cloud SQL instance to be created
605	// as a clone.
606	DestinationInstanceName string `json:"destinationInstanceName,omitempty"`
607
608	// Kind: This is always <code>sql#cloneContext</code>.
609	Kind string `json:"kind,omitempty"`
610
611	// PitrTimestampMs: Reserved for future use.
612	PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"`
613
614	// PointInTime: Reserved for future use.
615	PointInTime string `json:"pointInTime,omitempty"`
616
617	// ForceSendFields is a list of field names (e.g. "BinLogCoordinates")
618	// to unconditionally include in API requests. By default, fields with
619	// empty values are omitted from API requests. However, any non-pointer,
620	// non-interface field appearing in ForceSendFields will be sent to the
621	// server regardless of whether the field is empty or not. This may be
622	// used to include empty fields in Patch requests.
623	ForceSendFields []string `json:"-"`
624
625	// NullFields is a list of field names (e.g. "BinLogCoordinates") to
626	// include in API requests with the JSON null value. By default, fields
627	// with empty values are omitted from API requests. However, any field
628	// with an empty value appearing in NullFields will be sent to the
629	// server as null. It is an error if a field in this list has a
630	// non-empty value. This may be used to include null fields in Patch
631	// requests.
632	NullFields []string `json:"-"`
633}
634
635func (s *CloneContext) MarshalJSON() ([]byte, error) {
636	type NoMethod CloneContext
637	raw := NoMethod(*s)
638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
639}
640
641// Database: Represents a SQL database on the Cloud SQL instance.
642type Database struct {
643	// Charset: The MySQL charset value.
644	Charset string `json:"charset,omitempty"`
645
646	// Collation: The MySQL collation value.
647	Collation string `json:"collation,omitempty"`
648
649	// Etag: This field is deprecated and will be removed from a future
650	// version of the
651	// API.
652	Etag string `json:"etag,omitempty"`
653
654	// Instance: The name of the Cloud SQL instance. This does not include
655	// the project ID.
656	Instance string `json:"instance,omitempty"`
657
658	// Kind: This is always <code>sql#database</code>.
659	Kind string `json:"kind,omitempty"`
660
661	// Name: The name of the database in the Cloud SQL instance. This does
662	// not include
663	// the project ID or instance name.
664	Name string `json:"name,omitempty"`
665
666	// Project: The project ID of the project containing the Cloud SQL
667	// database. The Google
668	// apps domain is prefixed if applicable.
669	Project string `json:"project,omitempty"`
670
671	// SelfLink: The URI of this resource.
672	SelfLink string `json:"selfLink,omitempty"`
673
674	SqlserverDatabaseDetails *SqlServerDatabaseDetails `json:"sqlserverDatabaseDetails,omitempty"`
675
676	// ServerResponse contains the HTTP response code and headers from the
677	// server.
678	googleapi.ServerResponse `json:"-"`
679
680	// ForceSendFields is a list of field names (e.g. "Charset") to
681	// unconditionally include in API requests. By default, fields with
682	// empty values are omitted from API requests. However, any non-pointer,
683	// non-interface field appearing in ForceSendFields will be sent to the
684	// server regardless of whether the field is empty or not. This may be
685	// used to include empty fields in Patch requests.
686	ForceSendFields []string `json:"-"`
687
688	// NullFields is a list of field names (e.g. "Charset") to include in
689	// API requests with the JSON null value. By default, fields with empty
690	// values are omitted from API requests. However, any field with an
691	// empty value appearing in NullFields will be sent to the server as
692	// null. It is an error if a field in this list has a non-empty value.
693	// This may be used to include null fields in Patch requests.
694	NullFields []string `json:"-"`
695}
696
697func (s *Database) MarshalJSON() ([]byte, error) {
698	type NoMethod Database
699	raw := NoMethod(*s)
700	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
701}
702
703// DatabaseFlags: Database flags for Cloud SQL instances.
704type DatabaseFlags struct {
705	// Name: The name of the flag. These flags are passed at instance
706	// startup, so
707	// include both server options and system variables for MySQL. Flags
708	// should be
709	// specified with underscores, not hyphens. For more information, see
710	// <a
711	// href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the
712	// Cloud
713	// SQL documentation.
714	Name string `json:"name,omitempty"`
715
716	// Value: The value of the flag. Booleans should be set to
717	// <code>on</code> for true
718	// and <code>off</code> for false. This field must be omitted if the
719	// flag
720	// doesn't take a value.
721	Value string `json:"value,omitempty"`
722
723	// ForceSendFields is a list of field names (e.g. "Name") to
724	// unconditionally include in API requests. By default, fields with
725	// empty values are omitted from API requests. However, any non-pointer,
726	// non-interface field appearing in ForceSendFields will be sent to the
727	// server regardless of whether the field is empty or not. This may be
728	// used to include empty fields in Patch requests.
729	ForceSendFields []string `json:"-"`
730
731	// NullFields is a list of field names (e.g. "Name") to include in API
732	// requests with the JSON null value. By default, fields with empty
733	// values are omitted from API requests. However, any field with an
734	// empty value appearing in NullFields will be sent to the server as
735	// null. It is an error if a field in this list has a non-empty value.
736	// This may be used to include null fields in Patch requests.
737	NullFields []string `json:"-"`
738}
739
740func (s *DatabaseFlags) MarshalJSON() ([]byte, error) {
741	type NoMethod DatabaseFlags
742	raw := NoMethod(*s)
743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
744}
745
746// DatabaseInstance: A Cloud SQL instance resource.
747type DatabaseInstance struct {
748	// BackendType: <code>FIRST_GEN</code>: First Generation instance. MySQL
749	// only. <br
750	// /><code>SECOND_GEN</code>: Second Generation instance or
751	// PostgreSQL
752	// instance. <br /><code>EXTERNAL</code>: A database server that is
753	// not
754	// managed by Google. <br>This property is read-only; use
755	// the
756	// <code>tier</code> property in the <code>settings</code> object to
757	// determine
758	// the database type and Second or First Generation.
759	//
760	// Possible values:
761	//   "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type
762	// for instance.
763	//   "FIRST_GEN" - V1 speckle instance.
764	//   "SECOND_GEN" - V2 speckle instance.
765	//   "EXTERNAL" - On premises instance.
766	BackendType string `json:"backendType,omitempty"`
767
768	// ConnectionName: Connection name of the Cloud SQL instance used in
769	// connection strings.
770	ConnectionName string `json:"connectionName,omitempty"`
771
772	// CurrentDiskSize: The current disk usage of the instance in bytes.
773	// This property has been
774	// deprecated. Users should use
775	// the
776	// "cloudsql.googleapis.com/database/disk/bytes_used" metric in
777	// Cloud
778	// Monitoring API instead. Please see
779	// <a
780	// href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7
781	// -F9EBhT0/BtvFtdFeAgAJ">this
782	// announcement</a> for details.
783	CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"`
784
785	// DatabaseVersion: The database engine type and version. The
786	// <code>databaseVersion</code>
787	// field can not be changed after instance creation.  MySQL Second
788	// Generation
789	// instances: <code>MYSQL_5_7</code> (default) or
790	// <code>MYSQL_5_6</code>.
791	// PostgreSQL instances: <code>POSTGRES_9_6</code> (default)
792	// or
793	// <code>POSTGRES_11 Beta</code> MySQL First Generation
794	// instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code>
795	//
796	// Possible values:
797	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
798	// version.
799	//   "MYSQL_5_1" - The database version is MySQL 5.1.
800	//   "MYSQL_5_5" - The database version is MySQL 5.5.
801	//   "MYSQL_5_6" - The database version is MySQL 5.6.
802	//   "MYSQL_5_7" - The database version is MySQL 5.7.
803	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
804	//   "POSTGRES_11" - The database version is PostgreSQL 11.
805	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
806	// Standard.
807	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
808	// 2017 Enterprise.
809	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
810	// Express.
811	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
812	//   "POSTGRES_10" - The database version is PostgreSQL 10.
813	//   "POSTGRES_12" - The database version is PostgreSQL 12.
814	DatabaseVersion string `json:"databaseVersion,omitempty"`
815
816	// DiskEncryptionConfiguration: Disk encryption configuration specific
817	// to an instance.
818	// Applies only to Second Generation instances.
819	DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
820
821	// DiskEncryptionStatus: Disk encryption status specific to an
822	// instance.
823	// Applies only to Second Generation instances.
824	DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
825
826	// Etag: This field is deprecated and will be removed from a future
827	// version of the
828	// API. Use the <code>settings.settingsVersion</code> field instead.
829	Etag string `json:"etag,omitempty"`
830
831	// FailoverReplica: The name and status of the failover replica. This
832	// property is applicable
833	// only to Second Generation instances.
834	FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"`
835
836	// GceZone: The Compute Engine zone that the instance is currently
837	// serving from. This
838	// value could be different from the zone that was specified when the
839	// instance
840	// was created if the instance has failed over to its secondary zone.
841	GceZone string `json:"gceZone,omitempty"`
842
843	// InstanceType: The instance type. This can be one of the
844	// following.
845	// <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is
846	// not
847	// replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>:
848	// An
849	// instance running on the
850	// customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud
851	// SQL
852	// instance configured as a read-replica.
853	//
854	// Possible values:
855	//   "SQL_INSTANCE_TYPE_UNSPECIFIED" - This is an unknown Cloud SQL
856	// instance type.
857	//   "CLOUD_SQL_INSTANCE" - A regular Cloud SQL instance.
858	//   "ON_PREMISES_INSTANCE" - An instance running on the customer's
859	// premises that is not managed by
860	// Cloud SQL.
861	//   "READ_REPLICA_INSTANCE" - A Cloud SQL instance acting as a
862	// read-replica.
863	InstanceType string `json:"instanceType,omitempty"`
864
865	// IpAddresses: The assigned IP addresses for the instance.
866	IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
867
868	// Ipv6Address: The IPv6 address assigned to the instance. This property
869	// is applicable only
870	// to First Generation instances.
871	Ipv6Address string `json:"ipv6Address,omitempty"`
872
873	// Kind: This is always <code>sql#instance</code>.
874	Kind string `json:"kind,omitempty"`
875
876	// MasterInstanceName: The name of the instance which will act as master
877	// in the replication setup.
878	MasterInstanceName string `json:"masterInstanceName,omitempty"`
879
880	// MaxDiskSize: The maximum disk size of the instance in bytes.
881	MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"`
882
883	// Name: Name of the Cloud SQL instance. This does not include the
884	// project ID.
885	Name string `json:"name,omitempty"`
886
887	// OnPremisesConfiguration: Configuration specific to on-premises
888	// instances.
889	OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"`
890
891	// Project: The project ID of the project containing the Cloud SQL
892	// instance. The Google
893	// apps domain is prefixed if applicable.
894	Project string `json:"project,omitempty"`
895
896	// Region: The geographical region. Can be
897	// <code>us-central</code>
898	// (<code>FIRST_GEN</code> instances only),
899	// <code>us-central1</code>
900	// (<code>SECOND_GEN</code> instances only), <code>asia-east1</code>
901	// or
902	// <code>europe-west1</code>. Defaults to <code>us-central</code>
903	// or
904	// <code>us-central1</code> depending on the instance type (First
905	// Generation
906	// or Second Generation). The region can not be changed after
907	// instance
908	// creation.
909	Region string `json:"region,omitempty"`
910
911	// ReplicaConfiguration: Configuration specific to failover replicas and
912	// read replicas.
913	ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"`
914
915	// ReplicaNames: The replicas of the instance.
916	ReplicaNames []string `json:"replicaNames,omitempty"`
917
918	// RootPassword: Initial root password. Use only on creation.
919	RootPassword string `json:"rootPassword,omitempty"`
920
921	// ScheduledMaintenance: The start time of any upcoming scheduled
922	// maintenance for this instance.
923	ScheduledMaintenance *SqlScheduledMaintenance `json:"scheduledMaintenance,omitempty"`
924
925	// SelfLink: The URI of this resource.
926	SelfLink string `json:"selfLink,omitempty"`
927
928	// ServerCaCert: SSL configuration.
929	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
930
931	// ServiceAccountEmailAddress: The service account email address
932	// assigned to the instance. This property
933	// is applicable only to Second Generation instances.
934	ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`
935
936	// Settings: The user settings.
937	Settings *Settings `json:"settings,omitempty"`
938
939	// State: The current serving state of the Cloud SQL instance. This can
940	// be one of the
941	// following. <br><code>RUNNABLE</code>: The instance is running, or is
942	// ready
943	// to run when accessed. <br><code>SUSPENDED</code>: The instance is
944	// not
945	// available, for example due to problems with
946	// billing.
947	// <br><code>PENDING_CREATE</code>: The instance is being
948	// created.
949	// <br><code>MAINTENANCE</code>: The instance is down for
950	// maintenance.
951	// <br><code>FAILED</code>: The instance creation
952	// failed.
953	// <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown.
954	//
955	// Possible values:
956	//   "SQL_INSTANCE_STATE_UNSPECIFIED" - The state of the instance is
957	// unknown.
958	//   "RUNNABLE" - The instance is running.
959	//   "SUSPENDED" - The instance is currently offline, but it may run
960	// again in the future.
961	//   "PENDING_DELETE" - The instance is being deleted.
962	//   "PENDING_CREATE" - The instance is being created.
963	//   "MAINTENANCE" - The instance is down for maintenance.
964	//   "FAILED" - The instance failed to be created.
965	State string `json:"state,omitempty"`
966
967	// SuspensionReason: If the instance state is SUSPENDED, the reason for
968	// the suspension.
969	//
970	// Possible values:
971	//   "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension
972	// reason.
973	//   "BILLING_ISSUE" - The instance is suspended due to billing issues
974	// (e.g., GCP account issue)
975	//   "LEGAL_ISSUE" - The instance is suspended due to illegal content
976	// (e.g., child pornography,
977	// copyrighted material, etc.).
978	//   "OPERATIONAL_ISSUE" - The instance is causing operational issues
979	// (e.g., causing the database
980	// to crash).
981	//   "KMS_KEY_ISSUE" - The KMS key used by the instance is either
982	// revoked or denied access to
983	SuspensionReason []string `json:"suspensionReason,omitempty"`
984
985	// ServerResponse contains the HTTP response code and headers from the
986	// server.
987	googleapi.ServerResponse `json:"-"`
988
989	// ForceSendFields is a list of field names (e.g. "BackendType") to
990	// unconditionally include in API requests. By default, fields with
991	// empty values are omitted from API requests. However, any non-pointer,
992	// non-interface field appearing in ForceSendFields will be sent to the
993	// server regardless of whether the field is empty or not. This may be
994	// used to include empty fields in Patch requests.
995	ForceSendFields []string `json:"-"`
996
997	// NullFields is a list of field names (e.g. "BackendType") to include
998	// in API requests with the JSON null value. By default, fields with
999	// empty values are omitted from API requests. However, any field with
1000	// an empty value appearing in NullFields will be sent to the server as
1001	// null. It is an error if a field in this list has a non-empty value.
1002	// This may be used to include null fields in Patch requests.
1003	NullFields []string `json:"-"`
1004}
1005
1006func (s *DatabaseInstance) MarshalJSON() ([]byte, error) {
1007	type NoMethod DatabaseInstance
1008	raw := NoMethod(*s)
1009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1010}
1011
1012// DatabaseInstanceFailoverReplica: The name and status of the failover
1013// replica. This property is applicable
1014// only to Second Generation instances.
1015type DatabaseInstanceFailoverReplica struct {
1016	// Available: The availability status of the failover replica. A false
1017	// status indicates
1018	// that the failover replica is out of sync. The master can only
1019	// failover to
1020	// the failover replica when the status is true.
1021	Available bool `json:"available,omitempty"`
1022
1023	// Name: The name of the failover replica. If specified at instance
1024	// creation, a
1025	// failover replica is created for the instance. The name
1026	// doesn't include the project ID. This property is applicable only
1027	// to
1028	// Second Generation instances.
1029	Name string `json:"name,omitempty"`
1030
1031	// ForceSendFields is a list of field names (e.g. "Available") to
1032	// unconditionally include in API requests. By default, fields with
1033	// empty values are omitted from API requests. However, any non-pointer,
1034	// non-interface field appearing in ForceSendFields will be sent to the
1035	// server regardless of whether the field is empty or not. This may be
1036	// used to include empty fields in Patch requests.
1037	ForceSendFields []string `json:"-"`
1038
1039	// NullFields is a list of field names (e.g. "Available") to include in
1040	// API requests with the JSON null value. By default, fields with empty
1041	// values are omitted from API requests. However, any field with an
1042	// empty value appearing in NullFields will be sent to the server as
1043	// null. It is an error if a field in this list has a non-empty value.
1044	// This may be used to include null fields in Patch requests.
1045	NullFields []string `json:"-"`
1046}
1047
1048func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) {
1049	type NoMethod DatabaseInstanceFailoverReplica
1050	raw := NoMethod(*s)
1051	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1052}
1053
1054// DatabasesListResponse: Database list response.
1055type DatabasesListResponse struct {
1056	// Items: List of database resources in the instance.
1057	Items []*Database `json:"items,omitempty"`
1058
1059	// Kind: This is always <code>sql#databasesList</code>.
1060	Kind string `json:"kind,omitempty"`
1061
1062	// ServerResponse contains the HTTP response code and headers from the
1063	// server.
1064	googleapi.ServerResponse `json:"-"`
1065
1066	// ForceSendFields is a list of field names (e.g. "Items") to
1067	// unconditionally include in API requests. By default, fields with
1068	// empty values are omitted from API requests. However, any non-pointer,
1069	// non-interface field appearing in ForceSendFields will be sent to the
1070	// server regardless of whether the field is empty or not. This may be
1071	// used to include empty fields in Patch requests.
1072	ForceSendFields []string `json:"-"`
1073
1074	// NullFields is a list of field names (e.g. "Items") to include in API
1075	// requests with the JSON null value. By default, fields with empty
1076	// values are omitted from API requests. However, any field with an
1077	// empty value appearing in NullFields will be sent to the server as
1078	// null. It is an error if a field in this list has a non-empty value.
1079	// This may be used to include null fields in Patch requests.
1080	NullFields []string `json:"-"`
1081}
1082
1083func (s *DatabasesListResponse) MarshalJSON() ([]byte, error) {
1084	type NoMethod DatabasesListResponse
1085	raw := NoMethod(*s)
1086	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1087}
1088
1089// DemoteMasterConfiguration: Read-replica configuration for connecting
1090// to the on-premises master.
1091type DemoteMasterConfiguration struct {
1092	// Kind: This is always <code>sql#demoteMasterConfiguration</code>.
1093	Kind string `json:"kind,omitempty"`
1094
1095	// MysqlReplicaConfiguration: MySQL specific configuration when
1096	// replicating from a MySQL on-premises
1097	// master. Replication configuration information such as the
1098	// username,
1099	// password, certificates, and keys are not stored in the instance
1100	// metadata.
1101	// The configuration information is used only to set up the
1102	// replication
1103	// connection and is stored by MySQL in a file named
1104	// <code>master.info</code>
1105	// in the data directory.
1106	MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
1107
1108	// ForceSendFields is a list of field names (e.g. "Kind") to
1109	// unconditionally include in API requests. By default, fields with
1110	// empty values are omitted from API requests. However, any non-pointer,
1111	// non-interface field appearing in ForceSendFields will be sent to the
1112	// server regardless of whether the field is empty or not. This may be
1113	// used to include empty fields in Patch requests.
1114	ForceSendFields []string `json:"-"`
1115
1116	// NullFields is a list of field names (e.g. "Kind") to include in API
1117	// requests with the JSON null value. By default, fields with empty
1118	// values are omitted from API requests. However, any field with an
1119	// empty value appearing in NullFields will be sent to the server as
1120	// null. It is an error if a field in this list has a non-empty value.
1121	// This may be used to include null fields in Patch requests.
1122	NullFields []string `json:"-"`
1123}
1124
1125func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error) {
1126	type NoMethod DemoteMasterConfiguration
1127	raw := NoMethod(*s)
1128	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1129}
1130
1131// DemoteMasterContext: Database instance demote master context.
1132type DemoteMasterContext struct {
1133	// Kind: This is always <code>sql#demoteMasterContext</code>.
1134	Kind string `json:"kind,omitempty"`
1135
1136	// MasterInstanceName: The name of the instance which will act as
1137	// on-premises master in the
1138	// replication setup.
1139	MasterInstanceName string `json:"masterInstanceName,omitempty"`
1140
1141	// ReplicaConfiguration: Configuration specific to read-replicas
1142	// replicating from the on-premises
1143	// master.
1144	ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"`
1145
1146	// VerifyGtidConsistency: Verify GTID consistency for demote operation.
1147	// Default value:
1148	// <code>True</code>. Second Generation instances only.  Setting this
1149	// flag to
1150	// false enables you to bypass GTID consistency check between
1151	// on-premises
1152	// master and Cloud SQL instance during the demotion operation but
1153	// also
1154	// exposes you to the risk of future replication failures. Change the
1155	// value
1156	// only if you know the reason for the GTID divergence and are confident
1157	// that
1158	// doing so will not cause any replication issues.
1159	VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"`
1160
1161	// ForceSendFields is a list of field names (e.g. "Kind") to
1162	// unconditionally include in API requests. By default, fields with
1163	// empty values are omitted from API requests. However, any non-pointer,
1164	// non-interface field appearing in ForceSendFields will be sent to the
1165	// server regardless of whether the field is empty or not. This may be
1166	// used to include empty fields in Patch requests.
1167	ForceSendFields []string `json:"-"`
1168
1169	// NullFields is a list of field names (e.g. "Kind") to include in API
1170	// requests with the JSON null value. By default, fields with empty
1171	// values are omitted from API requests. However, any field with an
1172	// empty value appearing in NullFields will be sent to the server as
1173	// null. It is an error if a field in this list has a non-empty value.
1174	// This may be used to include null fields in Patch requests.
1175	NullFields []string `json:"-"`
1176}
1177
1178func (s *DemoteMasterContext) MarshalJSON() ([]byte, error) {
1179	type NoMethod DemoteMasterContext
1180	raw := NoMethod(*s)
1181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1182}
1183
1184// DemoteMasterMySqlReplicaConfiguration: Read-replica configuration
1185// specific to MySQL databases.
1186type DemoteMasterMySqlReplicaConfiguration struct {
1187	// CaCertificate: PEM representation of the trusted CA's x509
1188	// certificate.
1189	CaCertificate string `json:"caCertificate,omitempty"`
1190
1191	// ClientCertificate: PEM representation of the slave's x509
1192	// certificate.
1193	ClientCertificate string `json:"clientCertificate,omitempty"`
1194
1195	// ClientKey: PEM representation of the slave's private key. The
1196	// corresponsing public key
1197	// is encoded in the client's certificate. The format of the slave's
1198	// private
1199	// key can be either PKCS #1 or PKCS #8.
1200	ClientKey string `json:"clientKey,omitempty"`
1201
1202	// Kind: This is always
1203	// <code>sql#demoteMasterMysqlReplicaConfiguration</code>.
1204	Kind string `json:"kind,omitempty"`
1205
1206	// Password: The password for the replication connection.
1207	Password string `json:"password,omitempty"`
1208
1209	// Username: The username for the replication connection.
1210	Username string `json:"username,omitempty"`
1211
1212	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
1213	// unconditionally include in API requests. By default, fields with
1214	// empty values are omitted from API requests. However, any non-pointer,
1215	// non-interface field appearing in ForceSendFields will be sent to the
1216	// server regardless of whether the field is empty or not. This may be
1217	// used to include empty fields in Patch requests.
1218	ForceSendFields []string `json:"-"`
1219
1220	// NullFields is a list of field names (e.g. "CaCertificate") to include
1221	// in API requests with the JSON null value. By default, fields with
1222	// empty values are omitted from API requests. However, any field with
1223	// an empty value appearing in NullFields will be sent to the server as
1224	// null. It is an error if a field in this list has a non-empty value.
1225	// This may be used to include null fields in Patch requests.
1226	NullFields []string `json:"-"`
1227}
1228
1229func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
1230	type NoMethod DemoteMasterMySqlReplicaConfiguration
1231	raw := NoMethod(*s)
1232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1233}
1234
1235// DiskEncryptionConfiguration: Disk encryption configuration for an
1236// instance.
1237type DiskEncryptionConfiguration struct {
1238	// Kind: This is always <code>sql#diskEncryptionConfiguration</code>.
1239	Kind string `json:"kind,omitempty"`
1240
1241	// KmsKeyName: Resource name of KMS key for disk encryption
1242	KmsKeyName string `json:"kmsKeyName,omitempty"`
1243
1244	// ForceSendFields is a list of field names (e.g. "Kind") to
1245	// unconditionally include in API requests. By default, fields with
1246	// empty values are omitted from API requests. However, any non-pointer,
1247	// non-interface field appearing in ForceSendFields will be sent to the
1248	// server regardless of whether the field is empty or not. This may be
1249	// used to include empty fields in Patch requests.
1250	ForceSendFields []string `json:"-"`
1251
1252	// NullFields is a list of field names (e.g. "Kind") to include in API
1253	// requests with the JSON null value. By default, fields with empty
1254	// values are omitted from API requests. However, any field with an
1255	// empty value appearing in NullFields will be sent to the server as
1256	// null. It is an error if a field in this list has a non-empty value.
1257	// This may be used to include null fields in Patch requests.
1258	NullFields []string `json:"-"`
1259}
1260
1261func (s *DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) {
1262	type NoMethod DiskEncryptionConfiguration
1263	raw := NoMethod(*s)
1264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1265}
1266
1267// DiskEncryptionStatus: Disk encryption status for an instance.
1268type DiskEncryptionStatus struct {
1269	// Kind: This is always <code>sql#diskEncryptionStatus</code>.
1270	Kind string `json:"kind,omitempty"`
1271
1272	// KmsKeyVersionName: KMS key version used to encrypt the Cloud SQL
1273	// instance resource
1274	KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`
1275
1276	// ForceSendFields is a list of field names (e.g. "Kind") to
1277	// unconditionally include in API requests. By default, fields with
1278	// empty values are omitted from API requests. However, any non-pointer,
1279	// non-interface field appearing in ForceSendFields will be sent to the
1280	// server regardless of whether the field is empty or not. This may be
1281	// used to include empty fields in Patch requests.
1282	ForceSendFields []string `json:"-"`
1283
1284	// NullFields is a list of field names (e.g. "Kind") to include in API
1285	// requests with the JSON null value. By default, fields with empty
1286	// values are omitted from API requests. However, any field with an
1287	// empty value appearing in NullFields will be sent to the server as
1288	// null. It is an error if a field in this list has a non-empty value.
1289	// This may be used to include null fields in Patch requests.
1290	NullFields []string `json:"-"`
1291}
1292
1293func (s *DiskEncryptionStatus) MarshalJSON() ([]byte, error) {
1294	type NoMethod DiskEncryptionStatus
1295	raw := NoMethod(*s)
1296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1297}
1298
1299// ExportContext: Database instance export context.
1300type ExportContext struct {
1301	// CsvExportOptions: Options for exporting data as CSV.
1302	CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"`
1303
1304	// Databases: Databases to be exported. <br /> <b>MySQL instances:</b>
1305	// If
1306	// <code>fileType</code> is <code>SQL</code> and no database is
1307	// specified, all
1308	// databases are exported, except for the <code>mysql</code> system
1309	// database.
1310	// If <code>fileType</code> is <code>CSV</code>, you can specify one
1311	// database,
1312	// either by using this property or by using
1313	// the
1314	// <code>csvExportOptions.selectQuery</code> property, which takes
1315	// precedence
1316	// over this property. <br /> <b>PostgreSQL instances:</b> You must
1317	// specify
1318	// one database to be exported. If <code>fileType</code> is
1319	// <code>CSV</code>,
1320	// this database must match the one specified in
1321	// the
1322	// <code>csvExportOptions.selectQuery</code> property.
1323	Databases []string `json:"databases,omitempty"`
1324
1325	// FileType: The file type for the specified uri. <br><code>SQL</code>:
1326	// The file
1327	// contains SQL statements. <br><code>CSV</code>: The file contains CSV
1328	// data.
1329	//
1330	// Possible values:
1331	//   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
1332	//   "SQL" - File containing SQL statements.
1333	//   "CSV" - File in CSV format.
1334	//   "BAK"
1335	FileType string `json:"fileType,omitempty"`
1336
1337	// Kind: This is always <code>sql#exportContext</code>.
1338	Kind string `json:"kind,omitempty"`
1339
1340	// SqlExportOptions: Options for exporting data as SQL statements.
1341	SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"`
1342
1343	// Uri: The path to the file in Google Cloud Storage where the export
1344	// will be
1345	// stored. The URI is in the form
1346	// <code>gs:
1347	// //bucketName/fileName</code>. If the file already exists, the
1348	// requests
1349	// // succeeds, but the operation fails. If <code>fileType</code> is
1350	// // <code>SQL</code> and the filename ends with .gz, the contents
1351	// are
1352	// // compressed.
1353	Uri string `json:"uri,omitempty"`
1354
1355	// ForceSendFields is a list of field names (e.g. "CsvExportOptions") to
1356	// unconditionally include in API requests. By default, fields with
1357	// empty values are omitted from API requests. However, any non-pointer,
1358	// non-interface field appearing in ForceSendFields will be sent to the
1359	// server regardless of whether the field is empty or not. This may be
1360	// used to include empty fields in Patch requests.
1361	ForceSendFields []string `json:"-"`
1362
1363	// NullFields is a list of field names (e.g. "CsvExportOptions") to
1364	// include in API requests with the JSON null value. By default, fields
1365	// with empty values are omitted from API requests. However, any field
1366	// with an empty value appearing in NullFields will be sent to the
1367	// server as null. It is an error if a field in this list has a
1368	// non-empty value. This may be used to include null fields in Patch
1369	// requests.
1370	NullFields []string `json:"-"`
1371}
1372
1373func (s *ExportContext) MarshalJSON() ([]byte, error) {
1374	type NoMethod ExportContext
1375	raw := NoMethod(*s)
1376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1377}
1378
1379// ExportContextCsvExportOptions: Options for exporting data as CSV.
1380type ExportContextCsvExportOptions struct {
1381	// SelectQuery: The select query used to extract the data.
1382	SelectQuery string `json:"selectQuery,omitempty"`
1383
1384	// ForceSendFields is a list of field names (e.g. "SelectQuery") to
1385	// unconditionally include in API requests. By default, fields with
1386	// empty values are omitted from API requests. However, any non-pointer,
1387	// non-interface field appearing in ForceSendFields will be sent to the
1388	// server regardless of whether the field is empty or not. This may be
1389	// used to include empty fields in Patch requests.
1390	ForceSendFields []string `json:"-"`
1391
1392	// NullFields is a list of field names (e.g. "SelectQuery") to include
1393	// in API requests with the JSON null value. By default, fields with
1394	// empty values are omitted from API requests. However, any field with
1395	// an empty value appearing in NullFields will be sent to the server as
1396	// null. It is an error if a field in this list has a non-empty value.
1397	// This may be used to include null fields in Patch requests.
1398	NullFields []string `json:"-"`
1399}
1400
1401func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) {
1402	type NoMethod ExportContextCsvExportOptions
1403	raw := NoMethod(*s)
1404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1405}
1406
1407// ExportContextSqlExportOptions: Options for exporting data as SQL
1408// statements.
1409type ExportContextSqlExportOptions struct {
1410	// MysqlExportOptions: Options for exporting from MySQL.
1411	MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"`
1412
1413	// SchemaOnly: Export only schemas.
1414	SchemaOnly bool `json:"schemaOnly,omitempty"`
1415
1416	// Tables: Tables to export, or that were exported, from the specified
1417	// database. If
1418	// you specify tables, specify one and only one database. For
1419	// PostgreSQL
1420	// instances, you can specify only one table.
1421	Tables []string `json:"tables,omitempty"`
1422
1423	// ForceSendFields is a list of field names (e.g. "MysqlExportOptions")
1424	// to unconditionally include in API requests. By default, fields with
1425	// empty values are omitted from API requests. However, any non-pointer,
1426	// non-interface field appearing in ForceSendFields will be sent to the
1427	// server regardless of whether the field is empty or not. This may be
1428	// used to include empty fields in Patch requests.
1429	ForceSendFields []string `json:"-"`
1430
1431	// NullFields is a list of field names (e.g. "MysqlExportOptions") to
1432	// include in API requests with the JSON null value. By default, fields
1433	// with empty values are omitted from API requests. However, any field
1434	// with an empty value appearing in NullFields will be sent to the
1435	// server as null. It is an error if a field in this list has a
1436	// non-empty value. This may be used to include null fields in Patch
1437	// requests.
1438	NullFields []string `json:"-"`
1439}
1440
1441func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) {
1442	type NoMethod ExportContextSqlExportOptions
1443	raw := NoMethod(*s)
1444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1445}
1446
1447// ExportContextSqlExportOptionsMysqlExportOptions: Options for
1448// exporting from MySQL.
1449type ExportContextSqlExportOptionsMysqlExportOptions struct {
1450	// MasterData: Option to include SQL statement required to set up
1451	// replication.
1452	// If set to <code>1</code>, the dump file includes
1453	//  a CHANGE MASTER TO statement with the binary log coordinates.
1454	// If set to <code>2</code>, the CHANGE MASTER TO statement is written
1455	// as
1456	//  a SQL comment, and has no effect.
1457	// All other values are ignored.
1458	MasterData int64 `json:"masterData,omitempty"`
1459
1460	// ForceSendFields is a list of field names (e.g. "MasterData") to
1461	// unconditionally include in API requests. By default, fields with
1462	// empty values are omitted from API requests. However, any non-pointer,
1463	// non-interface field appearing in ForceSendFields will be sent to the
1464	// server regardless of whether the field is empty or not. This may be
1465	// used to include empty fields in Patch requests.
1466	ForceSendFields []string `json:"-"`
1467
1468	// NullFields is a list of field names (e.g. "MasterData") to include in
1469	// API requests with the JSON null value. By default, fields with empty
1470	// values are omitted from API requests. However, any field with an
1471	// empty value appearing in NullFields will be sent to the server as
1472	// null. It is an error if a field in this list has a non-empty value.
1473	// This may be used to include null fields in Patch requests.
1474	NullFields []string `json:"-"`
1475}
1476
1477func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error) {
1478	type NoMethod ExportContextSqlExportOptionsMysqlExportOptions
1479	raw := NoMethod(*s)
1480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1481}
1482
1483// FailoverContext: Database instance failover context.
1484type FailoverContext struct {
1485	// Kind: This is always <code>sql#failoverContext</code>.
1486	Kind string `json:"kind,omitempty"`
1487
1488	// SettingsVersion: The current settings version of this instance.
1489	// Request will be rejected if
1490	// this version doesn't match the current settings version.
1491	SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
1492
1493	// ForceSendFields is a list of field names (e.g. "Kind") to
1494	// unconditionally include in API requests. By default, fields with
1495	// empty values are omitted from API requests. However, any non-pointer,
1496	// non-interface field appearing in ForceSendFields will be sent to the
1497	// server regardless of whether the field is empty or not. This may be
1498	// used to include empty fields in Patch requests.
1499	ForceSendFields []string `json:"-"`
1500
1501	// NullFields is a list of field names (e.g. "Kind") to include in API
1502	// requests with the JSON null value. By default, fields with empty
1503	// values are omitted from API requests. However, any field with an
1504	// empty value appearing in NullFields will be sent to the server as
1505	// null. It is an error if a field in this list has a non-empty value.
1506	// This may be used to include null fields in Patch requests.
1507	NullFields []string `json:"-"`
1508}
1509
1510func (s *FailoverContext) MarshalJSON() ([]byte, error) {
1511	type NoMethod FailoverContext
1512	raw := NoMethod(*s)
1513	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1514}
1515
1516// Flag: A flag resource.
1517type Flag struct {
1518	// AllowedIntValues: Use this field if only certain integers are
1519	// accepted. Can be combined
1520	// with min_value and max_value to add additional values.
1521	AllowedIntValues googleapi.Int64s `json:"allowedIntValues,omitempty"`
1522
1523	// AllowedStringValues: For <code>STRING</code> flags, a list of strings
1524	// that the value can be set
1525	// to.
1526	AllowedStringValues []string `json:"allowedStringValues,omitempty"`
1527
1528	// AppliesTo: The database version this flag applies to. Can be
1529	// <code>MYSQL_5_5</code>,
1530	// <code>MYSQL_5_6</code>, or <code>MYSQL_5_7</code>.
1531	// <code>MYSQL_5_7</code>
1532	// is applicable only to Second Generation instances.
1533	//
1534	// Possible values:
1535	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
1536	// version.
1537	//   "MYSQL_5_1" - The database version is MySQL 5.1.
1538	//   "MYSQL_5_5" - The database version is MySQL 5.5.
1539	//   "MYSQL_5_6" - The database version is MySQL 5.6.
1540	//   "MYSQL_5_7" - The database version is MySQL 5.7.
1541	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
1542	//   "POSTGRES_11" - The database version is PostgreSQL 11.
1543	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
1544	// Standard.
1545	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
1546	// 2017 Enterprise.
1547	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
1548	// Express.
1549	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
1550	//   "POSTGRES_10" - The database version is PostgreSQL 10.
1551	//   "POSTGRES_12" - The database version is PostgreSQL 12.
1552	AppliesTo []string `json:"appliesTo,omitempty"`
1553
1554	// InBeta: Whether or not the flag is considered in beta.
1555	InBeta bool `json:"inBeta,omitempty"`
1556
1557	// Kind: This is always <code>sql#flag</code>.
1558	Kind string `json:"kind,omitempty"`
1559
1560	// MaxValue: For <code>INTEGER</code> flags, the maximum allowed value.
1561	MaxValue int64 `json:"maxValue,omitempty,string"`
1562
1563	// MinValue: For <code>INTEGER</code> flags, the minimum allowed value.
1564	MinValue int64 `json:"minValue,omitempty,string"`
1565
1566	// Name: This is the name of the flag. Flag names always use
1567	// underscores, not
1568	// hyphens, e.g. <code>max_allowed_packet</code>
1569	Name string `json:"name,omitempty"`
1570
1571	// RequiresRestart: Indicates whether changing this flag will trigger a
1572	// database restart. Only
1573	// applicable to Second Generation instances.
1574	RequiresRestart bool `json:"requiresRestart,omitempty"`
1575
1576	// Type: The type of the flag. Flags are typed to being
1577	// <code>BOOLEAN</code>,
1578	// <code>STRING</code>, <code>INTEGER</code> or
1579	// <code>NONE</code>.
1580	// <code>NONE</code> is used for flags which do not take a value, such
1581	// as
1582	// <code>skip_grant_tables</code>.
1583	//
1584	// Possible values:
1585	//   "SQL_FLAG_TYPE_UNSPECIFIED" - This is an unknown flag type.
1586	//   "BOOLEAN" - Boolean type flag.
1587	//   "STRING" - String type flag.
1588	//   "INTEGER" - Integer type flag.
1589	//   "NONE" - Flag type used for a server startup option.
1590	//   "MYSQL_TIMEZONE_OFFSET" - Type introduced specically for MySQL
1591	// TimeZone offset. Accept a string value
1592	// with the format [-12:59, 13:00].
1593	//   "FLOAT" - Float type flag.
1594	//   "REPEATED_STRING" - Comma-separated list of the strings in a
1595	// SqlFlagType enum.
1596	Type string `json:"type,omitempty"`
1597
1598	// ForceSendFields is a list of field names (e.g. "AllowedIntValues") to
1599	// unconditionally include in API requests. By default, fields with
1600	// empty values are omitted from API requests. However, any non-pointer,
1601	// non-interface field appearing in ForceSendFields will be sent to the
1602	// server regardless of whether the field is empty or not. This may be
1603	// used to include empty fields in Patch requests.
1604	ForceSendFields []string `json:"-"`
1605
1606	// NullFields is a list of field names (e.g. "AllowedIntValues") to
1607	// include in API requests with the JSON null value. By default, fields
1608	// with empty values are omitted from API requests. However, any field
1609	// with an empty value appearing in NullFields will be sent to the
1610	// server as null. It is an error if a field in this list has a
1611	// non-empty value. This may be used to include null fields in Patch
1612	// requests.
1613	NullFields []string `json:"-"`
1614}
1615
1616func (s *Flag) MarshalJSON() ([]byte, error) {
1617	type NoMethod Flag
1618	raw := NoMethod(*s)
1619	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1620}
1621
1622// FlagsListResponse: Flags list response.
1623type FlagsListResponse struct {
1624	// Items: List of flags.
1625	Items []*Flag `json:"items,omitempty"`
1626
1627	// Kind: This is always <code>sql#flagsList</code>.
1628	Kind string `json:"kind,omitempty"`
1629
1630	// ServerResponse contains the HTTP response code and headers from the
1631	// server.
1632	googleapi.ServerResponse `json:"-"`
1633
1634	// ForceSendFields is a list of field names (e.g. "Items") to
1635	// unconditionally include in API requests. By default, fields with
1636	// empty values are omitted from API requests. However, any non-pointer,
1637	// non-interface field appearing in ForceSendFields will be sent to the
1638	// server regardless of whether the field is empty or not. This may be
1639	// used to include empty fields in Patch requests.
1640	ForceSendFields []string `json:"-"`
1641
1642	// NullFields is a list of field names (e.g. "Items") to include in API
1643	// requests with the JSON null value. By default, fields with empty
1644	// values are omitted from API requests. However, any field with an
1645	// empty value appearing in NullFields will be sent to the server as
1646	// null. It is an error if a field in this list has a non-empty value.
1647	// This may be used to include null fields in Patch requests.
1648	NullFields []string `json:"-"`
1649}
1650
1651func (s *FlagsListResponse) MarshalJSON() ([]byte, error) {
1652	type NoMethod FlagsListResponse
1653	raw := NoMethod(*s)
1654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1655}
1656
1657// ImportContext: Database instance import context.
1658type ImportContext struct {
1659	// BakImportOptions: Import parameters specific to SQL Server .BAK files
1660	BakImportOptions *ImportContextBakImportOptions `json:"bakImportOptions,omitempty"`
1661
1662	// CsvImportOptions: Options for importing data as CSV.
1663	CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"`
1664
1665	// Database: The target database for the import. If
1666	// <code>fileType</code> is
1667	// <code>SQL</code>, this field is required only if the import file does
1668	// not
1669	// specify a database, and is overridden by any database specification
1670	// in the
1671	// import file. If <code>fileType</code> is <code>CSV</code>, one
1672	// database
1673	// must be specified.
1674	Database string `json:"database,omitempty"`
1675
1676	// FileType: The file type for the specified uri. <br><code>SQL</code>:
1677	// The file
1678	// contains SQL statements. <br><code>CSV</code>: The file contains CSV
1679	// data.
1680	//
1681	// Possible values:
1682	//   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
1683	//   "SQL" - File containing SQL statements.
1684	//   "CSV" - File in CSV format.
1685	//   "BAK"
1686	FileType string `json:"fileType,omitempty"`
1687
1688	// ImportUser: The PostgreSQL user for this import operation. PostgreSQL
1689	// instances only.
1690	ImportUser string `json:"importUser,omitempty"`
1691
1692	// Kind: This is always <code>sql#importContext</code>.
1693	Kind string `json:"kind,omitempty"`
1694
1695	// Uri: Path to the import file in Cloud Storage, in the
1696	// form
1697	// <code>gs:
1698	// //bucketName/fileName</code>. Compressed gzip files (.gz) are
1699	// supported
1700	// // when <code>fileType</code> is <code>SQL</code>. The instance must
1701	// have
1702	// // write permissions to the bucket and read access to the file.
1703	Uri string `json:"uri,omitempty"`
1704
1705	// ForceSendFields is a list of field names (e.g. "BakImportOptions") to
1706	// unconditionally include in API requests. By default, fields with
1707	// empty values are omitted from API requests. However, any non-pointer,
1708	// non-interface field appearing in ForceSendFields will be sent to the
1709	// server regardless of whether the field is empty or not. This may be
1710	// used to include empty fields in Patch requests.
1711	ForceSendFields []string `json:"-"`
1712
1713	// NullFields is a list of field names (e.g. "BakImportOptions") to
1714	// include in API requests with the JSON null value. By default, fields
1715	// with empty values are omitted from API requests. However, any field
1716	// with an empty value appearing in NullFields will be sent to the
1717	// server as null. It is an error if a field in this list has a
1718	// non-empty value. This may be used to include null fields in Patch
1719	// requests.
1720	NullFields []string `json:"-"`
1721}
1722
1723func (s *ImportContext) MarshalJSON() ([]byte, error) {
1724	type NoMethod ImportContext
1725	raw := NoMethod(*s)
1726	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1727}
1728
1729// ImportContextBakImportOptions: Import parameters specific to SQL
1730// Server .BAK files
1731type ImportContextBakImportOptions struct {
1732	EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"`
1733
1734	// ForceSendFields is a list of field names (e.g. "EncryptionOptions")
1735	// to unconditionally include in API requests. By default, fields with
1736	// empty values are omitted from API requests. However, any non-pointer,
1737	// non-interface field appearing in ForceSendFields will be sent to the
1738	// server regardless of whether the field is empty or not. This may be
1739	// used to include empty fields in Patch requests.
1740	ForceSendFields []string `json:"-"`
1741
1742	// NullFields is a list of field names (e.g. "EncryptionOptions") to
1743	// include in API requests with the JSON null value. By default, fields
1744	// with empty values are omitted from API requests. However, any field
1745	// with an empty value appearing in NullFields will be sent to the
1746	// server as null. It is an error if a field in this list has a
1747	// non-empty value. This may be used to include null fields in Patch
1748	// requests.
1749	NullFields []string `json:"-"`
1750}
1751
1752func (s *ImportContextBakImportOptions) MarshalJSON() ([]byte, error) {
1753	type NoMethod ImportContextBakImportOptions
1754	raw := NoMethod(*s)
1755	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1756}
1757
1758type ImportContextBakImportOptionsEncryptionOptions struct {
1759	// CertPath: Path to the Certificate (.cer) in Cloud Storage, in the
1760	// form
1761	// <code>gs://bucketName/fileName</code>. The instance must have
1762	// write permissions to the bucket and read access to the file.
1763	CertPath string `json:"certPath,omitempty"`
1764
1765	// PvkPassword: Password that encrypts the private key
1766	PvkPassword string `json:"pvkPassword,omitempty"`
1767
1768	// PvkPath: Path to the Certificate Private Key (.pvk)  in Cloud
1769	// Storage, in the
1770	// form <code>gs://bucketName/fileName</code>. The instance must
1771	// have
1772	// write permissions to the bucket and read access to the file.
1773	PvkPath string `json:"pvkPath,omitempty"`
1774
1775	// ForceSendFields is a list of field names (e.g. "CertPath") to
1776	// unconditionally include in API requests. By default, fields with
1777	// empty values are omitted from API requests. However, any non-pointer,
1778	// non-interface field appearing in ForceSendFields will be sent to the
1779	// server regardless of whether the field is empty or not. This may be
1780	// used to include empty fields in Patch requests.
1781	ForceSendFields []string `json:"-"`
1782
1783	// NullFields is a list of field names (e.g. "CertPath") to include in
1784	// API requests with the JSON null value. By default, fields with empty
1785	// values are omitted from API requests. However, any field with an
1786	// empty value appearing in NullFields will be sent to the server as
1787	// null. It is an error if a field in this list has a non-empty value.
1788	// This may be used to include null fields in Patch requests.
1789	NullFields []string `json:"-"`
1790}
1791
1792func (s *ImportContextBakImportOptionsEncryptionOptions) MarshalJSON() ([]byte, error) {
1793	type NoMethod ImportContextBakImportOptionsEncryptionOptions
1794	raw := NoMethod(*s)
1795	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1796}
1797
1798// ImportContextCsvImportOptions: Options for importing data as CSV.
1799type ImportContextCsvImportOptions struct {
1800	// Columns: The columns to which CSV data is imported. If not specified,
1801	// all columns
1802	// of the database table are loaded with CSV data.
1803	Columns []string `json:"columns,omitempty"`
1804
1805	// Table: The table to which CSV data is imported.
1806	Table string `json:"table,omitempty"`
1807
1808	// ForceSendFields is a list of field names (e.g. "Columns") to
1809	// unconditionally include in API requests. By default, fields with
1810	// empty values are omitted from API requests. However, any non-pointer,
1811	// non-interface field appearing in ForceSendFields will be sent to the
1812	// server regardless of whether the field is empty or not. This may be
1813	// used to include empty fields in Patch requests.
1814	ForceSendFields []string `json:"-"`
1815
1816	// NullFields is a list of field names (e.g. "Columns") to include in
1817	// API requests with the JSON null value. By default, fields with empty
1818	// values are omitted from API requests. However, any field with an
1819	// empty value appearing in NullFields will be sent to the server as
1820	// null. It is an error if a field in this list has a non-empty value.
1821	// This may be used to include null fields in Patch requests.
1822	NullFields []string `json:"-"`
1823}
1824
1825func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) {
1826	type NoMethod ImportContextCsvImportOptions
1827	raw := NoMethod(*s)
1828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1829}
1830
1831// InstancesCloneRequest: Database instance clone request.
1832type InstancesCloneRequest struct {
1833	// CloneContext: Contains details about the clone operation.
1834	CloneContext *CloneContext `json:"cloneContext,omitempty"`
1835
1836	// ForceSendFields is a list of field names (e.g. "CloneContext") to
1837	// unconditionally include in API requests. By default, fields with
1838	// empty values are omitted from API requests. However, any non-pointer,
1839	// non-interface field appearing in ForceSendFields will be sent to the
1840	// server regardless of whether the field is empty or not. This may be
1841	// used to include empty fields in Patch requests.
1842	ForceSendFields []string `json:"-"`
1843
1844	// NullFields is a list of field names (e.g. "CloneContext") to include
1845	// in API requests with the JSON null value. By default, fields with
1846	// empty values are omitted from API requests. However, any field with
1847	// an empty value appearing in NullFields will be sent to the server as
1848	// null. It is an error if a field in this list has a non-empty value.
1849	// This may be used to include null fields in Patch requests.
1850	NullFields []string `json:"-"`
1851}
1852
1853func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error) {
1854	type NoMethod InstancesCloneRequest
1855	raw := NoMethod(*s)
1856	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1857}
1858
1859// InstancesDemoteMasterRequest: Database demote master request.
1860type InstancesDemoteMasterRequest struct {
1861	// DemoteMasterContext: Contains details about the demoteMaster
1862	// operation.
1863	DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"`
1864
1865	// ForceSendFields is a list of field names (e.g. "DemoteMasterContext")
1866	// to unconditionally include in API requests. By default, fields with
1867	// empty values are omitted from API requests. However, any non-pointer,
1868	// non-interface field appearing in ForceSendFields will be sent to the
1869	// server regardless of whether the field is empty or not. This may be
1870	// used to include empty fields in Patch requests.
1871	ForceSendFields []string `json:"-"`
1872
1873	// NullFields is a list of field names (e.g. "DemoteMasterContext") to
1874	// include in API requests with the JSON null value. By default, fields
1875	// with empty values are omitted from API requests. However, any field
1876	// with an empty value appearing in NullFields will be sent to the
1877	// server as null. It is an error if a field in this list has a
1878	// non-empty value. This may be used to include null fields in Patch
1879	// requests.
1880	NullFields []string `json:"-"`
1881}
1882
1883func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error) {
1884	type NoMethod InstancesDemoteMasterRequest
1885	raw := NoMethod(*s)
1886	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1887}
1888
1889// InstancesExportRequest: Database instance export request.
1890type InstancesExportRequest struct {
1891	// ExportContext: Contains details about the export operation.
1892	ExportContext *ExportContext `json:"exportContext,omitempty"`
1893
1894	// ForceSendFields is a list of field names (e.g. "ExportContext") to
1895	// unconditionally include in API requests. By default, fields with
1896	// empty values are omitted from API requests. However, any non-pointer,
1897	// non-interface field appearing in ForceSendFields will be sent to the
1898	// server regardless of whether the field is empty or not. This may be
1899	// used to include empty fields in Patch requests.
1900	ForceSendFields []string `json:"-"`
1901
1902	// NullFields is a list of field names (e.g. "ExportContext") to include
1903	// in API requests with the JSON null value. By default, fields with
1904	// empty values are omitted from API requests. However, any field with
1905	// an empty value appearing in NullFields will be sent to the server as
1906	// null. It is an error if a field in this list has a non-empty value.
1907	// This may be used to include null fields in Patch requests.
1908	NullFields []string `json:"-"`
1909}
1910
1911func (s *InstancesExportRequest) MarshalJSON() ([]byte, error) {
1912	type NoMethod InstancesExportRequest
1913	raw := NoMethod(*s)
1914	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1915}
1916
1917// InstancesFailoverRequest: Instance failover request.
1918type InstancesFailoverRequest struct {
1919	// FailoverContext: Failover Context.
1920	FailoverContext *FailoverContext `json:"failoverContext,omitempty"`
1921
1922	// ForceSendFields is a list of field names (e.g. "FailoverContext") to
1923	// unconditionally include in API requests. By default, fields with
1924	// empty values are omitted from API requests. However, any non-pointer,
1925	// non-interface field appearing in ForceSendFields will be sent to the
1926	// server regardless of whether the field is empty or not. This may be
1927	// used to include empty fields in Patch requests.
1928	ForceSendFields []string `json:"-"`
1929
1930	// NullFields is a list of field names (e.g. "FailoverContext") to
1931	// include in API requests with the JSON null value. By default, fields
1932	// with empty values are omitted from API requests. However, any field
1933	// with an empty value appearing in NullFields will be sent to the
1934	// server as null. It is an error if a field in this list has a
1935	// non-empty value. This may be used to include null fields in Patch
1936	// requests.
1937	NullFields []string `json:"-"`
1938}
1939
1940func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error) {
1941	type NoMethod InstancesFailoverRequest
1942	raw := NoMethod(*s)
1943	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1944}
1945
1946// InstancesImportRequest: Database instance import request.
1947type InstancesImportRequest struct {
1948	// ImportContext: Contains details about the import operation.
1949	ImportContext *ImportContext `json:"importContext,omitempty"`
1950
1951	// ForceSendFields is a list of field names (e.g. "ImportContext") to
1952	// unconditionally include in API requests. By default, fields with
1953	// empty values are omitted from API requests. However, any non-pointer,
1954	// non-interface field appearing in ForceSendFields will be sent to the
1955	// server regardless of whether the field is empty or not. This may be
1956	// used to include empty fields in Patch requests.
1957	ForceSendFields []string `json:"-"`
1958
1959	// NullFields is a list of field names (e.g. "ImportContext") to include
1960	// in API requests with the JSON null value. By default, fields with
1961	// empty values are omitted from API requests. However, any field with
1962	// an empty value appearing in NullFields will be sent to the server as
1963	// null. It is an error if a field in this list has a non-empty value.
1964	// This may be used to include null fields in Patch requests.
1965	NullFields []string `json:"-"`
1966}
1967
1968func (s *InstancesImportRequest) MarshalJSON() ([]byte, error) {
1969	type NoMethod InstancesImportRequest
1970	raw := NoMethod(*s)
1971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1972}
1973
1974// InstancesListResponse: Database instances list response.
1975type InstancesListResponse struct {
1976	// Items: List of database instance resources.
1977	Items []*DatabaseInstance `json:"items,omitempty"`
1978
1979	// Kind: This is always <code>sql#instancesList</code>.
1980	Kind string `json:"kind,omitempty"`
1981
1982	// NextPageToken: The continuation token, used to page through large
1983	// result sets. Provide
1984	// this value in a subsequent request to return the next page of
1985	// results.
1986	NextPageToken string `json:"nextPageToken,omitempty"`
1987
1988	// Warnings: List of warnings that occurred while handling the request.
1989	Warnings []*ApiWarning `json:"warnings,omitempty"`
1990
1991	// ServerResponse contains the HTTP response code and headers from the
1992	// server.
1993	googleapi.ServerResponse `json:"-"`
1994
1995	// ForceSendFields is a list of field names (e.g. "Items") to
1996	// unconditionally include in API requests. By default, fields with
1997	// empty values are omitted from API requests. However, any non-pointer,
1998	// non-interface field appearing in ForceSendFields will be sent to the
1999	// server regardless of whether the field is empty or not. This may be
2000	// used to include empty fields in Patch requests.
2001	ForceSendFields []string `json:"-"`
2002
2003	// NullFields is a list of field names (e.g. "Items") to include in API
2004	// requests with the JSON null value. By default, fields with empty
2005	// values are omitted from API requests. However, any field with an
2006	// empty value appearing in NullFields will be sent to the server as
2007	// null. It is an error if a field in this list has a non-empty value.
2008	// This may be used to include null fields in Patch requests.
2009	NullFields []string `json:"-"`
2010}
2011
2012func (s *InstancesListResponse) MarshalJSON() ([]byte, error) {
2013	type NoMethod InstancesListResponse
2014	raw := NoMethod(*s)
2015	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2016}
2017
2018// InstancesListServerCasResponse: Instances ListServerCas response.
2019type InstancesListServerCasResponse struct {
2020	ActiveVersion string `json:"activeVersion,omitempty"`
2021
2022	// Certs: List of server CA certificates for the instance.
2023	Certs []*SslCert `json:"certs,omitempty"`
2024
2025	// Kind: This is always <code>sql#instancesListServerCas</code>.
2026	Kind string `json:"kind,omitempty"`
2027
2028	// ServerResponse contains the HTTP response code and headers from the
2029	// server.
2030	googleapi.ServerResponse `json:"-"`
2031
2032	// ForceSendFields is a list of field names (e.g. "ActiveVersion") to
2033	// unconditionally include in API requests. By default, fields with
2034	// empty values are omitted from API requests. However, any non-pointer,
2035	// non-interface field appearing in ForceSendFields will be sent to the
2036	// server regardless of whether the field is empty or not. This may be
2037	// used to include empty fields in Patch requests.
2038	ForceSendFields []string `json:"-"`
2039
2040	// NullFields is a list of field names (e.g. "ActiveVersion") to include
2041	// in API requests with the JSON null value. By default, fields with
2042	// empty values are omitted from API requests. However, any field with
2043	// an empty value appearing in NullFields will be sent to the server as
2044	// null. It is an error if a field in this list has a non-empty value.
2045	// This may be used to include null fields in Patch requests.
2046	NullFields []string `json:"-"`
2047}
2048
2049func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error) {
2050	type NoMethod InstancesListServerCasResponse
2051	raw := NoMethod(*s)
2052	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2053}
2054
2055// InstancesRestoreBackupRequest: Database instance restore backup
2056// request.
2057type InstancesRestoreBackupRequest struct {
2058	// RestoreBackupContext: Parameters required to perform the restore
2059	// backup operation.
2060	RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"`
2061
2062	// ForceSendFields is a list of field names (e.g.
2063	// "RestoreBackupContext") to unconditionally include in API requests.
2064	// By default, fields with empty values are omitted from API requests.
2065	// However, any non-pointer, non-interface field appearing in
2066	// ForceSendFields will be sent to the server regardless of whether the
2067	// field is empty or not. This may be used to include empty fields in
2068	// Patch requests.
2069	ForceSendFields []string `json:"-"`
2070
2071	// NullFields is a list of field names (e.g. "RestoreBackupContext") to
2072	// include in API requests with the JSON null value. By default, fields
2073	// with empty values are omitted from API requests. However, any field
2074	// with an empty value appearing in NullFields will be sent to the
2075	// server as null. It is an error if a field in this list has a
2076	// non-empty value. This may be used to include null fields in Patch
2077	// requests.
2078	NullFields []string `json:"-"`
2079}
2080
2081func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) {
2082	type NoMethod InstancesRestoreBackupRequest
2083	raw := NoMethod(*s)
2084	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2085}
2086
2087// InstancesRotateServerCaRequest: Rotate Server CA request.
2088type InstancesRotateServerCaRequest struct {
2089	// RotateServerCaContext: Contains details about the rotate server CA
2090	// operation.
2091	RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"`
2092
2093	// ForceSendFields is a list of field names (e.g.
2094	// "RotateServerCaContext") to unconditionally include in API requests.
2095	// By default, fields with empty values are omitted from API requests.
2096	// However, any non-pointer, non-interface field appearing in
2097	// ForceSendFields will be sent to the server regardless of whether the
2098	// field is empty or not. This may be used to include empty fields in
2099	// Patch requests.
2100	ForceSendFields []string `json:"-"`
2101
2102	// NullFields is a list of field names (e.g. "RotateServerCaContext") to
2103	// include in API requests with the JSON null value. By default, fields
2104	// with empty values are omitted from API requests. However, any field
2105	// with an empty value appearing in NullFields will be sent to the
2106	// server as null. It is an error if a field in this list has a
2107	// non-empty value. This may be used to include null fields in Patch
2108	// requests.
2109	NullFields []string `json:"-"`
2110}
2111
2112func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error) {
2113	type NoMethod InstancesRotateServerCaRequest
2114	raw := NoMethod(*s)
2115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2116}
2117
2118// InstancesTruncateLogRequest: Instance truncate log request.
2119type InstancesTruncateLogRequest struct {
2120	// TruncateLogContext: Contains details about the truncate log
2121	// operation.
2122	TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"`
2123
2124	// ForceSendFields is a list of field names (e.g. "TruncateLogContext")
2125	// to unconditionally include in API requests. By default, fields with
2126	// empty values are omitted from API requests. However, any non-pointer,
2127	// non-interface field appearing in ForceSendFields will be sent to the
2128	// server regardless of whether the field is empty or not. This may be
2129	// used to include empty fields in Patch requests.
2130	ForceSendFields []string `json:"-"`
2131
2132	// NullFields is a list of field names (e.g. "TruncateLogContext") to
2133	// include in API requests with the JSON null value. By default, fields
2134	// with empty values are omitted from API requests. However, any field
2135	// with an empty value appearing in NullFields will be sent to the
2136	// server as null. It is an error if a field in this list has a
2137	// non-empty value. This may be used to include null fields in Patch
2138	// requests.
2139	NullFields []string `json:"-"`
2140}
2141
2142func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error) {
2143	type NoMethod InstancesTruncateLogRequest
2144	raw := NoMethod(*s)
2145	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2146}
2147
2148// IpConfiguration: IP Management configuration.
2149type IpConfiguration struct {
2150	// AuthorizedNetworks: The list of external networks that are allowed to
2151	// connect to the instance
2152	// using the IP. In
2153	// <a
2154	// href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CID
2155	// R
2156	// notation</a>, also known as 'slash' notation
2157	// (e.g.
2158	// <code>192.168.100.0/24</code>).
2159	AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"`
2160
2161	// Ipv4Enabled: Whether the instance should be assigned an IP address or
2162	// not.
2163	Ipv4Enabled bool `json:"ipv4Enabled,omitempty"`
2164
2165	// PrivateNetwork: The resource link for the VPC network from which the
2166	// Cloud SQL instance is
2167	// accessible for private IP. For
2168	// example,
2169	// <code>/projects/myProject/global/networks/default</code>. This
2170	// setting can
2171	// be updated, but it cannot be removed after it is set.
2172	PrivateNetwork string `json:"privateNetwork,omitempty"`
2173
2174	// RequireSsl: Whether SSL connections over IP should be enforced or
2175	// not.
2176	RequireSsl bool `json:"requireSsl,omitempty"`
2177
2178	// ForceSendFields is a list of field names (e.g. "AuthorizedNetworks")
2179	// to unconditionally include in API requests. By default, fields with
2180	// empty values are omitted from API requests. However, any non-pointer,
2181	// non-interface field appearing in ForceSendFields will be sent to the
2182	// server regardless of whether the field is empty or not. This may be
2183	// used to include empty fields in Patch requests.
2184	ForceSendFields []string `json:"-"`
2185
2186	// NullFields is a list of field names (e.g. "AuthorizedNetworks") to
2187	// include in API requests with the JSON null value. By default, fields
2188	// with empty values are omitted from API requests. However, any field
2189	// with an empty value appearing in NullFields will be sent to the
2190	// server as null. It is an error if a field in this list has a
2191	// non-empty value. This may be used to include null fields in Patch
2192	// requests.
2193	NullFields []string `json:"-"`
2194}
2195
2196func (s *IpConfiguration) MarshalJSON() ([]byte, error) {
2197	type NoMethod IpConfiguration
2198	raw := NoMethod(*s)
2199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2200}
2201
2202// IpMapping: Database instance IP Mapping.
2203type IpMapping struct {
2204	// IpAddress: The IP address assigned.
2205	IpAddress string `json:"ipAddress,omitempty"`
2206
2207	// TimeToRetire: The due time for this IP to be retired in
2208	// <a
2209	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
2210	// example
2211	// <code>2012-11-15T16:19:00.094Z</code>. This field is only available
2212	// when
2213	// the IP is scheduled to be retired.
2214	TimeToRetire string `json:"timeToRetire,omitempty"`
2215
2216	// Type: The type of this IP address. A <code>PRIMARY</code> address is
2217	// a public
2218	// address that can accept incoming connections. A
2219	// <code>PRIVATE</code>
2220	// address is a private address that can accept incoming connections.
2221	// An
2222	// <code>OUTGOING</code> address is the source address of
2223	// connections
2224	// originating from the instance, if supported.
2225	//
2226	// Possible values:
2227	//   "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" - This is an unknown IP address
2228	// type.
2229	//   "PRIMARY" - IP address the customer is supposed to connect to.
2230	// Usually this is the
2231	// load balancer's IP address
2232	//   "OUTGOING" - Source IP address of the connection a read replica
2233	// establishes to its
2234	// external master. This IP address can be whitelisted by the
2235	// customer
2236	// in case it has a firewall that filters incoming connection to its
2237	// on premises master.
2238	//   "PRIVATE" - Private IP used when using private IPs and network
2239	// peering.
2240	//   "MIGRATED_1ST_GEN" - V1 IP of a migrated instance. We want the user
2241	// to
2242	// decommission this IP as soon as the migration is complete.
2243	// Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
2244	Type string `json:"type,omitempty"`
2245
2246	// ForceSendFields is a list of field names (e.g. "IpAddress") to
2247	// unconditionally include in API requests. By default, fields with
2248	// empty values are omitted from API requests. However, any non-pointer,
2249	// non-interface field appearing in ForceSendFields will be sent to the
2250	// server regardless of whether the field is empty or not. This may be
2251	// used to include empty fields in Patch requests.
2252	ForceSendFields []string `json:"-"`
2253
2254	// NullFields is a list of field names (e.g. "IpAddress") to include in
2255	// API requests with the JSON null value. By default, fields with empty
2256	// values are omitted from API requests. However, any field with an
2257	// empty value appearing in NullFields will be sent to the server as
2258	// null. It is an error if a field in this list has a non-empty value.
2259	// This may be used to include null fields in Patch requests.
2260	NullFields []string `json:"-"`
2261}
2262
2263func (s *IpMapping) MarshalJSON() ([]byte, error) {
2264	type NoMethod IpMapping
2265	raw := NoMethod(*s)
2266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2267}
2268
2269// LocationPreference: Preferred location. This specifies where a Cloud
2270// SQL instance should
2271// preferably be located, either in a specific Compute Engine zone,
2272// or
2273// co-located with an App Engine application. Note that if the
2274// preferred
2275// location is not available, the instance will be located as close as
2276// possible
2277// within the region. Only one location may be specified.
2278type LocationPreference struct {
2279	// FollowGaeApplication: The AppEngine application to follow, it must be
2280	// in the same region as the
2281	// Cloud SQL instance.
2282	FollowGaeApplication string `json:"followGaeApplication,omitempty"`
2283
2284	// Kind: This is always <code>sql#locationPreference</code>.
2285	Kind string `json:"kind,omitempty"`
2286
2287	// Zone: The preferred Compute Engine zone (e.g. us-central1-a,
2288	// us-central1-b,
2289	// etc.).
2290	Zone string `json:"zone,omitempty"`
2291
2292	// ForceSendFields is a list of field names (e.g.
2293	// "FollowGaeApplication") to unconditionally include in API requests.
2294	// By default, fields with empty values are omitted from API requests.
2295	// However, any non-pointer, non-interface field appearing in
2296	// ForceSendFields will be sent to the server regardless of whether the
2297	// field is empty or not. This may be used to include empty fields in
2298	// Patch requests.
2299	ForceSendFields []string `json:"-"`
2300
2301	// NullFields is a list of field names (e.g. "FollowGaeApplication") to
2302	// include in API requests with the JSON null value. By default, fields
2303	// with empty values are omitted from API requests. However, any field
2304	// with an empty value appearing in NullFields will be sent to the
2305	// server as null. It is an error if a field in this list has a
2306	// non-empty value. This may be used to include null fields in Patch
2307	// requests.
2308	NullFields []string `json:"-"`
2309}
2310
2311func (s *LocationPreference) MarshalJSON() ([]byte, error) {
2312	type NoMethod LocationPreference
2313	raw := NoMethod(*s)
2314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2315}
2316
2317// MaintenanceWindow: Maintenance window. This specifies when a v2 Cloud
2318// SQL instance should
2319// preferably be restarted for system maintenance purposes.
2320type MaintenanceWindow struct {
2321	// Day: day of week (1-7), starting on Monday.
2322	Day int64 `json:"day,omitempty"`
2323
2324	// Hour: hour of day - 0 to 23.
2325	Hour int64 `json:"hour,omitempty"`
2326
2327	// Kind: This is always <code>sql#maintenanceWindow</code>.
2328	Kind string `json:"kind,omitempty"`
2329
2330	// UpdateTrack: Maintenance timing setting: <code>canary</code>
2331	// (Earlier) or
2332	// <code>stable</code> (Later). <br
2333	// /><a
2334	// href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndg
2335	// en">
2336	// Learn more</a>.
2337	//
2338	// Possible values:
2339	//   "SQL_UPDATE_TRACK_UNSPECIFIED" - This is an unknown maintenance
2340	// timing preference.
2341	//   "canary" - For instance update that requires a restart, this update
2342	// track indicates
2343	// your instance prefer to restart for new version early in
2344	// maintenance
2345	// window.
2346	//   "stable" - For instance update that requires a restart, this update
2347	// track indicates
2348	// your instance prefer to let Cloud SQL choose the timing of restart
2349	// (within
2350	// its Maintenance window, if applicable).
2351	UpdateTrack string `json:"updateTrack,omitempty"`
2352
2353	// ForceSendFields is a list of field names (e.g. "Day") to
2354	// unconditionally include in API requests. By default, fields with
2355	// empty values are omitted from API requests. However, any non-pointer,
2356	// non-interface field appearing in ForceSendFields will be sent to the
2357	// server regardless of whether the field is empty or not. This may be
2358	// used to include empty fields in Patch requests.
2359	ForceSendFields []string `json:"-"`
2360
2361	// NullFields is a list of field names (e.g. "Day") 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 *MaintenanceWindow) MarshalJSON() ([]byte, error) {
2371	type NoMethod MaintenanceWindow
2372	raw := NoMethod(*s)
2373	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2374}
2375
2376// MySqlReplicaConfiguration: Read-replica configuration specific to
2377// MySQL databases.
2378type MySqlReplicaConfiguration struct {
2379	// CaCertificate: PEM representation of the trusted CA's x509
2380	// certificate.
2381	CaCertificate string `json:"caCertificate,omitempty"`
2382
2383	// ClientCertificate: PEM representation of the slave's x509
2384	// certificate.
2385	ClientCertificate string `json:"clientCertificate,omitempty"`
2386
2387	// ClientKey: PEM representation of the slave's private key. The
2388	// corresponsing public key
2389	// is encoded in the client's certificate.
2390	ClientKey string `json:"clientKey,omitempty"`
2391
2392	// ConnectRetryInterval: Seconds to wait between connect retries.
2393	// MySQL's default is 60 seconds.
2394	ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"`
2395
2396	// DumpFilePath: Path to a SQL dump file in Google Cloud Storage from
2397	// which the slave
2398	// instance is to be created. The URI is in the form
2399	// gs:
2400	// //bucketName/fileName. Compressed gzip files (.gz) are also
2401	// supported.
2402	// // Dumps should have the binlog co-ordinates from which replication
2403	// should
2404	// // begin. This can be accomplished by setting --master-data to 1 when
2405	// using
2406	// // mysqldump.
2407	DumpFilePath string `json:"dumpFilePath,omitempty"`
2408
2409	// Kind: This is always <code>sql#mysqlReplicaConfiguration</code>.
2410	Kind string `json:"kind,omitempty"`
2411
2412	// MasterHeartbeatPeriod: Interval in milliseconds between replication
2413	// heartbeats.
2414	MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"`
2415
2416	// Password: The password for the replication connection.
2417	Password string `json:"password,omitempty"`
2418
2419	// SslCipher: A list of permissible ciphers to use for SSL encryption.
2420	SslCipher string `json:"sslCipher,omitempty"`
2421
2422	// Username: The username for the replication connection.
2423	Username string `json:"username,omitempty"`
2424
2425	// VerifyServerCertificate: Whether or not to check the master's Common
2426	// Name value in the certificate
2427	// that it sends during the SSL handshake.
2428	VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"`
2429
2430	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
2431	// unconditionally include in API requests. By default, fields with
2432	// empty values are omitted from API requests. However, any non-pointer,
2433	// non-interface field appearing in ForceSendFields will be sent to the
2434	// server regardless of whether the field is empty or not. This may be
2435	// used to include empty fields in Patch requests.
2436	ForceSendFields []string `json:"-"`
2437
2438	// NullFields is a list of field names (e.g. "CaCertificate") to include
2439	// in API requests with the JSON null value. By default, fields with
2440	// empty values are omitted from API requests. However, any field with
2441	// an empty value appearing in NullFields will be sent to the server as
2442	// null. It is an error if a field in this list has a non-empty value.
2443	// This may be used to include null fields in Patch requests.
2444	NullFields []string `json:"-"`
2445}
2446
2447func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
2448	type NoMethod MySqlReplicaConfiguration
2449	raw := NoMethod(*s)
2450	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2451}
2452
2453// OnPremisesConfiguration: On-premises instance configuration.
2454type OnPremisesConfiguration struct {
2455	// CaCertificate: PEM representation of the trusted CA's x509
2456	// certificate.
2457	CaCertificate string `json:"caCertificate,omitempty"`
2458
2459	// ClientCertificate: PEM representation of the slave's x509
2460	// certificate.
2461	ClientCertificate string `json:"clientCertificate,omitempty"`
2462
2463	// ClientKey: PEM representation of the slave's private key. The
2464	// corresponsing public key
2465	// is encoded in the client's certificate.
2466	ClientKey string `json:"clientKey,omitempty"`
2467
2468	// DumpFilePath: The dump file to create the Cloud SQL replica.
2469	DumpFilePath string `json:"dumpFilePath,omitempty"`
2470
2471	// HostPort: The host and port of the on-premises instance in host:port
2472	// format
2473	HostPort string `json:"hostPort,omitempty"`
2474
2475	// Kind: This is always <code>sql#onPremisesConfiguration</code>.
2476	Kind string `json:"kind,omitempty"`
2477
2478	// Password: The password for connecting to on-premises instance.
2479	Password string `json:"password,omitempty"`
2480
2481	// Username: The username for connecting to on-premises instance.
2482	Username string `json:"username,omitempty"`
2483
2484	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
2485	// unconditionally include in API requests. By default, fields with
2486	// empty values are omitted from API requests. However, any non-pointer,
2487	// non-interface field appearing in ForceSendFields will be sent to the
2488	// server regardless of whether the field is empty or not. This may be
2489	// used to include empty fields in Patch requests.
2490	ForceSendFields []string `json:"-"`
2491
2492	// NullFields is a list of field names (e.g. "CaCertificate") to include
2493	// in API requests with the JSON null value. By default, fields with
2494	// empty values are omitted from API requests. However, any field with
2495	// an empty value appearing in NullFields will be sent to the server as
2496	// null. It is an error if a field in this list has a non-empty value.
2497	// This may be used to include null fields in Patch requests.
2498	NullFields []string `json:"-"`
2499}
2500
2501func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error) {
2502	type NoMethod OnPremisesConfiguration
2503	raw := NoMethod(*s)
2504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2505}
2506
2507// Operation: An Operation resource.&nbsp;For successful operations that
2508// return an
2509// Operation resource, only the fields relevant to the operation are
2510// populated
2511// in the resource.
2512type Operation struct {
2513	// EndTime: The time this operation finished in UTC timezone in
2514	// <a
2515	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
2516	// example
2517	// <code>2012-11-15T16:19:00.094Z</code>.
2518	EndTime string `json:"endTime,omitempty"`
2519
2520	// Error: If errors occurred during processing of this operation, this
2521	// field will be
2522	// populated.
2523	Error *OperationErrors `json:"error,omitempty"`
2524
2525	// ExportContext: The context for export operation, if applicable.
2526	ExportContext *ExportContext `json:"exportContext,omitempty"`
2527
2528	// ImportContext: The context for import operation, if applicable.
2529	ImportContext *ImportContext `json:"importContext,omitempty"`
2530
2531	// InsertTime: The time this operation was enqueued in UTC timezone in
2532	// <a
2533	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
2534	// example
2535	// <code>2012-11-15T16:19:00.094Z</code>.
2536	InsertTime string `json:"insertTime,omitempty"`
2537
2538	// Kind: This is always <code>sql#operation</code>.
2539	Kind string `json:"kind,omitempty"`
2540
2541	// Name: An identifier that uniquely identifies the operation. You can
2542	// use this
2543	// identifier to retrieve the Operations resource that has information
2544	// about
2545	// the operation.
2546	Name string `json:"name,omitempty"`
2547
2548	// OperationType: The type of the operation. Valid values are
2549	// <code>CREATE</code>,
2550	// <code>DELETE</code>, <code>UPDATE</code>,
2551	// <code>RESTART</code>,
2552	// <code>IMPORT</code>, <code>EXPORT</code>,
2553	// <code>BACKUP_VOLUME</code>,
2554	// <code>RESTORE_VOLUME</code>,
2555	// <code>CREATE_USER</code>,
2556	// <code>DELETE_USER</code>,
2557	// <code>CREATE_DATABASE</code>,
2558	// <code>DELETE_DATABASE</code> .
2559	//
2560	// Possible values:
2561	//   "SQL_OPERATION_TYPE_UNSPECIFIED" - Unknown operation type.
2562	//   "IMPORT" - Imports data into a Cloud SQL instance.
2563	//   "EXPORT" - Exports data from a Cloud SQL instance to a Cloud
2564	// Storage
2565	// bucket.
2566	//   "CREATE" - Creates a new Cloud SQL instance.
2567	//   "UPDATE" - Updates the settings of a Cloud SQL instance.
2568	//   "DELETE" - Deletes a Cloud SQL instance.
2569	//   "RESTART" - Restarts the Cloud SQL instance.
2570	//   "BACKUP"
2571	//   "SNAPSHOT"
2572	//   "BACKUP_VOLUME" - Performs instance backup.
2573	//   "DELETE_VOLUME" - Deletes an instance backup.
2574	//   "RESTORE_VOLUME" - Restores an instance backup.
2575	//   "INJECT_USER" - Injects a privileged user in mysql for MOB
2576	// instances.
2577	//   "CLONE" - Clones a Cloud SQL instance.
2578	//   "STOP_REPLICA" - Stops replication on a Cloud SQL read replica
2579	// instance.
2580	//   "START_REPLICA" - Starts replication on a Cloud SQL read replica
2581	// instance.
2582	//   "PROMOTE_REPLICA" - Promotes a Cloud SQL replica instance.
2583	//   "CREATE_REPLICA" - Creates a Cloud SQL replica instance.
2584	//   "CREATE_USER" - Creates a new user in a Cloud SQL instance.
2585	//   "DELETE_USER" - Deletes a user from a Cloud SQL instance.
2586	//   "UPDATE_USER" - Updates an existing user in a Cloud SQL instance.
2587	//   "CREATE_DATABASE" - Creates a database in the Cloud SQL instance.
2588	//   "DELETE_DATABASE" - Deletes a database in the Cloud SQL instance.
2589	//   "UPDATE_DATABASE" - Updates a database in the Cloud SQL instance.
2590	//   "FAILOVER" - Performs failover of an HA-enabled Cloud SQL
2591	// failover replica.
2592	//   "DELETE_BACKUP" - Deletes the backup taken by a backup run.
2593	//   "RECREATE_REPLICA"
2594	//   "TRUNCATE_LOG" - Truncates a general or slow log table in MySQL.
2595	//   "DEMOTE_MASTER" - Demotes the stand-alone instance to be a Cloud
2596	// SQL
2597	// read replica for an external database server.
2598	//   "MAINTENANCE" - Indicates that the instance is currently in
2599	// maintenance. Maintenance
2600	// typically causes the instance to be unavailable for 1-3 minutes.
2601	//   "ENABLE_PRIVATE_IP" - This field is deprecated, and will be removed
2602	// in future version of API.
2603	//   "DEFER_MAINTENANCE"
2604	//   "CREATE_CLONE" - Creates clone instance.
2605	//   "RESCHEDULE_MAINTENANCE" - Reschedule maintenance to another time.
2606	//   "START_EXTERNAL_SYNC" - Starts external sync of a Cloud SQL EM
2607	// replica to an external master.
2608	OperationType string `json:"operationType,omitempty"`
2609
2610	// SelfLink: The URI of this resource.
2611	SelfLink string `json:"selfLink,omitempty"`
2612
2613	// StartTime: The time this operation actually started in UTC timezone
2614	// in <a
2615	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
2616	// example
2617	// <code>2012-11-15T16:19:00.094Z</code>.
2618	StartTime string `json:"startTime,omitempty"`
2619
2620	// Status: The status of an operation. Valid values are
2621	// <code>PENDING</code>,
2622	// <code>RUNNING</code>,
2623	// <code>DONE</code>,
2624	// <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>.
2625	//
2626	// Possible values:
2627	//   "SQL_OPERATION_STATUS_UNSPECIFIED" - The state of the operation is
2628	// unknown.
2629	//   "PENDING" - The operation has been queued, but has not started yet.
2630	//   "RUNNING" - The operation is running.
2631	//   "DONE" - The operation completed.
2632	Status string `json:"status,omitempty"`
2633
2634	// TargetId: Name of the database instance related to this operation.
2635	TargetId string `json:"targetId,omitempty"`
2636
2637	TargetLink string `json:"targetLink,omitempty"`
2638
2639	// TargetProject: The project ID of the target instance related to this
2640	// operation.
2641	TargetProject string `json:"targetProject,omitempty"`
2642
2643	// User: The email address of the user who initiated this operation.
2644	User string `json:"user,omitempty"`
2645
2646	// ServerResponse contains the HTTP response code and headers from the
2647	// server.
2648	googleapi.ServerResponse `json:"-"`
2649
2650	// ForceSendFields is a list of field names (e.g. "EndTime") to
2651	// unconditionally include in API requests. By default, fields with
2652	// empty values are omitted from API requests. However, any non-pointer,
2653	// non-interface field appearing in ForceSendFields will be sent to the
2654	// server regardless of whether the field is empty or not. This may be
2655	// used to include empty fields in Patch requests.
2656	ForceSendFields []string `json:"-"`
2657
2658	// NullFields is a list of field names (e.g. "EndTime") to include in
2659	// API requests with the JSON null value. By default, fields with empty
2660	// values are omitted from API requests. However, any field with an
2661	// empty value appearing in NullFields will be sent to the server as
2662	// null. It is an error if a field in this list has a non-empty value.
2663	// This may be used to include null fields in Patch requests.
2664	NullFields []string `json:"-"`
2665}
2666
2667func (s *Operation) MarshalJSON() ([]byte, error) {
2668	type NoMethod Operation
2669	raw := NoMethod(*s)
2670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2671}
2672
2673// OperationError: Database instance operation error.
2674type OperationError struct {
2675	// Code: Identifies the specific error that occurred.
2676	Code string `json:"code,omitempty"`
2677
2678	// Kind: This is always <code>sql#operationError</code>.
2679	Kind string `json:"kind,omitempty"`
2680
2681	// Message: Additional information about the error encountered.
2682	Message string `json:"message,omitempty"`
2683
2684	// ForceSendFields is a list of field names (e.g. "Code") to
2685	// unconditionally include in API requests. By default, fields with
2686	// empty values are omitted from API requests. However, any non-pointer,
2687	// non-interface field appearing in ForceSendFields will be sent to the
2688	// server regardless of whether the field is empty or not. This may be
2689	// used to include empty fields in Patch requests.
2690	ForceSendFields []string `json:"-"`
2691
2692	// NullFields is a list of field names (e.g. "Code") to include in API
2693	// requests with the JSON null value. By default, fields with empty
2694	// values are omitted from API requests. However, any field with an
2695	// empty value appearing in NullFields will be sent to the server as
2696	// null. It is an error if a field in this list has a non-empty value.
2697	// This may be used to include null fields in Patch requests.
2698	NullFields []string `json:"-"`
2699}
2700
2701func (s *OperationError) MarshalJSON() ([]byte, error) {
2702	type NoMethod OperationError
2703	raw := NoMethod(*s)
2704	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2705}
2706
2707// OperationErrors: Database instance operation errors list wrapper.
2708type OperationErrors struct {
2709	// Errors: The list of errors encountered while processing this
2710	// operation.
2711	Errors []*OperationError `json:"errors,omitempty"`
2712
2713	// Kind: This is always <code>sql#operationErrors</code>.
2714	Kind string `json:"kind,omitempty"`
2715
2716	// ForceSendFields is a list of field names (e.g. "Errors") to
2717	// unconditionally include in API requests. By default, fields with
2718	// empty values are omitted from API requests. However, any non-pointer,
2719	// non-interface field appearing in ForceSendFields will be sent to the
2720	// server regardless of whether the field is empty or not. This may be
2721	// used to include empty fields in Patch requests.
2722	ForceSendFields []string `json:"-"`
2723
2724	// NullFields is a list of field names (e.g. "Errors") to include in API
2725	// requests with the JSON null value. By default, fields with empty
2726	// values are omitted from API requests. However, any field with an
2727	// empty value appearing in NullFields will be sent to the server as
2728	// null. It is an error if a field in this list has a non-empty value.
2729	// This may be used to include null fields in Patch requests.
2730	NullFields []string `json:"-"`
2731}
2732
2733func (s *OperationErrors) MarshalJSON() ([]byte, error) {
2734	type NoMethod OperationErrors
2735	raw := NoMethod(*s)
2736	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2737}
2738
2739// OperationsListResponse: Database instance list operations response.
2740type OperationsListResponse struct {
2741	// Items: List of operation resources.
2742	Items []*Operation `json:"items,omitempty"`
2743
2744	// Kind: This is always <code>sql#operationsList</code>.
2745	Kind string `json:"kind,omitempty"`
2746
2747	// NextPageToken: The continuation token, used to page through large
2748	// result sets. Provide
2749	// this value in a subsequent request to return the next page of
2750	// results.
2751	NextPageToken string `json:"nextPageToken,omitempty"`
2752
2753	// ServerResponse contains the HTTP response code and headers from the
2754	// server.
2755	googleapi.ServerResponse `json:"-"`
2756
2757	// ForceSendFields is a list of field names (e.g. "Items") to
2758	// unconditionally include in API requests. By default, fields with
2759	// empty values are omitted from API requests. However, any non-pointer,
2760	// non-interface field appearing in ForceSendFields will be sent to the
2761	// server regardless of whether the field is empty or not. This may be
2762	// used to include empty fields in Patch requests.
2763	ForceSendFields []string `json:"-"`
2764
2765	// NullFields is a list of field names (e.g. "Items") to include in API
2766	// requests with the JSON null value. By default, fields with empty
2767	// values are omitted from API requests. However, any field with an
2768	// empty value appearing in NullFields will be sent to the server as
2769	// null. It is an error if a field in this list has a non-empty value.
2770	// This may be used to include null fields in Patch requests.
2771	NullFields []string `json:"-"`
2772}
2773
2774func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
2775	type NoMethod OperationsListResponse
2776	raw := NoMethod(*s)
2777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2778}
2779
2780// ReplicaConfiguration: Read-replica configuration for connecting to
2781// the master.
2782type ReplicaConfiguration struct {
2783	// FailoverTarget: Specifies if the replica is the failover target. If
2784	// the field is set to
2785	// <code>true</code> the replica will be designated as a failover
2786	// replica. In
2787	// case the master instance fails, the replica instance will be promoted
2788	// as
2789	// the new master instance.  <p>Only one replica can be specified as
2790	// failover
2791	// target, and the replica has to be in different zone with the
2792	// master
2793	// instance.
2794	FailoverTarget bool `json:"failoverTarget,omitempty"`
2795
2796	// Kind: This is always <code>sql#replicaConfiguration</code>.
2797	Kind string `json:"kind,omitempty"`
2798
2799	// MysqlReplicaConfiguration: MySQL specific configuration when
2800	// replicating from a MySQL on-premises
2801	// master. Replication configuration information such as the
2802	// username,
2803	// password, certificates, and keys are not stored in the instance
2804	// metadata.
2805	// The configuration information is used only to set up the
2806	// replication
2807	// connection and is stored by MySQL in a file named
2808	// <code>master.info</code>
2809	// in the data directory.
2810	MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
2811
2812	// ForceSendFields is a list of field names (e.g. "FailoverTarget") to
2813	// unconditionally include in API requests. By default, fields with
2814	// empty values are omitted from API requests. However, any non-pointer,
2815	// non-interface field appearing in ForceSendFields will be sent to the
2816	// server regardless of whether the field is empty or not. This may be
2817	// used to include empty fields in Patch requests.
2818	ForceSendFields []string `json:"-"`
2819
2820	// NullFields is a list of field names (e.g. "FailoverTarget") to
2821	// include in API requests with the JSON null value. By default, fields
2822	// with empty values are omitted from API requests. However, any field
2823	// with an empty value appearing in NullFields will be sent to the
2824	// server as null. It is an error if a field in this list has a
2825	// non-empty value. This may be used to include null fields in Patch
2826	// requests.
2827	NullFields []string `json:"-"`
2828}
2829
2830func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error) {
2831	type NoMethod ReplicaConfiguration
2832	raw := NoMethod(*s)
2833	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2834}
2835
2836type Reschedule struct {
2837	// RescheduleType: Required. The type of the reschedule.
2838	//
2839	// Possible values:
2840	//   "RESCHEDULE_TYPE_UNSPECIFIED"
2841	//   "IMMEDIATE" - If the user wants to schedule the maintenance to
2842	// happen now.
2843	//   "NEXT_AVAILABLE_WINDOW" - If the user wants to use the existing
2844	// maintenance policy to find the
2845	// next available window.
2846	//   "SPECIFIC_TIME" - If the user wants to reschedule the maintenance
2847	// to a specific time.
2848	RescheduleType string `json:"rescheduleType,omitempty"`
2849
2850	// ScheduleTime: Optional. Timestamp when the maintenance shall be
2851	// rescheduled to if
2852	// reschedule_type=SPECIFIC_TIME, in
2853	// <a
2854	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format,
2855	// for
2856	// example <code>2012-11-15T16:19:00.094Z</code>.
2857	ScheduleTime string `json:"scheduleTime,omitempty"`
2858
2859	// ForceSendFields is a list of field names (e.g. "RescheduleType") to
2860	// unconditionally include in API requests. By default, fields with
2861	// empty values are omitted from API requests. However, any non-pointer,
2862	// non-interface field appearing in ForceSendFields will be sent to the
2863	// server regardless of whether the field is empty or not. This may be
2864	// used to include empty fields in Patch requests.
2865	ForceSendFields []string `json:"-"`
2866
2867	// NullFields is a list of field names (e.g. "RescheduleType") to
2868	// include in API requests with the JSON null value. By default, fields
2869	// with empty values are omitted from API requests. However, any field
2870	// with an empty value appearing in NullFields will be sent to the
2871	// server as null. It is an error if a field in this list has a
2872	// non-empty value. This may be used to include null fields in Patch
2873	// requests.
2874	NullFields []string `json:"-"`
2875}
2876
2877func (s *Reschedule) MarshalJSON() ([]byte, error) {
2878	type NoMethod Reschedule
2879	raw := NoMethod(*s)
2880	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2881}
2882
2883// RestoreBackupContext: Database instance restore from backup
2884// context.
2885// Backup context contains source instance id and project id.
2886type RestoreBackupContext struct {
2887	// BackupRunId: The ID of the backup run to restore from.
2888	BackupRunId int64 `json:"backupRunId,omitempty,string"`
2889
2890	// InstanceId: The ID of the instance that the backup was taken from.
2891	InstanceId string `json:"instanceId,omitempty"`
2892
2893	// Kind: This is always <code>sql#restoreBackupContext</code>.
2894	Kind string `json:"kind,omitempty"`
2895
2896	// Project: The full project ID of the source instance.
2897	Project string `json:"project,omitempty"`
2898
2899	// ForceSendFields is a list of field names (e.g. "BackupRunId") to
2900	// unconditionally include in API requests. By default, fields with
2901	// empty values are omitted from API requests. However, any non-pointer,
2902	// non-interface field appearing in ForceSendFields will be sent to the
2903	// server regardless of whether the field is empty or not. This may be
2904	// used to include empty fields in Patch requests.
2905	ForceSendFields []string `json:"-"`
2906
2907	// NullFields is a list of field names (e.g. "BackupRunId") to include
2908	// in API requests with the JSON null value. By default, fields with
2909	// empty values are omitted from API requests. However, any field with
2910	// an empty value appearing in NullFields will be sent to the server as
2911	// null. It is an error if a field in this list has a non-empty value.
2912	// This may be used to include null fields in Patch requests.
2913	NullFields []string `json:"-"`
2914}
2915
2916func (s *RestoreBackupContext) MarshalJSON() ([]byte, error) {
2917	type NoMethod RestoreBackupContext
2918	raw := NoMethod(*s)
2919	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2920}
2921
2922// RotateServerCaContext: Instance rotate server CA context.
2923type RotateServerCaContext struct {
2924	// Kind: This is always <code>sql#rotateServerCaContext</code>.
2925	Kind string `json:"kind,omitempty"`
2926
2927	// NextVersion: The fingerprint of the next version to be rotated to. If
2928	// left unspecified,
2929	// will be rotated to the most recently added server CA version.
2930	NextVersion string `json:"nextVersion,omitempty"`
2931
2932	// ForceSendFields is a list of field names (e.g. "Kind") to
2933	// unconditionally include in API requests. By default, fields with
2934	// empty values are omitted from API requests. However, any non-pointer,
2935	// non-interface field appearing in ForceSendFields will be sent to the
2936	// server regardless of whether the field is empty or not. This may be
2937	// used to include empty fields in Patch requests.
2938	ForceSendFields []string `json:"-"`
2939
2940	// NullFields is a list of field names (e.g. "Kind") to include in API
2941	// requests with the JSON null value. By default, fields with empty
2942	// values are omitted from API requests. However, any field with an
2943	// empty value appearing in NullFields will be sent to the server as
2944	// null. It is an error if a field in this list has a non-empty value.
2945	// This may be used to include null fields in Patch requests.
2946	NullFields []string `json:"-"`
2947}
2948
2949func (s *RotateServerCaContext) MarshalJSON() ([]byte, error) {
2950	type NoMethod RotateServerCaContext
2951	raw := NoMethod(*s)
2952	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2953}
2954
2955// Settings: Database instance settings.
2956type Settings struct {
2957	// ActivationPolicy: The activation policy specifies when the instance
2958	// is activated; it is
2959	// applicable only when the instance state is <code>RUNNABLE</code>.
2960	// Valid
2961	// values: <br><code>ALWAYS</code>: The instance is on, and remains so
2962	// even in
2963	// the absence of connection requests. <br><code>NEVER</code>: The
2964	// instance is
2965	// off; it is not activated, even if a connection request
2966	// arrives.
2967	// <br><code>ON_DEMAND</code>: First Generation instances only. The
2968	// instance
2969	// responds to incoming requests, and turns itself off when not in
2970	// use.
2971	// Instances with <code>PER_USE</code> pricing turn off after 15 minutes
2972	// of
2973	// inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off
2974	// after
2975	// 12 hours of inactivity.
2976	//
2977	// Possible values:
2978	//   "SQL_ACTIVATION_POLICY_UNSPECIFIED" - Unknown activation plan.
2979	//   "ALWAYS" - The instance is always up and running.
2980	//   "NEVER" - The instance should never spin up.
2981	//   "ON_DEMAND" - The instance spins up upon receiving requests.
2982	ActivationPolicy string `json:"activationPolicy,omitempty"`
2983
2984	// AuthorizedGaeApplications: The App Engine app IDs that can access
2985	// this instance. First Generation
2986	// instances only.
2987	AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"`
2988
2989	// AvailabilityType: Availability type (PostgreSQL and MySQL instances
2990	// only). Potential values:
2991	// <br><code>ZONAL</code>: The instance serves data from only one
2992	// zone.
2993	// Outages in that zone affect data accessibility.
2994	// <br><code>REGIONAL</code>:
2995	// The instance can serve data from more than one zone in a region (it
2996	// is
2997	// highly available). <br>For more information, see
2998	// <a
2999	// href="https://cloud.google.com/sql/docs/postgres/high-availability"
3000	// >Overview
3001	// of the High Availability Configuration</a>.
3002	//
3003	// Possible values:
3004	//   "SQL_AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown
3005	// Availability type.
3006	//   "ZONAL" - Zonal available instance.
3007	//   "REGIONAL" - Regional available instance.
3008	AvailabilityType string `json:"availabilityType,omitempty"`
3009
3010	// BackupConfiguration: The daily backup configuration for the instance.
3011	BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
3012
3013	// CrashSafeReplicationEnabled: Configuration specific to read replica
3014	// instances. Indicates whether
3015	// database flags for crash-safe replication are enabled. This property
3016	// is
3017	// only applicable to First Generation instances.
3018	CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"`
3019
3020	// DataDiskSizeGb: The size of data disk, in GB. The data disk size
3021	// minimum is 10GB. Not used
3022	// for First Generation instances.
3023	DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
3024
3025	// DataDiskType: The type of data disk: <code>PD_SSD</code> (default)
3026	// or
3027	// <code>PD_HDD</code>. Not used for First Generation instances.
3028	//
3029	// Possible values:
3030	//   "SQL_DATA_DISK_TYPE_UNSPECIFIED" - This is an unknown data disk
3031	// type.
3032	//   "PD_SSD" - An SSD data disk.
3033	//   "PD_HDD" - An HDD data disk.
3034	//   "OBSOLETE_LOCAL_SSD" - This field is deprecated and will be removed
3035	// from a future version of the
3036	// API.
3037	DataDiskType string `json:"dataDiskType,omitempty"`
3038
3039	// DatabaseFlags: The database flags passed to the instance at startup.
3040	DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"`
3041
3042	// DatabaseReplicationEnabled: Configuration specific to read replica
3043	// instances. Indicates whether
3044	// replication is enabled or not.
3045	DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"`
3046
3047	// IpConfiguration: The settings for IP Management. This allows to
3048	// enable or disable the
3049	// instance IP and manage which external networks can connect to the
3050	// instance.
3051	// The IPv4 address cannot be disabled for Second Generation instances.
3052	IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"`
3053
3054	// Kind: This is always <code>sql#settings</code>.
3055	Kind string `json:"kind,omitempty"`
3056
3057	// LocationPreference: The location preference settings. This allows the
3058	// instance to be located as
3059	// near as possible to either an App Engine app or Compute Engine zone
3060	// for
3061	// better performance. App Engine co-location is only applicable to
3062	// First
3063	// Generation instances.
3064	LocationPreference *LocationPreference `json:"locationPreference,omitempty"`
3065
3066	// MaintenanceWindow: The maintenance window for this instance. This
3067	// specifies when the instance
3068	// can be restarted for maintenance purposes. Not used for First
3069	// Generation
3070	// instances.
3071	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
3072
3073	// PricingPlan: The pricing plan for this instance. This can be either
3074	// <code>PER_USE</code>
3075	// or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for
3076	// Second
3077	// Generation instances.
3078	//
3079	// Possible values:
3080	//   "SQL_PRICING_PLAN_UNSPECIFIED" - This is an unknown pricing plan
3081	// for this instance.
3082	//   "PACKAGE" - The instance is billed at a monthly flat rate.
3083	//   "PER_USE" - The instance is billed per usage.
3084	PricingPlan string `json:"pricingPlan,omitempty"`
3085
3086	// ReplicationType: The type of replication this instance uses. This can
3087	// be either
3088	// <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property
3089	// is
3090	// only applicable to First Generation instances.
3091	//
3092	// Possible values:
3093	//   "SQL_REPLICATION_TYPE_UNSPECIFIED" - This is an unknown replication
3094	// type for a Cloud SQL instance.
3095	//   "SYNCHRONOUS" - The synchronous replication mode for First
3096	// Generation instances. It is the
3097	// default value.
3098	//   "ASYNCHRONOUS" - The asynchronous replication mode for First
3099	// Generation instances. It
3100	// provides a slight performance gain, but if an outage occurs while
3101	// this
3102	// option is set to asynchronous, you can lose up to a few seconds of
3103	// updates
3104	// to your data.
3105	ReplicationType string `json:"replicationType,omitempty"`
3106
3107	// SettingsVersion: The version of instance settings. This is a required
3108	// field for update
3109	// method to make sure concurrent updates are handled properly. During
3110	// update,
3111	// use the most recent settingsVersion value for this instance and do
3112	// not try
3113	// to update this value.
3114	SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
3115
3116	// StorageAutoResize: Configuration to increase storage size
3117	// automatically. The default value is
3118	// true. Not used for First Generation instances.
3119	StorageAutoResize bool `json:"storageAutoResize,omitempty"`
3120
3121	// StorageAutoResizeLimit: The maximum size to which storage capacity
3122	// can be automatically increased.
3123	// The default value is 0, which specifies that there is no limit. Not
3124	// used
3125	// for First Generation instances.
3126	StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`
3127
3128	// Tier: The tier (or machine type) for this instance, for
3129	// example
3130	// <code>db-n1-standard-1</code> (MySQL instances)
3131	// or
3132	// <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL
3133	// instances,
3134	// this property determines whether the instance is First or
3135	// Second
3136	// Generation. For more information, see
3137	// <a
3138	// href="/sql/docs/db_path/instance-settings">Instance Settings</a>.
3139	Tier string `json:"tier,omitempty"`
3140
3141	// UserLabels: User-provided labels, represented as a dictionary where
3142	// each label is a
3143	// single key value pair.
3144	UserLabels map[string]string `json:"userLabels,omitempty"`
3145
3146	// ForceSendFields is a list of field names (e.g. "ActivationPolicy") to
3147	// unconditionally include in API requests. By default, fields with
3148	// empty values are omitted from API requests. However, any non-pointer,
3149	// non-interface field appearing in ForceSendFields will be sent to the
3150	// server regardless of whether the field is empty or not. This may be
3151	// used to include empty fields in Patch requests.
3152	ForceSendFields []string `json:"-"`
3153
3154	// NullFields is a list of field names (e.g. "ActivationPolicy") to
3155	// include in API requests with the JSON null value. By default, fields
3156	// with empty values are omitted from API requests. However, any field
3157	// with an empty value appearing in NullFields will be sent to the
3158	// server as null. It is an error if a field in this list has a
3159	// non-empty value. This may be used to include null fields in Patch
3160	// requests.
3161	NullFields []string `json:"-"`
3162}
3163
3164func (s *Settings) MarshalJSON() ([]byte, error) {
3165	type NoMethod Settings
3166	raw := NoMethod(*s)
3167	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3168}
3169
3170// SqlExternalSyncSettingError: External master migration setting error.
3171type SqlExternalSyncSettingError struct {
3172	// Detail: Additional information about the error encountered.
3173	Detail string `json:"detail,omitempty"`
3174
3175	// Kind: This is always <code>sql#migrationSettingError</code>.
3176	Kind string `json:"kind,omitempty"`
3177
3178	// Type: Identifies the specific error that occurred.
3179	//
3180	// Possible values:
3181	//   "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED"
3182	//   "CONNECTION_FAILURE"
3183	//   "BINLOG_NOT_ENABLED"
3184	//   "INCOMPATIBLE_DATABASE_VERSION"
3185	//   "REPLICA_ALREADY_SETUP"
3186	//   "INSUFFICIENT_PRIVILEGE"
3187	//   "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type.
3188	//   "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on
3189	// databases, applicable for postgres.
3190	//   "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on
3191	// databases, applicable for postgres.
3192	Type string `json:"type,omitempty"`
3193
3194	// ForceSendFields is a list of field names (e.g. "Detail") to
3195	// unconditionally include in API requests. By default, fields with
3196	// empty values are omitted from API requests. However, any non-pointer,
3197	// non-interface field appearing in ForceSendFields will be sent to the
3198	// server regardless of whether the field is empty or not. This may be
3199	// used to include empty fields in Patch requests.
3200	ForceSendFields []string `json:"-"`
3201
3202	// NullFields is a list of field names (e.g. "Detail") to include in API
3203	// requests with the JSON null value. By default, fields with empty
3204	// values are omitted from API requests. However, any field with an
3205	// empty value appearing in NullFields will be sent to the server as
3206	// null. It is an error if a field in this list has a non-empty value.
3207	// This may be used to include null fields in Patch requests.
3208	NullFields []string `json:"-"`
3209}
3210
3211func (s *SqlExternalSyncSettingError) MarshalJSON() ([]byte, error) {
3212	type NoMethod SqlExternalSyncSettingError
3213	raw := NoMethod(*s)
3214	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3215}
3216
3217// SqlInstancesRescheduleMaintenanceRequestBody: Reschedule options for
3218// maintenance windows.
3219type SqlInstancesRescheduleMaintenanceRequestBody struct {
3220	// Reschedule: Required. The type of the reschedule the user wants.
3221	Reschedule *Reschedule `json:"reschedule,omitempty"`
3222
3223	// ForceSendFields is a list of field names (e.g. "Reschedule") to
3224	// unconditionally include in API requests. By default, fields with
3225	// empty values are omitted from API requests. However, any non-pointer,
3226	// non-interface field appearing in ForceSendFields will be sent to the
3227	// server regardless of whether the field is empty or not. This may be
3228	// used to include empty fields in Patch requests.
3229	ForceSendFields []string `json:"-"`
3230
3231	// NullFields is a list of field names (e.g. "Reschedule") to include in
3232	// API requests with the JSON null value. By default, fields with empty
3233	// values are omitted from API requests. However, any field with an
3234	// empty value appearing in NullFields will be sent to the server as
3235	// null. It is an error if a field in this list has a non-empty value.
3236	// This may be used to include null fields in Patch requests.
3237	NullFields []string `json:"-"`
3238}
3239
3240func (s *SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON() ([]byte, error) {
3241	type NoMethod SqlInstancesRescheduleMaintenanceRequestBody
3242	raw := NoMethod(*s)
3243	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3244}
3245
3246// SqlInstancesVerifyExternalSyncSettingsResponse: Instance verify
3247// external sync settings response.
3248type SqlInstancesVerifyExternalSyncSettingsResponse struct {
3249	// Errors: List of migration violations.
3250	Errors []*SqlExternalSyncSettingError `json:"errors,omitempty"`
3251
3252	// Kind: This is always <code>sql#migrationSettingErrorList</code>.
3253	Kind string `json:"kind,omitempty"`
3254
3255	// ServerResponse contains the HTTP response code and headers from the
3256	// server.
3257	googleapi.ServerResponse `json:"-"`
3258
3259	// ForceSendFields is a list of field names (e.g. "Errors") to
3260	// unconditionally include in API requests. By default, fields with
3261	// empty values are omitted from API requests. However, any non-pointer,
3262	// non-interface field appearing in ForceSendFields will be sent to the
3263	// server regardless of whether the field is empty or not. This may be
3264	// used to include empty fields in Patch requests.
3265	ForceSendFields []string `json:"-"`
3266
3267	// NullFields is a list of field names (e.g. "Errors") to include in API
3268	// requests with the JSON null value. By default, fields with empty
3269	// values are omitted from API requests. However, any field with an
3270	// empty value appearing in NullFields will be sent to the server as
3271	// null. It is an error if a field in this list has a non-empty value.
3272	// This may be used to include null fields in Patch requests.
3273	NullFields []string `json:"-"`
3274}
3275
3276func (s *SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON() ([]byte, error) {
3277	type NoMethod SqlInstancesVerifyExternalSyncSettingsResponse
3278	raw := NoMethod(*s)
3279	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3280}
3281
3282// SqlScheduledMaintenance: Any scheduled maintenancce for this
3283// instance.
3284type SqlScheduledMaintenance struct {
3285	CanDefer bool `json:"canDefer,omitempty"`
3286
3287	// CanReschedule: If the scheduled maintenance can be rescheduled.
3288	CanReschedule bool `json:"canReschedule,omitempty"`
3289
3290	// StartTime: The start time of any upcoming scheduled maintenance for
3291	// this instance.
3292	StartTime string `json:"startTime,omitempty"`
3293
3294	// ForceSendFields is a list of field names (e.g. "CanDefer") to
3295	// unconditionally include in API requests. By default, fields with
3296	// empty values are omitted from API requests. However, any non-pointer,
3297	// non-interface field appearing in ForceSendFields will be sent to the
3298	// server regardless of whether the field is empty or not. This may be
3299	// used to include empty fields in Patch requests.
3300	ForceSendFields []string `json:"-"`
3301
3302	// NullFields is a list of field names (e.g. "CanDefer") to include in
3303	// API requests with the JSON null value. By default, fields with empty
3304	// values are omitted from API requests. However, any field with an
3305	// empty value appearing in NullFields will be sent to the server as
3306	// null. It is an error if a field in this list has a non-empty value.
3307	// This may be used to include null fields in Patch requests.
3308	NullFields []string `json:"-"`
3309}
3310
3311func (s *SqlScheduledMaintenance) MarshalJSON() ([]byte, error) {
3312	type NoMethod SqlScheduledMaintenance
3313	raw := NoMethod(*s)
3314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3315}
3316
3317// SqlServerDatabaseDetails: Represents a Sql Server database on the
3318// Cloud SQL instance.
3319type SqlServerDatabaseDetails struct {
3320	// CompatibilityLevel: The version of SQL Server with which the database
3321	// is to be made compatible
3322	CompatibilityLevel int64 `json:"compatibilityLevel,omitempty"`
3323
3324	// RecoveryModel: The recovery model of a SQL Server database
3325	RecoveryModel string `json:"recoveryModel,omitempty"`
3326
3327	// ForceSendFields is a list of field names (e.g. "CompatibilityLevel")
3328	// to unconditionally include in API requests. By default, fields with
3329	// empty values are omitted from API requests. However, any non-pointer,
3330	// non-interface field appearing in ForceSendFields will be sent to the
3331	// server regardless of whether the field is empty or not. This may be
3332	// used to include empty fields in Patch requests.
3333	ForceSendFields []string `json:"-"`
3334
3335	// NullFields is a list of field names (e.g. "CompatibilityLevel") to
3336	// include in API requests with the JSON null value. By default, fields
3337	// with empty values are omitted from API requests. However, any field
3338	// with an empty value appearing in NullFields will be sent to the
3339	// server as null. It is an error if a field in this list has a
3340	// non-empty value. This may be used to include null fields in Patch
3341	// requests.
3342	NullFields []string `json:"-"`
3343}
3344
3345func (s *SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) {
3346	type NoMethod SqlServerDatabaseDetails
3347	raw := NoMethod(*s)
3348	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3349}
3350
3351// SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL
3352// instance.
3353type SqlServerUserDetails struct {
3354	// Disabled: If the user has been disabled
3355	Disabled bool `json:"disabled,omitempty"`
3356
3357	// ServerRoles: The server roles for this user
3358	ServerRoles []string `json:"serverRoles,omitempty"`
3359
3360	// ForceSendFields is a list of field names (e.g. "Disabled") to
3361	// unconditionally include in API requests. By default, fields with
3362	// empty values are omitted from API requests. However, any non-pointer,
3363	// non-interface field appearing in ForceSendFields will be sent to the
3364	// server regardless of whether the field is empty or not. This may be
3365	// used to include empty fields in Patch requests.
3366	ForceSendFields []string `json:"-"`
3367
3368	// NullFields is a list of field names (e.g. "Disabled") to include in
3369	// API requests with the JSON null value. By default, fields with empty
3370	// values are omitted from API requests. However, any field with an
3371	// empty value appearing in NullFields will be sent to the server as
3372	// null. It is an error if a field in this list has a non-empty value.
3373	// This may be used to include null fields in Patch requests.
3374	NullFields []string `json:"-"`
3375}
3376
3377func (s *SqlServerUserDetails) MarshalJSON() ([]byte, error) {
3378	type NoMethod SqlServerUserDetails
3379	raw := NoMethod(*s)
3380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3381}
3382
3383// SslCert: SslCerts Resource
3384type SslCert struct {
3385	// Cert: PEM representation.
3386	Cert string `json:"cert,omitempty"`
3387
3388	// CertSerialNumber: Serial number, as extracted from the certificate.
3389	CertSerialNumber string `json:"certSerialNumber,omitempty"`
3390
3391	// CommonName: User supplied name.  Constrained to [a-zA-Z.-_ ]+.
3392	CommonName string `json:"commonName,omitempty"`
3393
3394	// CreateTime: The time when the certificate was created in
3395	// <a
3396	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
3397	// example
3398	// <code>2012-11-15T16:19:00.094Z</code>
3399	CreateTime string `json:"createTime,omitempty"`
3400
3401	// ExpirationTime: The time when the certificate expires in
3402	// <a
3403	// href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for
3404	// example
3405	// <code>2012-11-15T16:19:00.094Z</code>.
3406	ExpirationTime string `json:"expirationTime,omitempty"`
3407
3408	// Instance: Name of the database instance.
3409	Instance string `json:"instance,omitempty"`
3410
3411	// Kind: This is always <code>sql#sslCert</code>.
3412	Kind string `json:"kind,omitempty"`
3413
3414	// SelfLink: The URI of this resource.
3415	SelfLink string `json:"selfLink,omitempty"`
3416
3417	// Sha1Fingerprint: Sha1 Fingerprint.
3418	Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
3419
3420	// ServerResponse contains the HTTP response code and headers from the
3421	// server.
3422	googleapi.ServerResponse `json:"-"`
3423
3424	// ForceSendFields is a list of field names (e.g. "Cert") to
3425	// unconditionally include in API requests. By default, fields with
3426	// empty values are omitted from API requests. However, any non-pointer,
3427	// non-interface field appearing in ForceSendFields will be sent to the
3428	// server regardless of whether the field is empty or not. This may be
3429	// used to include empty fields in Patch requests.
3430	ForceSendFields []string `json:"-"`
3431
3432	// NullFields is a list of field names (e.g. "Cert") to include in API
3433	// requests with the JSON null value. By default, fields with empty
3434	// values are omitted from API requests. However, any field with an
3435	// empty value appearing in NullFields will be sent to the server as
3436	// null. It is an error if a field in this list has a non-empty value.
3437	// This may be used to include null fields in Patch requests.
3438	NullFields []string `json:"-"`
3439}
3440
3441func (s *SslCert) MarshalJSON() ([]byte, error) {
3442	type NoMethod SslCert
3443	raw := NoMethod(*s)
3444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3445}
3446
3447// SslCertDetail: SslCertDetail.
3448type SslCertDetail struct {
3449	// CertInfo: The public information about the cert.
3450	CertInfo *SslCert `json:"certInfo,omitempty"`
3451
3452	// CertPrivateKey: The private key for the client cert, in pem format.
3453	// Keep private in order
3454	// to protect your security.
3455	CertPrivateKey string `json:"certPrivateKey,omitempty"`
3456
3457	// ForceSendFields is a list of field names (e.g. "CertInfo") to
3458	// unconditionally include in API requests. By default, fields with
3459	// empty values are omitted from API requests. However, any non-pointer,
3460	// non-interface field appearing in ForceSendFields will be sent to the
3461	// server regardless of whether the field is empty or not. This may be
3462	// used to include empty fields in Patch requests.
3463	ForceSendFields []string `json:"-"`
3464
3465	// NullFields is a list of field names (e.g. "CertInfo") to include in
3466	// API requests with the JSON null value. By default, fields with empty
3467	// values are omitted from API requests. However, any field with an
3468	// empty value appearing in NullFields will be sent to the server as
3469	// null. It is an error if a field in this list has a non-empty value.
3470	// This may be used to include null fields in Patch requests.
3471	NullFields []string `json:"-"`
3472}
3473
3474func (s *SslCertDetail) MarshalJSON() ([]byte, error) {
3475	type NoMethod SslCertDetail
3476	raw := NoMethod(*s)
3477	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3478}
3479
3480// SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate
3481// request.
3482type SslCertsCreateEphemeralRequest struct {
3483	// PublicKey: PEM encoded public key to include in the signed
3484	// certificate.
3485	PublicKey string `json:"public_key,omitempty"`
3486
3487	// ForceSendFields is a list of field names (e.g. "PublicKey") to
3488	// unconditionally include in API requests. By default, fields with
3489	// empty values are omitted from API requests. However, any non-pointer,
3490	// non-interface field appearing in ForceSendFields will be sent to the
3491	// server regardless of whether the field is empty or not. This may be
3492	// used to include empty fields in Patch requests.
3493	ForceSendFields []string `json:"-"`
3494
3495	// NullFields is a list of field names (e.g. "PublicKey") to include in
3496	// API requests with the JSON null value. By default, fields with empty
3497	// values are omitted from API requests. However, any field with an
3498	// empty value appearing in NullFields will be sent to the server as
3499	// null. It is an error if a field in this list has a non-empty value.
3500	// This may be used to include null fields in Patch requests.
3501	NullFields []string `json:"-"`
3502}
3503
3504func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) {
3505	type NoMethod SslCertsCreateEphemeralRequest
3506	raw := NoMethod(*s)
3507	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3508}
3509
3510// SslCertsInsertRequest: SslCerts insert request.
3511type SslCertsInsertRequest struct {
3512	// CommonName: User supplied name.  Must be a distinct name from the
3513	// other certificates
3514	// for this instance.
3515	CommonName string `json:"commonName,omitempty"`
3516
3517	// ForceSendFields is a list of field names (e.g. "CommonName") to
3518	// unconditionally include in API requests. By default, fields with
3519	// empty values are omitted from API requests. However, any non-pointer,
3520	// non-interface field appearing in ForceSendFields will be sent to the
3521	// server regardless of whether the field is empty or not. This may be
3522	// used to include empty fields in Patch requests.
3523	ForceSendFields []string `json:"-"`
3524
3525	// NullFields is a list of field names (e.g. "CommonName") to include in
3526	// API requests with the JSON null value. By default, fields with empty
3527	// values are omitted from API requests. However, any field with an
3528	// empty value appearing in NullFields will be sent to the server as
3529	// null. It is an error if a field in this list has a non-empty value.
3530	// This may be used to include null fields in Patch requests.
3531	NullFields []string `json:"-"`
3532}
3533
3534func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error) {
3535	type NoMethod SslCertsInsertRequest
3536	raw := NoMethod(*s)
3537	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3538}
3539
3540// SslCertsInsertResponse: SslCert insert response.
3541type SslCertsInsertResponse struct {
3542	// ClientCert: The new client certificate and private key.  For First
3543	// Generation
3544	// instances, the new certificate does not take effect until the
3545	// instance is
3546	// restarted.
3547	ClientCert *SslCertDetail `json:"clientCert,omitempty"`
3548
3549	// Kind: This is always <code>sql#sslCertsInsert</code>.
3550	Kind string `json:"kind,omitempty"`
3551
3552	// Operation: The operation to track the ssl certs insert request.
3553	Operation *Operation `json:"operation,omitempty"`
3554
3555	// ServerCaCert: The server Certificate Authority's certificate.  If
3556	// this is missing you can
3557	// force a new one to be generated by calling resetSslConfig method
3558	// on
3559	// instances resource.
3560	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
3561
3562	// ServerResponse contains the HTTP response code and headers from the
3563	// server.
3564	googleapi.ServerResponse `json:"-"`
3565
3566	// ForceSendFields is a list of field names (e.g. "ClientCert") to
3567	// unconditionally include in API requests. By default, fields with
3568	// empty values are omitted from API requests. However, any non-pointer,
3569	// non-interface field appearing in ForceSendFields will be sent to the
3570	// server regardless of whether the field is empty or not. This may be
3571	// used to include empty fields in Patch requests.
3572	ForceSendFields []string `json:"-"`
3573
3574	// NullFields is a list of field names (e.g. "ClientCert") to include in
3575	// API requests with the JSON null value. By default, fields with empty
3576	// values are omitted from API requests. However, any field with an
3577	// empty value appearing in NullFields will be sent to the server as
3578	// null. It is an error if a field in this list has a non-empty value.
3579	// This may be used to include null fields in Patch requests.
3580	NullFields []string `json:"-"`
3581}
3582
3583func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error) {
3584	type NoMethod SslCertsInsertResponse
3585	raw := NoMethod(*s)
3586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3587}
3588
3589// SslCertsListResponse: SslCerts list response.
3590type SslCertsListResponse struct {
3591	// Items: List of client certificates for the instance.
3592	Items []*SslCert `json:"items,omitempty"`
3593
3594	// Kind: This is always <code>sql#sslCertsList</code>.
3595	Kind string `json:"kind,omitempty"`
3596
3597	// ServerResponse contains the HTTP response code and headers from the
3598	// server.
3599	googleapi.ServerResponse `json:"-"`
3600
3601	// ForceSendFields is a list of field names (e.g. "Items") to
3602	// unconditionally include in API requests. By default, fields with
3603	// empty values are omitted from API requests. However, any non-pointer,
3604	// non-interface field appearing in ForceSendFields will be sent to the
3605	// server regardless of whether the field is empty or not. This may be
3606	// used to include empty fields in Patch requests.
3607	ForceSendFields []string `json:"-"`
3608
3609	// NullFields is a list of field names (e.g. "Items") to include in API
3610	// requests with the JSON null value. By default, fields with empty
3611	// values are omitted from API requests. However, any field with an
3612	// empty value appearing in NullFields will be sent to the server as
3613	// null. It is an error if a field in this list has a non-empty value.
3614	// This may be used to include null fields in Patch requests.
3615	NullFields []string `json:"-"`
3616}
3617
3618func (s *SslCertsListResponse) MarshalJSON() ([]byte, error) {
3619	type NoMethod SslCertsListResponse
3620	raw := NoMethod(*s)
3621	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3622}
3623
3624// Tier: A Google Cloud SQL service tier resource.
3625type Tier struct {
3626	// DiskQuota: The maximum disk size of this tier in bytes.
3627	DiskQuota int64 `json:"DiskQuota,omitempty,string"`
3628
3629	// RAM: The maximum RAM usage of this tier in bytes.
3630	RAM int64 `json:"RAM,omitempty,string"`
3631
3632	// Kind: This is always <code>sql#tier</code>.
3633	Kind string `json:"kind,omitempty"`
3634
3635	// Region: The applicable regions for this tier.
3636	Region []string `json:"region,omitempty"`
3637
3638	// Tier: An identifier for the machine type, for example,
3639	// db-n1-standard-1. For
3640	// related information, see <a href="/sql/pricing">Pricing</a>.
3641	Tier string `json:"tier,omitempty"`
3642
3643	// ForceSendFields is a list of field names (e.g. "DiskQuota") to
3644	// unconditionally include in API requests. By default, fields with
3645	// empty values are omitted from API requests. However, any non-pointer,
3646	// non-interface field appearing in ForceSendFields will be sent to the
3647	// server regardless of whether the field is empty or not. This may be
3648	// used to include empty fields in Patch requests.
3649	ForceSendFields []string `json:"-"`
3650
3651	// NullFields is a list of field names (e.g. "DiskQuota") to include in
3652	// API requests with the JSON null value. By default, fields with empty
3653	// values are omitted from API requests. However, any field with an
3654	// empty value appearing in NullFields will be sent to the server as
3655	// null. It is an error if a field in this list has a non-empty value.
3656	// This may be used to include null fields in Patch requests.
3657	NullFields []string `json:"-"`
3658}
3659
3660func (s *Tier) MarshalJSON() ([]byte, error) {
3661	type NoMethod Tier
3662	raw := NoMethod(*s)
3663	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3664}
3665
3666// TiersListResponse: Tiers list response.
3667type TiersListResponse struct {
3668	// Items: List of tiers.
3669	Items []*Tier `json:"items,omitempty"`
3670
3671	// Kind: This is always <code>sql#tiersList</code>.
3672	Kind string `json:"kind,omitempty"`
3673
3674	// ServerResponse contains the HTTP response code and headers from the
3675	// server.
3676	googleapi.ServerResponse `json:"-"`
3677
3678	// ForceSendFields is a list of field names (e.g. "Items") to
3679	// unconditionally include in API requests. By default, fields with
3680	// empty values are omitted from API requests. However, any non-pointer,
3681	// non-interface field appearing in ForceSendFields will be sent to the
3682	// server regardless of whether the field is empty or not. This may be
3683	// used to include empty fields in Patch requests.
3684	ForceSendFields []string `json:"-"`
3685
3686	// NullFields is a list of field names (e.g. "Items") to include in API
3687	// requests with the JSON null value. By default, fields with empty
3688	// values are omitted from API requests. However, any field with an
3689	// empty value appearing in NullFields will be sent to the server as
3690	// null. It is an error if a field in this list has a non-empty value.
3691	// This may be used to include null fields in Patch requests.
3692	NullFields []string `json:"-"`
3693}
3694
3695func (s *TiersListResponse) MarshalJSON() ([]byte, error) {
3696	type NoMethod TiersListResponse
3697	raw := NoMethod(*s)
3698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3699}
3700
3701// TruncateLogContext: Database Instance truncate log context.
3702type TruncateLogContext struct {
3703	// Kind: This is always <code>sql#truncateLogContext</code>.
3704	Kind string `json:"kind,omitempty"`
3705
3706	// LogType: The type of log to truncate. Valid values
3707	// are
3708	// <code>MYSQL_GENERAL_TABLE</code> and <code>MYSQL_SLOW_TABLE</code>.
3709	LogType string `json:"logType,omitempty"`
3710
3711	// ForceSendFields is a list of field names (e.g. "Kind") to
3712	// unconditionally include in API requests. By default, fields with
3713	// empty values are omitted from API requests. However, any non-pointer,
3714	// non-interface field appearing in ForceSendFields will be sent to the
3715	// server regardless of whether the field is empty or not. This may be
3716	// used to include empty fields in Patch requests.
3717	ForceSendFields []string `json:"-"`
3718
3719	// NullFields is a list of field names (e.g. "Kind") to include in API
3720	// requests with the JSON null value. By default, fields with empty
3721	// values are omitted from API requests. However, any field with an
3722	// empty value appearing in NullFields will be sent to the server as
3723	// null. It is an error if a field in this list has a non-empty value.
3724	// This may be used to include null fields in Patch requests.
3725	NullFields []string `json:"-"`
3726}
3727
3728func (s *TruncateLogContext) MarshalJSON() ([]byte, error) {
3729	type NoMethod TruncateLogContext
3730	raw := NoMethod(*s)
3731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3732}
3733
3734// User: A Cloud SQL user resource.
3735type User struct {
3736	// Etag: This field is deprecated and will be removed from a future
3737	// version of the
3738	// API.
3739	Etag string `json:"etag,omitempty"`
3740
3741	// Host: The host name from which the user can connect. For
3742	// <code>insert</code>
3743	// operations, host defaults to an empty string. For
3744	// <code>update</code>
3745	// operations, host is specified as part of the request URL. The host
3746	// name
3747	// cannot be updated after insertion.
3748	Host string `json:"host,omitempty"`
3749
3750	// Instance: The name of the Cloud SQL instance. This does not include
3751	// the project ID.
3752	// Can be omitted for <code>update</code> since it is already specified
3753	// on the
3754	// URL.
3755	Instance string `json:"instance,omitempty"`
3756
3757	// Kind: This is always <code>sql#user</code>.
3758	Kind string `json:"kind,omitempty"`
3759
3760	// Name: The name of the user in the Cloud SQL instance. Can be omitted
3761	// for
3762	// <code>update</code> since it is already specified in the URL.
3763	Name string `json:"name,omitempty"`
3764
3765	// Password: The password for the user.
3766	Password string `json:"password,omitempty"`
3767
3768	// Project: The project ID of the project containing the Cloud SQL
3769	// database. The Google
3770	// apps domain is prefixed if applicable. Can be omitted
3771	// for
3772	// <code>update</code> since it is already specified on the URL.
3773	Project string `json:"project,omitempty"`
3774
3775	SqlserverUserDetails *SqlServerUserDetails `json:"sqlserverUserDetails,omitempty"`
3776
3777	// ForceSendFields is a list of field names (e.g. "Etag") to
3778	// unconditionally include in API requests. By default, fields with
3779	// empty values are omitted from API requests. However, any non-pointer,
3780	// non-interface field appearing in ForceSendFields will be sent to the
3781	// server regardless of whether the field is empty or not. This may be
3782	// used to include empty fields in Patch requests.
3783	ForceSendFields []string `json:"-"`
3784
3785	// NullFields is a list of field names (e.g. "Etag") to include in API
3786	// requests with the JSON null value. By default, fields with empty
3787	// values are omitted from API requests. However, any field with an
3788	// empty value appearing in NullFields will be sent to the server as
3789	// null. It is an error if a field in this list has a non-empty value.
3790	// This may be used to include null fields in Patch requests.
3791	NullFields []string `json:"-"`
3792}
3793
3794func (s *User) MarshalJSON() ([]byte, error) {
3795	type NoMethod User
3796	raw := NoMethod(*s)
3797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3798}
3799
3800// UsersListResponse: User list response.
3801type UsersListResponse struct {
3802	// Items: List of user resources in the instance.
3803	Items []*User `json:"items,omitempty"`
3804
3805	// Kind: This is always <code>sql#usersList</code>.
3806	Kind string `json:"kind,omitempty"`
3807
3808	// NextPageToken: An identifier that uniquely identifies the operation.
3809	// You can use this
3810	// identifier to retrieve the Operations resource that has information
3811	// about
3812	// the operation.
3813	NextPageToken string `json:"nextPageToken,omitempty"`
3814
3815	// ServerResponse contains the HTTP response code and headers from the
3816	// server.
3817	googleapi.ServerResponse `json:"-"`
3818
3819	// ForceSendFields is a list of field names (e.g. "Items") to
3820	// unconditionally include in API requests. By default, fields with
3821	// empty values are omitted from API requests. However, any non-pointer,
3822	// non-interface field appearing in ForceSendFields will be sent to the
3823	// server regardless of whether the field is empty or not. This may be
3824	// used to include empty fields in Patch requests.
3825	ForceSendFields []string `json:"-"`
3826
3827	// NullFields is a list of field names (e.g. "Items") to include in API
3828	// requests with the JSON null value. By default, fields with empty
3829	// values are omitted from API requests. However, any field with an
3830	// empty value appearing in NullFields will be sent to the server as
3831	// null. It is an error if a field in this list has a non-empty value.
3832	// This may be used to include null fields in Patch requests.
3833	NullFields []string `json:"-"`
3834}
3835
3836func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
3837	type NoMethod UsersListResponse
3838	raw := NoMethod(*s)
3839	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3840}
3841
3842// method id "sql.backupRuns.delete":
3843
3844type BackupRunsDeleteCall struct {
3845	s          *Service
3846	project    string
3847	instance   string
3848	id         int64
3849	urlParams_ gensupport.URLParams
3850	ctx_       context.Context
3851	header_    http.Header
3852}
3853
3854// Delete: Deletes the backup taken by a backup run.
3855func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall {
3856	c := &BackupRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3857	c.project = project
3858	c.instance = instance
3859	c.id = id
3860	return c
3861}
3862
3863// Fields allows partial responses to be retrieved. See
3864// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3865// for more information.
3866func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall {
3867	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3868	return c
3869}
3870
3871// Context sets the context to be used in this call's Do method. Any
3872// pending HTTP request will be aborted if the provided context is
3873// canceled.
3874func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall {
3875	c.ctx_ = ctx
3876	return c
3877}
3878
3879// Header returns an http.Header that can be modified by the caller to
3880// add HTTP headers to the request.
3881func (c *BackupRunsDeleteCall) Header() http.Header {
3882	if c.header_ == nil {
3883		c.header_ = make(http.Header)
3884	}
3885	return c.header_
3886}
3887
3888func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
3889	reqHeaders := make(http.Header)
3890	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3891	for k, v := range c.header_ {
3892		reqHeaders[k] = v
3893	}
3894	reqHeaders.Set("User-Agent", c.s.userAgent())
3895	var body io.Reader = nil
3896	c.urlParams_.Set("alt", alt)
3897	c.urlParams_.Set("prettyPrint", "false")
3898	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}")
3899	urls += "?" + c.urlParams_.Encode()
3900	req, err := http.NewRequest("DELETE", urls, body)
3901	if err != nil {
3902		return nil, err
3903	}
3904	req.Header = reqHeaders
3905	googleapi.Expand(req.URL, map[string]string{
3906		"project":  c.project,
3907		"instance": c.instance,
3908		"id":       strconv.FormatInt(c.id, 10),
3909	})
3910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3911}
3912
3913// Do executes the "sql.backupRuns.delete" call.
3914// Exactly one of *Operation or error will be non-nil. Any non-2xx
3915// status code is an error. Response headers are in either
3916// *Operation.ServerResponse.Header or (if a response was returned at
3917// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3918// to check whether the returned error was because
3919// http.StatusNotModified was returned.
3920func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3921	gensupport.SetOptions(c.urlParams_, opts...)
3922	res, err := c.doRequest("json")
3923	if res != nil && res.StatusCode == http.StatusNotModified {
3924		if res.Body != nil {
3925			res.Body.Close()
3926		}
3927		return nil, &googleapi.Error{
3928			Code:   res.StatusCode,
3929			Header: res.Header,
3930		}
3931	}
3932	if err != nil {
3933		return nil, err
3934	}
3935	defer googleapi.CloseBody(res)
3936	if err := googleapi.CheckResponse(res); err != nil {
3937		return nil, err
3938	}
3939	ret := &Operation{
3940		ServerResponse: googleapi.ServerResponse{
3941			Header:         res.Header,
3942			HTTPStatusCode: res.StatusCode,
3943		},
3944	}
3945	target := &ret
3946	if err := gensupport.DecodeResponse(target, res); err != nil {
3947		return nil, err
3948	}
3949	return ret, nil
3950	// {
3951	//   "description": "Deletes the backup taken by a backup run.",
3952	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}",
3953	//   "httpMethod": "DELETE",
3954	//   "id": "sql.backupRuns.delete",
3955	//   "parameterOrder": [
3956	//     "project",
3957	//     "instance",
3958	//     "id"
3959	//   ],
3960	//   "parameters": {
3961	//     "id": {
3962	//       "description": "The ID of the Backup Run to delete. To find a Backup Run ID, use the \u003ca\nhref=\"/sql/docs/db_path/admin-api/rest/v1beta4/backupRuns/list\"\u003elist\u003c/a\u003e\nmethod.",
3963	//       "format": "int64",
3964	//       "location": "path",
3965	//       "required": true,
3966	//       "type": "string"
3967	//     },
3968	//     "instance": {
3969	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
3970	//       "location": "path",
3971	//       "required": true,
3972	//       "type": "string"
3973	//     },
3974	//     "project": {
3975	//       "description": "Project ID of the project that contains the instance.",
3976	//       "location": "path",
3977	//       "required": true,
3978	//       "type": "string"
3979	//     }
3980	//   },
3981	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}",
3982	//   "response": {
3983	//     "$ref": "Operation"
3984	//   },
3985	//   "scopes": [
3986	//     "https://www.googleapis.com/auth/cloud-platform",
3987	//     "https://www.googleapis.com/auth/sqlservice.admin"
3988	//   ]
3989	// }
3990
3991}
3992
3993// method id "sql.backupRuns.get":
3994
3995type BackupRunsGetCall struct {
3996	s            *Service
3997	project      string
3998	instance     string
3999	id           int64
4000	urlParams_   gensupport.URLParams
4001	ifNoneMatch_ string
4002	ctx_         context.Context
4003	header_      http.Header
4004}
4005
4006// Get: Retrieves a resource containing information about a backup run.
4007func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall {
4008	c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4009	c.project = project
4010	c.instance = instance
4011	c.id = id
4012	return c
4013}
4014
4015// Fields allows partial responses to be retrieved. See
4016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4017// for more information.
4018func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall {
4019	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4020	return c
4021}
4022
4023// IfNoneMatch sets the optional parameter which makes the operation
4024// fail if the object's ETag matches the given value. This is useful for
4025// getting updates only after the object has changed since the last
4026// request. Use googleapi.IsNotModified to check whether the response
4027// error from Do is the result of In-None-Match.
4028func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall {
4029	c.ifNoneMatch_ = entityTag
4030	return c
4031}
4032
4033// Context sets the context to be used in this call's Do method. Any
4034// pending HTTP request will be aborted if the provided context is
4035// canceled.
4036func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
4037	c.ctx_ = ctx
4038	return c
4039}
4040
4041// Header returns an http.Header that can be modified by the caller to
4042// add HTTP headers to the request.
4043func (c *BackupRunsGetCall) Header() http.Header {
4044	if c.header_ == nil {
4045		c.header_ = make(http.Header)
4046	}
4047	return c.header_
4048}
4049
4050func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
4051	reqHeaders := make(http.Header)
4052	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4053	for k, v := range c.header_ {
4054		reqHeaders[k] = v
4055	}
4056	reqHeaders.Set("User-Agent", c.s.userAgent())
4057	if c.ifNoneMatch_ != "" {
4058		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4059	}
4060	var body io.Reader = nil
4061	c.urlParams_.Set("alt", alt)
4062	c.urlParams_.Set("prettyPrint", "false")
4063	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}")
4064	urls += "?" + c.urlParams_.Encode()
4065	req, err := http.NewRequest("GET", urls, body)
4066	if err != nil {
4067		return nil, err
4068	}
4069	req.Header = reqHeaders
4070	googleapi.Expand(req.URL, map[string]string{
4071		"project":  c.project,
4072		"instance": c.instance,
4073		"id":       strconv.FormatInt(c.id, 10),
4074	})
4075	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4076}
4077
4078// Do executes the "sql.backupRuns.get" call.
4079// Exactly one of *BackupRun or error will be non-nil. Any non-2xx
4080// status code is an error. Response headers are in either
4081// *BackupRun.ServerResponse.Header or (if a response was returned at
4082// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4083// to check whether the returned error was because
4084// http.StatusNotModified was returned.
4085func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error) {
4086	gensupport.SetOptions(c.urlParams_, opts...)
4087	res, err := c.doRequest("json")
4088	if res != nil && res.StatusCode == http.StatusNotModified {
4089		if res.Body != nil {
4090			res.Body.Close()
4091		}
4092		return nil, &googleapi.Error{
4093			Code:   res.StatusCode,
4094			Header: res.Header,
4095		}
4096	}
4097	if err != nil {
4098		return nil, err
4099	}
4100	defer googleapi.CloseBody(res)
4101	if err := googleapi.CheckResponse(res); err != nil {
4102		return nil, err
4103	}
4104	ret := &BackupRun{
4105		ServerResponse: googleapi.ServerResponse{
4106			Header:         res.Header,
4107			HTTPStatusCode: res.StatusCode,
4108		},
4109	}
4110	target := &ret
4111	if err := gensupport.DecodeResponse(target, res); err != nil {
4112		return nil, err
4113	}
4114	return ret, nil
4115	// {
4116	//   "description": "Retrieves a resource containing information about a backup run.",
4117	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}",
4118	//   "httpMethod": "GET",
4119	//   "id": "sql.backupRuns.get",
4120	//   "parameterOrder": [
4121	//     "project",
4122	//     "instance",
4123	//     "id"
4124	//   ],
4125	//   "parameters": {
4126	//     "id": {
4127	//       "description": "The ID of this Backup Run.",
4128	//       "format": "int64",
4129	//       "location": "path",
4130	//       "required": true,
4131	//       "type": "string"
4132	//     },
4133	//     "instance": {
4134	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4135	//       "location": "path",
4136	//       "required": true,
4137	//       "type": "string"
4138	//     },
4139	//     "project": {
4140	//       "description": "Project ID of the project that contains the instance.",
4141	//       "location": "path",
4142	//       "required": true,
4143	//       "type": "string"
4144	//     }
4145	//   },
4146	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}",
4147	//   "response": {
4148	//     "$ref": "BackupRun"
4149	//   },
4150	//   "scopes": [
4151	//     "https://www.googleapis.com/auth/cloud-platform",
4152	//     "https://www.googleapis.com/auth/sqlservice.admin"
4153	//   ]
4154	// }
4155
4156}
4157
4158// method id "sql.backupRuns.insert":
4159
4160type BackupRunsInsertCall struct {
4161	s          *Service
4162	project    string
4163	instance   string
4164	backuprun  *BackupRun
4165	urlParams_ gensupport.URLParams
4166	ctx_       context.Context
4167	header_    http.Header
4168}
4169
4170// Insert: Creates a new backup run on demand. This method is applicable
4171// only to
4172// Second Generation instances.
4173func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall {
4174	c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4175	c.project = project
4176	c.instance = instance
4177	c.backuprun = backuprun
4178	return c
4179}
4180
4181// Fields allows partial responses to be retrieved. See
4182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4183// for more information.
4184func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall {
4185	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4186	return c
4187}
4188
4189// Context sets the context to be used in this call's Do method. Any
4190// pending HTTP request will be aborted if the provided context is
4191// canceled.
4192func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall {
4193	c.ctx_ = ctx
4194	return c
4195}
4196
4197// Header returns an http.Header that can be modified by the caller to
4198// add HTTP headers to the request.
4199func (c *BackupRunsInsertCall) Header() http.Header {
4200	if c.header_ == nil {
4201		c.header_ = make(http.Header)
4202	}
4203	return c.header_
4204}
4205
4206func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) {
4207	reqHeaders := make(http.Header)
4208	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4209	for k, v := range c.header_ {
4210		reqHeaders[k] = v
4211	}
4212	reqHeaders.Set("User-Agent", c.s.userAgent())
4213	var body io.Reader = nil
4214	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuprun)
4215	if err != nil {
4216		return nil, err
4217	}
4218	reqHeaders.Set("Content-Type", "application/json")
4219	c.urlParams_.Set("alt", alt)
4220	c.urlParams_.Set("prettyPrint", "false")
4221	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns")
4222	urls += "?" + c.urlParams_.Encode()
4223	req, err := http.NewRequest("POST", urls, body)
4224	if err != nil {
4225		return nil, err
4226	}
4227	req.Header = reqHeaders
4228	googleapi.Expand(req.URL, map[string]string{
4229		"project":  c.project,
4230		"instance": c.instance,
4231	})
4232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4233}
4234
4235// Do executes the "sql.backupRuns.insert" call.
4236// Exactly one of *Operation or error will be non-nil. Any non-2xx
4237// status code is an error. Response headers are in either
4238// *Operation.ServerResponse.Header or (if a response was returned at
4239// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4240// to check whether the returned error was because
4241// http.StatusNotModified was returned.
4242func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4243	gensupport.SetOptions(c.urlParams_, opts...)
4244	res, err := c.doRequest("json")
4245	if res != nil && res.StatusCode == http.StatusNotModified {
4246		if res.Body != nil {
4247			res.Body.Close()
4248		}
4249		return nil, &googleapi.Error{
4250			Code:   res.StatusCode,
4251			Header: res.Header,
4252		}
4253	}
4254	if err != nil {
4255		return nil, err
4256	}
4257	defer googleapi.CloseBody(res)
4258	if err := googleapi.CheckResponse(res); err != nil {
4259		return nil, err
4260	}
4261	ret := &Operation{
4262		ServerResponse: googleapi.ServerResponse{
4263			Header:         res.Header,
4264			HTTPStatusCode: res.StatusCode,
4265		},
4266	}
4267	target := &ret
4268	if err := gensupport.DecodeResponse(target, res); err != nil {
4269		return nil, err
4270	}
4271	return ret, nil
4272	// {
4273	//   "description": "Creates a new backup run on demand. This method is applicable only to\nSecond Generation instances.",
4274	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns",
4275	//   "httpMethod": "POST",
4276	//   "id": "sql.backupRuns.insert",
4277	//   "parameterOrder": [
4278	//     "project",
4279	//     "instance"
4280	//   ],
4281	//   "parameters": {
4282	//     "instance": {
4283	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4284	//       "location": "path",
4285	//       "required": true,
4286	//       "type": "string"
4287	//     },
4288	//     "project": {
4289	//       "description": "Project ID of the project that contains the instance.",
4290	//       "location": "path",
4291	//       "required": true,
4292	//       "type": "string"
4293	//     }
4294	//   },
4295	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns",
4296	//   "request": {
4297	//     "$ref": "BackupRun"
4298	//   },
4299	//   "response": {
4300	//     "$ref": "Operation"
4301	//   },
4302	//   "scopes": [
4303	//     "https://www.googleapis.com/auth/cloud-platform",
4304	//     "https://www.googleapis.com/auth/sqlservice.admin"
4305	//   ]
4306	// }
4307
4308}
4309
4310// method id "sql.backupRuns.list":
4311
4312type BackupRunsListCall struct {
4313	s            *Service
4314	project      string
4315	instance     string
4316	urlParams_   gensupport.URLParams
4317	ifNoneMatch_ string
4318	ctx_         context.Context
4319	header_      http.Header
4320}
4321
4322// List: Lists all backup runs associated with a given instance and
4323// configuration in
4324// the reverse chronological order of the backup initiation time.
4325func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall {
4326	c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4327	c.project = project
4328	c.instance = instance
4329	return c
4330}
4331
4332// MaxResults sets the optional parameter "maxResults": Maximum number
4333// of backup runs per response.
4334func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall {
4335	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4336	return c
4337}
4338
4339// PageToken sets the optional parameter "pageToken": A
4340// previously-returned page token representing part of the larger set
4341// of
4342// results to view.
4343func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall {
4344	c.urlParams_.Set("pageToken", pageToken)
4345	return c
4346}
4347
4348// Fields allows partial responses to be retrieved. See
4349// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4350// for more information.
4351func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall {
4352	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4353	return c
4354}
4355
4356// IfNoneMatch sets the optional parameter which makes the operation
4357// fail if the object's ETag matches the given value. This is useful for
4358// getting updates only after the object has changed since the last
4359// request. Use googleapi.IsNotModified to check whether the response
4360// error from Do is the result of In-None-Match.
4361func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall {
4362	c.ifNoneMatch_ = entityTag
4363	return c
4364}
4365
4366// Context sets the context to be used in this call's Do method. Any
4367// pending HTTP request will be aborted if the provided context is
4368// canceled.
4369func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
4370	c.ctx_ = ctx
4371	return c
4372}
4373
4374// Header returns an http.Header that can be modified by the caller to
4375// add HTTP headers to the request.
4376func (c *BackupRunsListCall) Header() http.Header {
4377	if c.header_ == nil {
4378		c.header_ = make(http.Header)
4379	}
4380	return c.header_
4381}
4382
4383func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
4384	reqHeaders := make(http.Header)
4385	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4386	for k, v := range c.header_ {
4387		reqHeaders[k] = v
4388	}
4389	reqHeaders.Set("User-Agent", c.s.userAgent())
4390	if c.ifNoneMatch_ != "" {
4391		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4392	}
4393	var body io.Reader = nil
4394	c.urlParams_.Set("alt", alt)
4395	c.urlParams_.Set("prettyPrint", "false")
4396	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns")
4397	urls += "?" + c.urlParams_.Encode()
4398	req, err := http.NewRequest("GET", urls, body)
4399	if err != nil {
4400		return nil, err
4401	}
4402	req.Header = reqHeaders
4403	googleapi.Expand(req.URL, map[string]string{
4404		"project":  c.project,
4405		"instance": c.instance,
4406	})
4407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4408}
4409
4410// Do executes the "sql.backupRuns.list" call.
4411// Exactly one of *BackupRunsListResponse or error will be non-nil. Any
4412// non-2xx status code is an error. Response headers are in either
4413// *BackupRunsListResponse.ServerResponse.Header or (if a response was
4414// returned at all) in error.(*googleapi.Error).Header. Use
4415// googleapi.IsNotModified to check whether the returned error was
4416// because http.StatusNotModified was returned.
4417func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error) {
4418	gensupport.SetOptions(c.urlParams_, opts...)
4419	res, err := c.doRequest("json")
4420	if res != nil && res.StatusCode == http.StatusNotModified {
4421		if res.Body != nil {
4422			res.Body.Close()
4423		}
4424		return nil, &googleapi.Error{
4425			Code:   res.StatusCode,
4426			Header: res.Header,
4427		}
4428	}
4429	if err != nil {
4430		return nil, err
4431	}
4432	defer googleapi.CloseBody(res)
4433	if err := googleapi.CheckResponse(res); err != nil {
4434		return nil, err
4435	}
4436	ret := &BackupRunsListResponse{
4437		ServerResponse: googleapi.ServerResponse{
4438			Header:         res.Header,
4439			HTTPStatusCode: res.StatusCode,
4440		},
4441	}
4442	target := &ret
4443	if err := gensupport.DecodeResponse(target, res); err != nil {
4444		return nil, err
4445	}
4446	return ret, nil
4447	// {
4448	//   "description": "Lists all backup runs associated with a given instance and configuration in\nthe reverse chronological order of the backup initiation time.",
4449	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns",
4450	//   "httpMethod": "GET",
4451	//   "id": "sql.backupRuns.list",
4452	//   "parameterOrder": [
4453	//     "project",
4454	//     "instance"
4455	//   ],
4456	//   "parameters": {
4457	//     "instance": {
4458	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4459	//       "location": "path",
4460	//       "required": true,
4461	//       "type": "string"
4462	//     },
4463	//     "maxResults": {
4464	//       "description": "Maximum number of backup runs per response.",
4465	//       "format": "int32",
4466	//       "location": "query",
4467	//       "type": "integer"
4468	//     },
4469	//     "pageToken": {
4470	//       "description": "A previously-returned page token representing part of the larger set of\nresults to view.",
4471	//       "location": "query",
4472	//       "type": "string"
4473	//     },
4474	//     "project": {
4475	//       "description": "Project ID of the project that contains the instance.",
4476	//       "location": "path",
4477	//       "required": true,
4478	//       "type": "string"
4479	//     }
4480	//   },
4481	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns",
4482	//   "response": {
4483	//     "$ref": "BackupRunsListResponse"
4484	//   },
4485	//   "scopes": [
4486	//     "https://www.googleapis.com/auth/cloud-platform",
4487	//     "https://www.googleapis.com/auth/sqlservice.admin"
4488	//   ]
4489	// }
4490
4491}
4492
4493// Pages invokes f for each page of results.
4494// A non-nil error returned from f will halt the iteration.
4495// The provided context supersedes any context provided to the Context method.
4496func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error {
4497	c.ctx_ = ctx
4498	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4499	for {
4500		x, err := c.Do()
4501		if err != nil {
4502			return err
4503		}
4504		if err := f(x); err != nil {
4505			return err
4506		}
4507		if x.NextPageToken == "" {
4508			return nil
4509		}
4510		c.PageToken(x.NextPageToken)
4511	}
4512}
4513
4514// method id "sql.databases.delete":
4515
4516type DatabasesDeleteCall struct {
4517	s          *Service
4518	project    string
4519	instance   string
4520	database   string
4521	urlParams_ gensupport.URLParams
4522	ctx_       context.Context
4523	header_    http.Header
4524}
4525
4526// Delete: Deletes a database from a Cloud SQL instance.
4527func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall {
4528	c := &DatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4529	c.project = project
4530	c.instance = instance
4531	c.database = database
4532	return c
4533}
4534
4535// Fields allows partial responses to be retrieved. See
4536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4537// for more information.
4538func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall {
4539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4540	return c
4541}
4542
4543// Context sets the context to be used in this call's Do method. Any
4544// pending HTTP request will be aborted if the provided context is
4545// canceled.
4546func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall {
4547	c.ctx_ = ctx
4548	return c
4549}
4550
4551// Header returns an http.Header that can be modified by the caller to
4552// add HTTP headers to the request.
4553func (c *DatabasesDeleteCall) Header() http.Header {
4554	if c.header_ == nil {
4555		c.header_ = make(http.Header)
4556	}
4557	return c.header_
4558}
4559
4560func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
4561	reqHeaders := make(http.Header)
4562	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4563	for k, v := range c.header_ {
4564		reqHeaders[k] = v
4565	}
4566	reqHeaders.Set("User-Agent", c.s.userAgent())
4567	var body io.Reader = nil
4568	c.urlParams_.Set("alt", alt)
4569	c.urlParams_.Set("prettyPrint", "false")
4570	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}")
4571	urls += "?" + c.urlParams_.Encode()
4572	req, err := http.NewRequest("DELETE", urls, body)
4573	if err != nil {
4574		return nil, err
4575	}
4576	req.Header = reqHeaders
4577	googleapi.Expand(req.URL, map[string]string{
4578		"project":  c.project,
4579		"instance": c.instance,
4580		"database": c.database,
4581	})
4582	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4583}
4584
4585// Do executes the "sql.databases.delete" call.
4586// Exactly one of *Operation or error will be non-nil. Any non-2xx
4587// status code is an error. Response headers are in either
4588// *Operation.ServerResponse.Header or (if a response was returned at
4589// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4590// to check whether the returned error was because
4591// http.StatusNotModified was returned.
4592func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4593	gensupport.SetOptions(c.urlParams_, opts...)
4594	res, err := c.doRequest("json")
4595	if res != nil && res.StatusCode == http.StatusNotModified {
4596		if res.Body != nil {
4597			res.Body.Close()
4598		}
4599		return nil, &googleapi.Error{
4600			Code:   res.StatusCode,
4601			Header: res.Header,
4602		}
4603	}
4604	if err != nil {
4605		return nil, err
4606	}
4607	defer googleapi.CloseBody(res)
4608	if err := googleapi.CheckResponse(res); err != nil {
4609		return nil, err
4610	}
4611	ret := &Operation{
4612		ServerResponse: googleapi.ServerResponse{
4613			Header:         res.Header,
4614			HTTPStatusCode: res.StatusCode,
4615		},
4616	}
4617	target := &ret
4618	if err := gensupport.DecodeResponse(target, res); err != nil {
4619		return nil, err
4620	}
4621	return ret, nil
4622	// {
4623	//   "description": "Deletes a database from a Cloud SQL instance.",
4624	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
4625	//   "httpMethod": "DELETE",
4626	//   "id": "sql.databases.delete",
4627	//   "parameterOrder": [
4628	//     "project",
4629	//     "instance",
4630	//     "database"
4631	//   ],
4632	//   "parameters": {
4633	//     "database": {
4634	//       "description": "Name of the database to be deleted in the instance.",
4635	//       "location": "path",
4636	//       "required": true,
4637	//       "type": "string"
4638	//     },
4639	//     "instance": {
4640	//       "description": "Database instance ID. This does not include the project ID.",
4641	//       "location": "path",
4642	//       "required": true,
4643	//       "type": "string"
4644	//     },
4645	//     "project": {
4646	//       "description": "Project ID of the project that contains the instance.",
4647	//       "location": "path",
4648	//       "required": true,
4649	//       "type": "string"
4650	//     }
4651	//   },
4652	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
4653	//   "response": {
4654	//     "$ref": "Operation"
4655	//   },
4656	//   "scopes": [
4657	//     "https://www.googleapis.com/auth/cloud-platform",
4658	//     "https://www.googleapis.com/auth/sqlservice.admin"
4659	//   ]
4660	// }
4661
4662}
4663
4664// method id "sql.databases.get":
4665
4666type DatabasesGetCall struct {
4667	s            *Service
4668	project      string
4669	instance     string
4670	database     string
4671	urlParams_   gensupport.URLParams
4672	ifNoneMatch_ string
4673	ctx_         context.Context
4674	header_      http.Header
4675}
4676
4677// Get: Retrieves a resource containing information about a database
4678// inside a Cloud
4679// SQL instance.
4680func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall {
4681	c := &DatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4682	c.project = project
4683	c.instance = instance
4684	c.database = database
4685	return c
4686}
4687
4688// Fields allows partial responses to be retrieved. See
4689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4690// for more information.
4691func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall {
4692	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4693	return c
4694}
4695
4696// IfNoneMatch sets the optional parameter which makes the operation
4697// fail if the object's ETag matches the given value. This is useful for
4698// getting updates only after the object has changed since the last
4699// request. Use googleapi.IsNotModified to check whether the response
4700// error from Do is the result of In-None-Match.
4701func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall {
4702	c.ifNoneMatch_ = entityTag
4703	return c
4704}
4705
4706// Context sets the context to be used in this call's Do method. Any
4707// pending HTTP request will be aborted if the provided context is
4708// canceled.
4709func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall {
4710	c.ctx_ = ctx
4711	return c
4712}
4713
4714// Header returns an http.Header that can be modified by the caller to
4715// add HTTP headers to the request.
4716func (c *DatabasesGetCall) Header() http.Header {
4717	if c.header_ == nil {
4718		c.header_ = make(http.Header)
4719	}
4720	return c.header_
4721}
4722
4723func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) {
4724	reqHeaders := make(http.Header)
4725	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4726	for k, v := range c.header_ {
4727		reqHeaders[k] = v
4728	}
4729	reqHeaders.Set("User-Agent", c.s.userAgent())
4730	if c.ifNoneMatch_ != "" {
4731		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4732	}
4733	var body io.Reader = nil
4734	c.urlParams_.Set("alt", alt)
4735	c.urlParams_.Set("prettyPrint", "false")
4736	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}")
4737	urls += "?" + c.urlParams_.Encode()
4738	req, err := http.NewRequest("GET", urls, body)
4739	if err != nil {
4740		return nil, err
4741	}
4742	req.Header = reqHeaders
4743	googleapi.Expand(req.URL, map[string]string{
4744		"project":  c.project,
4745		"instance": c.instance,
4746		"database": c.database,
4747	})
4748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4749}
4750
4751// Do executes the "sql.databases.get" call.
4752// Exactly one of *Database or error will be non-nil. Any non-2xx status
4753// code is an error. Response headers are in either
4754// *Database.ServerResponse.Header or (if a response was returned at
4755// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4756// to check whether the returned error was because
4757// http.StatusNotModified was returned.
4758func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
4759	gensupport.SetOptions(c.urlParams_, opts...)
4760	res, err := c.doRequest("json")
4761	if res != nil && res.StatusCode == http.StatusNotModified {
4762		if res.Body != nil {
4763			res.Body.Close()
4764		}
4765		return nil, &googleapi.Error{
4766			Code:   res.StatusCode,
4767			Header: res.Header,
4768		}
4769	}
4770	if err != nil {
4771		return nil, err
4772	}
4773	defer googleapi.CloseBody(res)
4774	if err := googleapi.CheckResponse(res); err != nil {
4775		return nil, err
4776	}
4777	ret := &Database{
4778		ServerResponse: googleapi.ServerResponse{
4779			Header:         res.Header,
4780			HTTPStatusCode: res.StatusCode,
4781		},
4782	}
4783	target := &ret
4784	if err := gensupport.DecodeResponse(target, res); err != nil {
4785		return nil, err
4786	}
4787	return ret, nil
4788	// {
4789	//   "description": "Retrieves a resource containing information about a database inside a Cloud\nSQL instance.",
4790	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
4791	//   "httpMethod": "GET",
4792	//   "id": "sql.databases.get",
4793	//   "parameterOrder": [
4794	//     "project",
4795	//     "instance",
4796	//     "database"
4797	//   ],
4798	//   "parameters": {
4799	//     "database": {
4800	//       "description": "Name of the database in the instance.",
4801	//       "location": "path",
4802	//       "required": true,
4803	//       "type": "string"
4804	//     },
4805	//     "instance": {
4806	//       "description": "Database instance ID. This does not include the project ID.",
4807	//       "location": "path",
4808	//       "required": true,
4809	//       "type": "string"
4810	//     },
4811	//     "project": {
4812	//       "description": "Project ID of the project that contains the instance.",
4813	//       "location": "path",
4814	//       "required": true,
4815	//       "type": "string"
4816	//     }
4817	//   },
4818	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
4819	//   "response": {
4820	//     "$ref": "Database"
4821	//   },
4822	//   "scopes": [
4823	//     "https://www.googleapis.com/auth/cloud-platform",
4824	//     "https://www.googleapis.com/auth/sqlservice.admin"
4825	//   ]
4826	// }
4827
4828}
4829
4830// method id "sql.databases.insert":
4831
4832type DatabasesInsertCall struct {
4833	s          *Service
4834	project    string
4835	instance   string
4836	database   *Database
4837	urlParams_ gensupport.URLParams
4838	ctx_       context.Context
4839	header_    http.Header
4840}
4841
4842// Insert: Inserts a resource containing information about a database
4843// inside a Cloud
4844// SQL instance.
4845func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall {
4846	c := &DatabasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4847	c.project = project
4848	c.instance = instance
4849	c.database = database
4850	return c
4851}
4852
4853// Fields allows partial responses to be retrieved. See
4854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4855// for more information.
4856func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall {
4857	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4858	return c
4859}
4860
4861// Context sets the context to be used in this call's Do method. Any
4862// pending HTTP request will be aborted if the provided context is
4863// canceled.
4864func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall {
4865	c.ctx_ = ctx
4866	return c
4867}
4868
4869// Header returns an http.Header that can be modified by the caller to
4870// add HTTP headers to the request.
4871func (c *DatabasesInsertCall) Header() http.Header {
4872	if c.header_ == nil {
4873		c.header_ = make(http.Header)
4874	}
4875	return c.header_
4876}
4877
4878func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) {
4879	reqHeaders := make(http.Header)
4880	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4881	for k, v := range c.header_ {
4882		reqHeaders[k] = v
4883	}
4884	reqHeaders.Set("User-Agent", c.s.userAgent())
4885	var body io.Reader = nil
4886	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
4887	if err != nil {
4888		return nil, err
4889	}
4890	reqHeaders.Set("Content-Type", "application/json")
4891	c.urlParams_.Set("alt", alt)
4892	c.urlParams_.Set("prettyPrint", "false")
4893	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/databases")
4894	urls += "?" + c.urlParams_.Encode()
4895	req, err := http.NewRequest("POST", urls, body)
4896	if err != nil {
4897		return nil, err
4898	}
4899	req.Header = reqHeaders
4900	googleapi.Expand(req.URL, map[string]string{
4901		"project":  c.project,
4902		"instance": c.instance,
4903	})
4904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4905}
4906
4907// Do executes the "sql.databases.insert" call.
4908// Exactly one of *Operation or error will be non-nil. Any non-2xx
4909// status code is an error. Response headers are in either
4910// *Operation.ServerResponse.Header or (if a response was returned at
4911// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4912// to check whether the returned error was because
4913// http.StatusNotModified was returned.
4914func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4915	gensupport.SetOptions(c.urlParams_, opts...)
4916	res, err := c.doRequest("json")
4917	if res != nil && res.StatusCode == http.StatusNotModified {
4918		if res.Body != nil {
4919			res.Body.Close()
4920		}
4921		return nil, &googleapi.Error{
4922			Code:   res.StatusCode,
4923			Header: res.Header,
4924		}
4925	}
4926	if err != nil {
4927		return nil, err
4928	}
4929	defer googleapi.CloseBody(res)
4930	if err := googleapi.CheckResponse(res); err != nil {
4931		return nil, err
4932	}
4933	ret := &Operation{
4934		ServerResponse: googleapi.ServerResponse{
4935			Header:         res.Header,
4936			HTTPStatusCode: res.StatusCode,
4937		},
4938	}
4939	target := &ret
4940	if err := gensupport.DecodeResponse(target, res); err != nil {
4941		return nil, err
4942	}
4943	return ret, nil
4944	// {
4945	//   "description": "Inserts a resource containing information about a database inside a Cloud\nSQL instance.",
4946	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases",
4947	//   "httpMethod": "POST",
4948	//   "id": "sql.databases.insert",
4949	//   "parameterOrder": [
4950	//     "project",
4951	//     "instance"
4952	//   ],
4953	//   "parameters": {
4954	//     "instance": {
4955	//       "description": "Database instance ID. This does not include the project ID.",
4956	//       "location": "path",
4957	//       "required": true,
4958	//       "type": "string"
4959	//     },
4960	//     "project": {
4961	//       "description": "Project ID of the project that contains the instance.",
4962	//       "location": "path",
4963	//       "required": true,
4964	//       "type": "string"
4965	//     }
4966	//   },
4967	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/databases",
4968	//   "request": {
4969	//     "$ref": "Database"
4970	//   },
4971	//   "response": {
4972	//     "$ref": "Operation"
4973	//   },
4974	//   "scopes": [
4975	//     "https://www.googleapis.com/auth/cloud-platform",
4976	//     "https://www.googleapis.com/auth/sqlservice.admin"
4977	//   ]
4978	// }
4979
4980}
4981
4982// method id "sql.databases.list":
4983
4984type DatabasesListCall struct {
4985	s            *Service
4986	project      string
4987	instance     string
4988	urlParams_   gensupport.URLParams
4989	ifNoneMatch_ string
4990	ctx_         context.Context
4991	header_      http.Header
4992}
4993
4994// List: Lists databases in the specified Cloud SQL instance.
4995func (r *DatabasesService) List(project string, instance string) *DatabasesListCall {
4996	c := &DatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4997	c.project = project
4998	c.instance = instance
4999	return c
5000}
5001
5002// Fields allows partial responses to be retrieved. See
5003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5004// for more information.
5005func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall {
5006	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5007	return c
5008}
5009
5010// IfNoneMatch sets the optional parameter which makes the operation
5011// fail if the object's ETag matches the given value. This is useful for
5012// getting updates only after the object has changed since the last
5013// request. Use googleapi.IsNotModified to check whether the response
5014// error from Do is the result of In-None-Match.
5015func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall {
5016	c.ifNoneMatch_ = entityTag
5017	return c
5018}
5019
5020// Context sets the context to be used in this call's Do method. Any
5021// pending HTTP request will be aborted if the provided context is
5022// canceled.
5023func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall {
5024	c.ctx_ = ctx
5025	return c
5026}
5027
5028// Header returns an http.Header that can be modified by the caller to
5029// add HTTP headers to the request.
5030func (c *DatabasesListCall) Header() http.Header {
5031	if c.header_ == nil {
5032		c.header_ = make(http.Header)
5033	}
5034	return c.header_
5035}
5036
5037func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) {
5038	reqHeaders := make(http.Header)
5039	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5040	for k, v := range c.header_ {
5041		reqHeaders[k] = v
5042	}
5043	reqHeaders.Set("User-Agent", c.s.userAgent())
5044	if c.ifNoneMatch_ != "" {
5045		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5046	}
5047	var body io.Reader = nil
5048	c.urlParams_.Set("alt", alt)
5049	c.urlParams_.Set("prettyPrint", "false")
5050	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/databases")
5051	urls += "?" + c.urlParams_.Encode()
5052	req, err := http.NewRequest("GET", urls, body)
5053	if err != nil {
5054		return nil, err
5055	}
5056	req.Header = reqHeaders
5057	googleapi.Expand(req.URL, map[string]string{
5058		"project":  c.project,
5059		"instance": c.instance,
5060	})
5061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5062}
5063
5064// Do executes the "sql.databases.list" call.
5065// Exactly one of *DatabasesListResponse or error will be non-nil. Any
5066// non-2xx status code is an error. Response headers are in either
5067// *DatabasesListResponse.ServerResponse.Header or (if a response was
5068// returned at all) in error.(*googleapi.Error).Header. Use
5069// googleapi.IsNotModified to check whether the returned error was
5070// because http.StatusNotModified was returned.
5071func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error) {
5072	gensupport.SetOptions(c.urlParams_, opts...)
5073	res, err := c.doRequest("json")
5074	if res != nil && res.StatusCode == http.StatusNotModified {
5075		if res.Body != nil {
5076			res.Body.Close()
5077		}
5078		return nil, &googleapi.Error{
5079			Code:   res.StatusCode,
5080			Header: res.Header,
5081		}
5082	}
5083	if err != nil {
5084		return nil, err
5085	}
5086	defer googleapi.CloseBody(res)
5087	if err := googleapi.CheckResponse(res); err != nil {
5088		return nil, err
5089	}
5090	ret := &DatabasesListResponse{
5091		ServerResponse: googleapi.ServerResponse{
5092			Header:         res.Header,
5093			HTTPStatusCode: res.StatusCode,
5094		},
5095	}
5096	target := &ret
5097	if err := gensupport.DecodeResponse(target, res); err != nil {
5098		return nil, err
5099	}
5100	return ret, nil
5101	// {
5102	//   "description": "Lists databases in the specified Cloud SQL instance.",
5103	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases",
5104	//   "httpMethod": "GET",
5105	//   "id": "sql.databases.list",
5106	//   "parameterOrder": [
5107	//     "project",
5108	//     "instance"
5109	//   ],
5110	//   "parameters": {
5111	//     "instance": {
5112	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
5113	//       "location": "path",
5114	//       "required": true,
5115	//       "type": "string"
5116	//     },
5117	//     "project": {
5118	//       "description": "Project ID of the project that contains the instance.",
5119	//       "location": "path",
5120	//       "required": true,
5121	//       "type": "string"
5122	//     }
5123	//   },
5124	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/databases",
5125	//   "response": {
5126	//     "$ref": "DatabasesListResponse"
5127	//   },
5128	//   "scopes": [
5129	//     "https://www.googleapis.com/auth/cloud-platform",
5130	//     "https://www.googleapis.com/auth/sqlservice.admin"
5131	//   ]
5132	// }
5133
5134}
5135
5136// method id "sql.databases.patch":
5137
5138type DatabasesPatchCall struct {
5139	s          *Service
5140	project    string
5141	instance   string
5142	database   string
5143	database2  *Database
5144	urlParams_ gensupport.URLParams
5145	ctx_       context.Context
5146	header_    http.Header
5147}
5148
5149// Patch: Partially updates a resource containing information about a
5150// database inside
5151// a Cloud SQL instance. This method supports patch semantics.
5152func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall {
5153	c := &DatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5154	c.project = project
5155	c.instance = instance
5156	c.database = database
5157	c.database2 = database2
5158	return c
5159}
5160
5161// Fields allows partial responses to be retrieved. See
5162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5163// for more information.
5164func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall {
5165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5166	return c
5167}
5168
5169// Context sets the context to be used in this call's Do method. Any
5170// pending HTTP request will be aborted if the provided context is
5171// canceled.
5172func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall {
5173	c.ctx_ = ctx
5174	return c
5175}
5176
5177// Header returns an http.Header that can be modified by the caller to
5178// add HTTP headers to the request.
5179func (c *DatabasesPatchCall) Header() http.Header {
5180	if c.header_ == nil {
5181		c.header_ = make(http.Header)
5182	}
5183	return c.header_
5184}
5185
5186func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
5187	reqHeaders := make(http.Header)
5188	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5189	for k, v := range c.header_ {
5190		reqHeaders[k] = v
5191	}
5192	reqHeaders.Set("User-Agent", c.s.userAgent())
5193	var body io.Reader = nil
5194	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
5195	if err != nil {
5196		return nil, err
5197	}
5198	reqHeaders.Set("Content-Type", "application/json")
5199	c.urlParams_.Set("alt", alt)
5200	c.urlParams_.Set("prettyPrint", "false")
5201	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}")
5202	urls += "?" + c.urlParams_.Encode()
5203	req, err := http.NewRequest("PATCH", urls, body)
5204	if err != nil {
5205		return nil, err
5206	}
5207	req.Header = reqHeaders
5208	googleapi.Expand(req.URL, map[string]string{
5209		"project":  c.project,
5210		"instance": c.instance,
5211		"database": c.database,
5212	})
5213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5214}
5215
5216// Do executes the "sql.databases.patch" call.
5217// Exactly one of *Operation or error will be non-nil. Any non-2xx
5218// status code is an error. Response headers are in either
5219// *Operation.ServerResponse.Header or (if a response was returned at
5220// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5221// to check whether the returned error was because
5222// http.StatusNotModified was returned.
5223func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5224	gensupport.SetOptions(c.urlParams_, opts...)
5225	res, err := c.doRequest("json")
5226	if res != nil && res.StatusCode == http.StatusNotModified {
5227		if res.Body != nil {
5228			res.Body.Close()
5229		}
5230		return nil, &googleapi.Error{
5231			Code:   res.StatusCode,
5232			Header: res.Header,
5233		}
5234	}
5235	if err != nil {
5236		return nil, err
5237	}
5238	defer googleapi.CloseBody(res)
5239	if err := googleapi.CheckResponse(res); err != nil {
5240		return nil, err
5241	}
5242	ret := &Operation{
5243		ServerResponse: googleapi.ServerResponse{
5244			Header:         res.Header,
5245			HTTPStatusCode: res.StatusCode,
5246		},
5247	}
5248	target := &ret
5249	if err := gensupport.DecodeResponse(target, res); err != nil {
5250		return nil, err
5251	}
5252	return ret, nil
5253	// {
5254	//   "description": "Partially updates a resource containing information about a database inside\na Cloud SQL instance. This method supports patch semantics.",
5255	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
5256	//   "httpMethod": "PATCH",
5257	//   "id": "sql.databases.patch",
5258	//   "parameterOrder": [
5259	//     "project",
5260	//     "instance",
5261	//     "database"
5262	//   ],
5263	//   "parameters": {
5264	//     "database": {
5265	//       "description": "Name of the database to be updated in the instance.",
5266	//       "location": "path",
5267	//       "required": true,
5268	//       "type": "string"
5269	//     },
5270	//     "instance": {
5271	//       "description": "Database instance ID. This does not include the project ID.",
5272	//       "location": "path",
5273	//       "required": true,
5274	//       "type": "string"
5275	//     },
5276	//     "project": {
5277	//       "description": "Project ID of the project that contains the instance.",
5278	//       "location": "path",
5279	//       "required": true,
5280	//       "type": "string"
5281	//     }
5282	//   },
5283	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
5284	//   "request": {
5285	//     "$ref": "Database"
5286	//   },
5287	//   "response": {
5288	//     "$ref": "Operation"
5289	//   },
5290	//   "scopes": [
5291	//     "https://www.googleapis.com/auth/cloud-platform",
5292	//     "https://www.googleapis.com/auth/sqlservice.admin"
5293	//   ]
5294	// }
5295
5296}
5297
5298// method id "sql.databases.update":
5299
5300type DatabasesUpdateCall struct {
5301	s          *Service
5302	project    string
5303	instance   string
5304	database   string
5305	database2  *Database
5306	urlParams_ gensupport.URLParams
5307	ctx_       context.Context
5308	header_    http.Header
5309}
5310
5311// Update: Updates a resource containing information about a database
5312// inside a Cloud
5313// SQL instance.
5314func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall {
5315	c := &DatabasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5316	c.project = project
5317	c.instance = instance
5318	c.database = database
5319	c.database2 = database2
5320	return c
5321}
5322
5323// Fields allows partial responses to be retrieved. See
5324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5325// for more information.
5326func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall {
5327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5328	return c
5329}
5330
5331// Context sets the context to be used in this call's Do method. Any
5332// pending HTTP request will be aborted if the provided context is
5333// canceled.
5334func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall {
5335	c.ctx_ = ctx
5336	return c
5337}
5338
5339// Header returns an http.Header that can be modified by the caller to
5340// add HTTP headers to the request.
5341func (c *DatabasesUpdateCall) Header() http.Header {
5342	if c.header_ == nil {
5343		c.header_ = make(http.Header)
5344	}
5345	return c.header_
5346}
5347
5348func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) {
5349	reqHeaders := make(http.Header)
5350	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5351	for k, v := range c.header_ {
5352		reqHeaders[k] = v
5353	}
5354	reqHeaders.Set("User-Agent", c.s.userAgent())
5355	var body io.Reader = nil
5356	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
5357	if err != nil {
5358		return nil, err
5359	}
5360	reqHeaders.Set("Content-Type", "application/json")
5361	c.urlParams_.Set("alt", alt)
5362	c.urlParams_.Set("prettyPrint", "false")
5363	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}")
5364	urls += "?" + c.urlParams_.Encode()
5365	req, err := http.NewRequest("PUT", urls, body)
5366	if err != nil {
5367		return nil, err
5368	}
5369	req.Header = reqHeaders
5370	googleapi.Expand(req.URL, map[string]string{
5371		"project":  c.project,
5372		"instance": c.instance,
5373		"database": c.database,
5374	})
5375	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5376}
5377
5378// Do executes the "sql.databases.update" call.
5379// Exactly one of *Operation or error will be non-nil. Any non-2xx
5380// status code is an error. Response headers are in either
5381// *Operation.ServerResponse.Header or (if a response was returned at
5382// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5383// to check whether the returned error was because
5384// http.StatusNotModified was returned.
5385func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5386	gensupport.SetOptions(c.urlParams_, opts...)
5387	res, err := c.doRequest("json")
5388	if res != nil && res.StatusCode == http.StatusNotModified {
5389		if res.Body != nil {
5390			res.Body.Close()
5391		}
5392		return nil, &googleapi.Error{
5393			Code:   res.StatusCode,
5394			Header: res.Header,
5395		}
5396	}
5397	if err != nil {
5398		return nil, err
5399	}
5400	defer googleapi.CloseBody(res)
5401	if err := googleapi.CheckResponse(res); err != nil {
5402		return nil, err
5403	}
5404	ret := &Operation{
5405		ServerResponse: googleapi.ServerResponse{
5406			Header:         res.Header,
5407			HTTPStatusCode: res.StatusCode,
5408		},
5409	}
5410	target := &ret
5411	if err := gensupport.DecodeResponse(target, res); err != nil {
5412		return nil, err
5413	}
5414	return ret, nil
5415	// {
5416	//   "description": "Updates a resource containing information about a database inside a Cloud\nSQL instance.",
5417	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
5418	//   "httpMethod": "PUT",
5419	//   "id": "sql.databases.update",
5420	//   "parameterOrder": [
5421	//     "project",
5422	//     "instance",
5423	//     "database"
5424	//   ],
5425	//   "parameters": {
5426	//     "database": {
5427	//       "description": "Name of the database to be updated in the instance.",
5428	//       "location": "path",
5429	//       "required": true,
5430	//       "type": "string"
5431	//     },
5432	//     "instance": {
5433	//       "description": "Database instance ID. This does not include the project ID.",
5434	//       "location": "path",
5435	//       "required": true,
5436	//       "type": "string"
5437	//     },
5438	//     "project": {
5439	//       "description": "Project ID of the project that contains the instance.",
5440	//       "location": "path",
5441	//       "required": true,
5442	//       "type": "string"
5443	//     }
5444	//   },
5445	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}",
5446	//   "request": {
5447	//     "$ref": "Database"
5448	//   },
5449	//   "response": {
5450	//     "$ref": "Operation"
5451	//   },
5452	//   "scopes": [
5453	//     "https://www.googleapis.com/auth/cloud-platform",
5454	//     "https://www.googleapis.com/auth/sqlservice.admin"
5455	//   ]
5456	// }
5457
5458}
5459
5460// method id "sql.flags.list":
5461
5462type FlagsListCall struct {
5463	s            *Service
5464	urlParams_   gensupport.URLParams
5465	ifNoneMatch_ string
5466	ctx_         context.Context
5467	header_      http.Header
5468}
5469
5470// List: List all available database flags for Cloud SQL instances.
5471func (r *FlagsService) List() *FlagsListCall {
5472	c := &FlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5473	return c
5474}
5475
5476// DatabaseVersion sets the optional parameter "databaseVersion":
5477// Database type and version you want to retrieve flags for. By default,
5478// this
5479// method returns flags for all database types and versions.
5480func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall {
5481	c.urlParams_.Set("databaseVersion", databaseVersion)
5482	return c
5483}
5484
5485// Fields allows partial responses to be retrieved. See
5486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5487// for more information.
5488func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall {
5489	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5490	return c
5491}
5492
5493// IfNoneMatch sets the optional parameter which makes the operation
5494// fail if the object's ETag matches the given value. This is useful for
5495// getting updates only after the object has changed since the last
5496// request. Use googleapi.IsNotModified to check whether the response
5497// error from Do is the result of In-None-Match.
5498func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall {
5499	c.ifNoneMatch_ = entityTag
5500	return c
5501}
5502
5503// Context sets the context to be used in this call's Do method. Any
5504// pending HTTP request will be aborted if the provided context is
5505// canceled.
5506func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall {
5507	c.ctx_ = ctx
5508	return c
5509}
5510
5511// Header returns an http.Header that can be modified by the caller to
5512// add HTTP headers to the request.
5513func (c *FlagsListCall) Header() http.Header {
5514	if c.header_ == nil {
5515		c.header_ = make(http.Header)
5516	}
5517	return c.header_
5518}
5519
5520func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) {
5521	reqHeaders := make(http.Header)
5522	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5523	for k, v := range c.header_ {
5524		reqHeaders[k] = v
5525	}
5526	reqHeaders.Set("User-Agent", c.s.userAgent())
5527	if c.ifNoneMatch_ != "" {
5528		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5529	}
5530	var body io.Reader = nil
5531	c.urlParams_.Set("alt", alt)
5532	c.urlParams_.Set("prettyPrint", "false")
5533	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/flags")
5534	urls += "?" + c.urlParams_.Encode()
5535	req, err := http.NewRequest("GET", urls, body)
5536	if err != nil {
5537		return nil, err
5538	}
5539	req.Header = reqHeaders
5540	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5541}
5542
5543// Do executes the "sql.flags.list" call.
5544// Exactly one of *FlagsListResponse or error will be non-nil. Any
5545// non-2xx status code is an error. Response headers are in either
5546// *FlagsListResponse.ServerResponse.Header or (if a response was
5547// returned at all) in error.(*googleapi.Error).Header. Use
5548// googleapi.IsNotModified to check whether the returned error was
5549// because http.StatusNotModified was returned.
5550func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error) {
5551	gensupport.SetOptions(c.urlParams_, opts...)
5552	res, err := c.doRequest("json")
5553	if res != nil && res.StatusCode == http.StatusNotModified {
5554		if res.Body != nil {
5555			res.Body.Close()
5556		}
5557		return nil, &googleapi.Error{
5558			Code:   res.StatusCode,
5559			Header: res.Header,
5560		}
5561	}
5562	if err != nil {
5563		return nil, err
5564	}
5565	defer googleapi.CloseBody(res)
5566	if err := googleapi.CheckResponse(res); err != nil {
5567		return nil, err
5568	}
5569	ret := &FlagsListResponse{
5570		ServerResponse: googleapi.ServerResponse{
5571			Header:         res.Header,
5572			HTTPStatusCode: res.StatusCode,
5573		},
5574	}
5575	target := &ret
5576	if err := gensupport.DecodeResponse(target, res); err != nil {
5577		return nil, err
5578	}
5579	return ret, nil
5580	// {
5581	//   "description": "List all available database flags for Cloud SQL instances.",
5582	//   "flatPath": "sql/v1beta4/flags",
5583	//   "httpMethod": "GET",
5584	//   "id": "sql.flags.list",
5585	//   "parameterOrder": [],
5586	//   "parameters": {
5587	//     "databaseVersion": {
5588	//       "description": "Database type and version you want to retrieve flags for. By default, this\nmethod returns flags for all database types and versions.",
5589	//       "location": "query",
5590	//       "type": "string"
5591	//     }
5592	//   },
5593	//   "path": "sql/v1beta4/flags",
5594	//   "response": {
5595	//     "$ref": "FlagsListResponse"
5596	//   },
5597	//   "scopes": [
5598	//     "https://www.googleapis.com/auth/cloud-platform",
5599	//     "https://www.googleapis.com/auth/sqlservice.admin"
5600	//   ]
5601	// }
5602
5603}
5604
5605// method id "sql.instances.addServerCa":
5606
5607type InstancesAddServerCaCall struct {
5608	s          *Service
5609	project    string
5610	instance   string
5611	urlParams_ gensupport.URLParams
5612	ctx_       context.Context
5613	header_    http.Header
5614}
5615
5616// AddServerCa: Add a new trusted Certificate Authority (CA) version for
5617// the specified
5618// instance. Required to prepare for a certificate rotation. If a CA
5619// version
5620// was previously added but never used in a certificate rotation,
5621// this
5622// operation replaces that version. There cannot be more than one CA
5623// version
5624// waiting to be rotated in.
5625func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall {
5626	c := &InstancesAddServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5627	c.project = project
5628	c.instance = instance
5629	return c
5630}
5631
5632// Fields allows partial responses to be retrieved. See
5633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5634// for more information.
5635func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall {
5636	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5637	return c
5638}
5639
5640// Context sets the context to be used in this call's Do method. Any
5641// pending HTTP request will be aborted if the provided context is
5642// canceled.
5643func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall {
5644	c.ctx_ = ctx
5645	return c
5646}
5647
5648// Header returns an http.Header that can be modified by the caller to
5649// add HTTP headers to the request.
5650func (c *InstancesAddServerCaCall) Header() http.Header {
5651	if c.header_ == nil {
5652		c.header_ = make(http.Header)
5653	}
5654	return c.header_
5655}
5656
5657func (c *InstancesAddServerCaCall) doRequest(alt string) (*http.Response, error) {
5658	reqHeaders := make(http.Header)
5659	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5660	for k, v := range c.header_ {
5661		reqHeaders[k] = v
5662	}
5663	reqHeaders.Set("User-Agent", c.s.userAgent())
5664	var body io.Reader = nil
5665	c.urlParams_.Set("alt", alt)
5666	c.urlParams_.Set("prettyPrint", "false")
5667	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa")
5668	urls += "?" + c.urlParams_.Encode()
5669	req, err := http.NewRequest("POST", urls, body)
5670	if err != nil {
5671		return nil, err
5672	}
5673	req.Header = reqHeaders
5674	googleapi.Expand(req.URL, map[string]string{
5675		"project":  c.project,
5676		"instance": c.instance,
5677	})
5678	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5679}
5680
5681// Do executes the "sql.instances.addServerCa" call.
5682// Exactly one of *Operation or error will be non-nil. Any non-2xx
5683// status code is an error. Response headers are in either
5684// *Operation.ServerResponse.Header or (if a response was returned at
5685// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5686// to check whether the returned error was because
5687// http.StatusNotModified was returned.
5688func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5689	gensupport.SetOptions(c.urlParams_, opts...)
5690	res, err := c.doRequest("json")
5691	if res != nil && res.StatusCode == http.StatusNotModified {
5692		if res.Body != nil {
5693			res.Body.Close()
5694		}
5695		return nil, &googleapi.Error{
5696			Code:   res.StatusCode,
5697			Header: res.Header,
5698		}
5699	}
5700	if err != nil {
5701		return nil, err
5702	}
5703	defer googleapi.CloseBody(res)
5704	if err := googleapi.CheckResponse(res); err != nil {
5705		return nil, err
5706	}
5707	ret := &Operation{
5708		ServerResponse: googleapi.ServerResponse{
5709			Header:         res.Header,
5710			HTTPStatusCode: res.StatusCode,
5711		},
5712	}
5713	target := &ret
5714	if err := gensupport.DecodeResponse(target, res); err != nil {
5715		return nil, err
5716	}
5717	return ret, nil
5718	// {
5719	//   "description": "Add a new trusted Certificate Authority (CA) version for the specified\ninstance. Required to prepare for a certificate rotation. If a CA version\nwas previously added but never used in a certificate rotation, this\noperation replaces that version. There cannot be more than one CA version\nwaiting to be rotated in.",
5720	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa",
5721	//   "httpMethod": "POST",
5722	//   "id": "sql.instances.addServerCa",
5723	//   "parameterOrder": [
5724	//     "project",
5725	//     "instance"
5726	//   ],
5727	//   "parameters": {
5728	//     "instance": {
5729	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
5730	//       "location": "path",
5731	//       "required": true,
5732	//       "type": "string"
5733	//     },
5734	//     "project": {
5735	//       "description": "Project ID of the project that contains the instance.",
5736	//       "location": "path",
5737	//       "required": true,
5738	//       "type": "string"
5739	//     }
5740	//   },
5741	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa",
5742	//   "response": {
5743	//     "$ref": "Operation"
5744	//   },
5745	//   "scopes": [
5746	//     "https://www.googleapis.com/auth/cloud-platform",
5747	//     "https://www.googleapis.com/auth/sqlservice.admin"
5748	//   ]
5749	// }
5750
5751}
5752
5753// method id "sql.instances.clone":
5754
5755type InstancesCloneCall struct {
5756	s                     *Service
5757	project               string
5758	instance              string
5759	instancesclonerequest *InstancesCloneRequest
5760	urlParams_            gensupport.URLParams
5761	ctx_                  context.Context
5762	header_               http.Header
5763}
5764
5765// Clone: Creates a Cloud SQL instance as a clone of the source
5766// instance. Using this
5767// operation might cause your instance to restart.
5768func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall {
5769	c := &InstancesCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5770	c.project = project
5771	c.instance = instance
5772	c.instancesclonerequest = instancesclonerequest
5773	return c
5774}
5775
5776// Fields allows partial responses to be retrieved. See
5777// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5778// for more information.
5779func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall {
5780	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5781	return c
5782}
5783
5784// Context sets the context to be used in this call's Do method. Any
5785// pending HTTP request will be aborted if the provided context is
5786// canceled.
5787func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall {
5788	c.ctx_ = ctx
5789	return c
5790}
5791
5792// Header returns an http.Header that can be modified by the caller to
5793// add HTTP headers to the request.
5794func (c *InstancesCloneCall) Header() http.Header {
5795	if c.header_ == nil {
5796		c.header_ = make(http.Header)
5797	}
5798	return c.header_
5799}
5800
5801func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) {
5802	reqHeaders := make(http.Header)
5803	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5804	for k, v := range c.header_ {
5805		reqHeaders[k] = v
5806	}
5807	reqHeaders.Set("User-Agent", c.s.userAgent())
5808	var body io.Reader = nil
5809	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest)
5810	if err != nil {
5811		return nil, err
5812	}
5813	reqHeaders.Set("Content-Type", "application/json")
5814	c.urlParams_.Set("alt", alt)
5815	c.urlParams_.Set("prettyPrint", "false")
5816	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/clone")
5817	urls += "?" + c.urlParams_.Encode()
5818	req, err := http.NewRequest("POST", urls, body)
5819	if err != nil {
5820		return nil, err
5821	}
5822	req.Header = reqHeaders
5823	googleapi.Expand(req.URL, map[string]string{
5824		"project":  c.project,
5825		"instance": c.instance,
5826	})
5827	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5828}
5829
5830// Do executes the "sql.instances.clone" call.
5831// Exactly one of *Operation or error will be non-nil. Any non-2xx
5832// status code is an error. Response headers are in either
5833// *Operation.ServerResponse.Header or (if a response was returned at
5834// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5835// to check whether the returned error was because
5836// http.StatusNotModified was returned.
5837func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5838	gensupport.SetOptions(c.urlParams_, opts...)
5839	res, err := c.doRequest("json")
5840	if res != nil && res.StatusCode == http.StatusNotModified {
5841		if res.Body != nil {
5842			res.Body.Close()
5843		}
5844		return nil, &googleapi.Error{
5845			Code:   res.StatusCode,
5846			Header: res.Header,
5847		}
5848	}
5849	if err != nil {
5850		return nil, err
5851	}
5852	defer googleapi.CloseBody(res)
5853	if err := googleapi.CheckResponse(res); err != nil {
5854		return nil, err
5855	}
5856	ret := &Operation{
5857		ServerResponse: googleapi.ServerResponse{
5858			Header:         res.Header,
5859			HTTPStatusCode: res.StatusCode,
5860		},
5861	}
5862	target := &ret
5863	if err := gensupport.DecodeResponse(target, res); err != nil {
5864		return nil, err
5865	}
5866	return ret, nil
5867	// {
5868	//   "description": "Creates a Cloud SQL instance as a clone of the source instance. Using this\noperation might cause your instance to restart.",
5869	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/clone",
5870	//   "httpMethod": "POST",
5871	//   "id": "sql.instances.clone",
5872	//   "parameterOrder": [
5873	//     "project",
5874	//     "instance"
5875	//   ],
5876	//   "parameters": {
5877	//     "instance": {
5878	//       "description": "The ID of the Cloud SQL instance to be cloned (source). This does not\ninclude the project ID.",
5879	//       "location": "path",
5880	//       "required": true,
5881	//       "type": "string"
5882	//     },
5883	//     "project": {
5884	//       "description": "Project ID of the source as well as the clone Cloud SQL instance.",
5885	//       "location": "path",
5886	//       "required": true,
5887	//       "type": "string"
5888	//     }
5889	//   },
5890	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/clone",
5891	//   "request": {
5892	//     "$ref": "InstancesCloneRequest"
5893	//   },
5894	//   "response": {
5895	//     "$ref": "Operation"
5896	//   },
5897	//   "scopes": [
5898	//     "https://www.googleapis.com/auth/cloud-platform",
5899	//     "https://www.googleapis.com/auth/sqlservice.admin"
5900	//   ]
5901	// }
5902
5903}
5904
5905// method id "sql.instances.delete":
5906
5907type InstancesDeleteCall struct {
5908	s          *Service
5909	project    string
5910	instance   string
5911	urlParams_ gensupport.URLParams
5912	ctx_       context.Context
5913	header_    http.Header
5914}
5915
5916// Delete: Deletes a Cloud SQL instance.
5917func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall {
5918	c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5919	c.project = project
5920	c.instance = instance
5921	return c
5922}
5923
5924// Fields allows partial responses to be retrieved. See
5925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5926// for more information.
5927func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
5928	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5929	return c
5930}
5931
5932// Context sets the context to be used in this call's Do method. Any
5933// pending HTTP request will be aborted if the provided context is
5934// canceled.
5935func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
5936	c.ctx_ = ctx
5937	return c
5938}
5939
5940// Header returns an http.Header that can be modified by the caller to
5941// add HTTP headers to the request.
5942func (c *InstancesDeleteCall) Header() http.Header {
5943	if c.header_ == nil {
5944		c.header_ = make(http.Header)
5945	}
5946	return c.header_
5947}
5948
5949func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
5950	reqHeaders := make(http.Header)
5951	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5952	for k, v := range c.header_ {
5953		reqHeaders[k] = v
5954	}
5955	reqHeaders.Set("User-Agent", c.s.userAgent())
5956	var body io.Reader = nil
5957	c.urlParams_.Set("alt", alt)
5958	c.urlParams_.Set("prettyPrint", "false")
5959	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}")
5960	urls += "?" + c.urlParams_.Encode()
5961	req, err := http.NewRequest("DELETE", urls, body)
5962	if err != nil {
5963		return nil, err
5964	}
5965	req.Header = reqHeaders
5966	googleapi.Expand(req.URL, map[string]string{
5967		"project":  c.project,
5968		"instance": c.instance,
5969	})
5970	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5971}
5972
5973// Do executes the "sql.instances.delete" call.
5974// Exactly one of *Operation or error will be non-nil. Any non-2xx
5975// status code is an error. Response headers are in either
5976// *Operation.ServerResponse.Header or (if a response was returned at
5977// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5978// to check whether the returned error was because
5979// http.StatusNotModified was returned.
5980func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5981	gensupport.SetOptions(c.urlParams_, opts...)
5982	res, err := c.doRequest("json")
5983	if res != nil && res.StatusCode == http.StatusNotModified {
5984		if res.Body != nil {
5985			res.Body.Close()
5986		}
5987		return nil, &googleapi.Error{
5988			Code:   res.StatusCode,
5989			Header: res.Header,
5990		}
5991	}
5992	if err != nil {
5993		return nil, err
5994	}
5995	defer googleapi.CloseBody(res)
5996	if err := googleapi.CheckResponse(res); err != nil {
5997		return nil, err
5998	}
5999	ret := &Operation{
6000		ServerResponse: googleapi.ServerResponse{
6001			Header:         res.Header,
6002			HTTPStatusCode: res.StatusCode,
6003		},
6004	}
6005	target := &ret
6006	if err := gensupport.DecodeResponse(target, res); err != nil {
6007		return nil, err
6008	}
6009	return ret, nil
6010	// {
6011	//   "description": "Deletes a Cloud SQL instance.",
6012	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}",
6013	//   "httpMethod": "DELETE",
6014	//   "id": "sql.instances.delete",
6015	//   "parameterOrder": [
6016	//     "project",
6017	//     "instance"
6018	//   ],
6019	//   "parameters": {
6020	//     "instance": {
6021	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6022	//       "location": "path",
6023	//       "required": true,
6024	//       "type": "string"
6025	//     },
6026	//     "project": {
6027	//       "description": "Project ID of the project that contains the instance to be deleted.",
6028	//       "location": "path",
6029	//       "required": true,
6030	//       "type": "string"
6031	//     }
6032	//   },
6033	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}",
6034	//   "response": {
6035	//     "$ref": "Operation"
6036	//   },
6037	//   "scopes": [
6038	//     "https://www.googleapis.com/auth/cloud-platform",
6039	//     "https://www.googleapis.com/auth/sqlservice.admin"
6040	//   ]
6041	// }
6042
6043}
6044
6045// method id "sql.instances.demoteMaster":
6046
6047type InstancesDemoteMasterCall struct {
6048	s                            *Service
6049	project                      string
6050	instance                     string
6051	instancesdemotemasterrequest *InstancesDemoteMasterRequest
6052	urlParams_                   gensupport.URLParams
6053	ctx_                         context.Context
6054	header_                      http.Header
6055}
6056
6057// DemoteMaster: Demotes the stand-alone instance to be a Cloud SQL read
6058// replica for an
6059// external database server.
6060func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall {
6061	c := &InstancesDemoteMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6062	c.project = project
6063	c.instance = instance
6064	c.instancesdemotemasterrequest = instancesdemotemasterrequest
6065	return c
6066}
6067
6068// Fields allows partial responses to be retrieved. See
6069// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6070// for more information.
6071func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall {
6072	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6073	return c
6074}
6075
6076// Context sets the context to be used in this call's Do method. Any
6077// pending HTTP request will be aborted if the provided context is
6078// canceled.
6079func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall {
6080	c.ctx_ = ctx
6081	return c
6082}
6083
6084// Header returns an http.Header that can be modified by the caller to
6085// add HTTP headers to the request.
6086func (c *InstancesDemoteMasterCall) Header() http.Header {
6087	if c.header_ == nil {
6088		c.header_ = make(http.Header)
6089	}
6090	return c.header_
6091}
6092
6093func (c *InstancesDemoteMasterCall) doRequest(alt string) (*http.Response, error) {
6094	reqHeaders := make(http.Header)
6095	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6096	for k, v := range c.header_ {
6097		reqHeaders[k] = v
6098	}
6099	reqHeaders.Set("User-Agent", c.s.userAgent())
6100	var body io.Reader = nil
6101	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesdemotemasterrequest)
6102	if err != nil {
6103		return nil, err
6104	}
6105	reqHeaders.Set("Content-Type", "application/json")
6106	c.urlParams_.Set("alt", alt)
6107	c.urlParams_.Set("prettyPrint", "false")
6108	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster")
6109	urls += "?" + c.urlParams_.Encode()
6110	req, err := http.NewRequest("POST", urls, body)
6111	if err != nil {
6112		return nil, err
6113	}
6114	req.Header = reqHeaders
6115	googleapi.Expand(req.URL, map[string]string{
6116		"project":  c.project,
6117		"instance": c.instance,
6118	})
6119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6120}
6121
6122// Do executes the "sql.instances.demoteMaster" call.
6123// Exactly one of *Operation or error will be non-nil. Any non-2xx
6124// status code is an error. Response headers are in either
6125// *Operation.ServerResponse.Header or (if a response was returned at
6126// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6127// to check whether the returned error was because
6128// http.StatusNotModified was returned.
6129func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6130	gensupport.SetOptions(c.urlParams_, opts...)
6131	res, err := c.doRequest("json")
6132	if res != nil && res.StatusCode == http.StatusNotModified {
6133		if res.Body != nil {
6134			res.Body.Close()
6135		}
6136		return nil, &googleapi.Error{
6137			Code:   res.StatusCode,
6138			Header: res.Header,
6139		}
6140	}
6141	if err != nil {
6142		return nil, err
6143	}
6144	defer googleapi.CloseBody(res)
6145	if err := googleapi.CheckResponse(res); err != nil {
6146		return nil, err
6147	}
6148	ret := &Operation{
6149		ServerResponse: googleapi.ServerResponse{
6150			Header:         res.Header,
6151			HTTPStatusCode: res.StatusCode,
6152		},
6153	}
6154	target := &ret
6155	if err := gensupport.DecodeResponse(target, res); err != nil {
6156		return nil, err
6157	}
6158	return ret, nil
6159	// {
6160	//   "description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an\nexternal database server.",
6161	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster",
6162	//   "httpMethod": "POST",
6163	//   "id": "sql.instances.demoteMaster",
6164	//   "parameterOrder": [
6165	//     "project",
6166	//     "instance"
6167	//   ],
6168	//   "parameters": {
6169	//     "instance": {
6170	//       "description": "Cloud SQL instance name.",
6171	//       "location": "path",
6172	//       "required": true,
6173	//       "type": "string"
6174	//     },
6175	//     "project": {
6176	//       "description": "ID of the project that contains the instance.",
6177	//       "location": "path",
6178	//       "required": true,
6179	//       "type": "string"
6180	//     }
6181	//   },
6182	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster",
6183	//   "request": {
6184	//     "$ref": "InstancesDemoteMasterRequest"
6185	//   },
6186	//   "response": {
6187	//     "$ref": "Operation"
6188	//   },
6189	//   "scopes": [
6190	//     "https://www.googleapis.com/auth/cloud-platform",
6191	//     "https://www.googleapis.com/auth/sqlservice.admin"
6192	//   ]
6193	// }
6194
6195}
6196
6197// method id "sql.instances.export":
6198
6199type InstancesExportCall struct {
6200	s                      *Service
6201	project                string
6202	instance               string
6203	instancesexportrequest *InstancesExportRequest
6204	urlParams_             gensupport.URLParams
6205	ctx_                   context.Context
6206	header_                http.Header
6207}
6208
6209// Export: Exports data from a Cloud SQL instance to a Cloud Storage
6210// bucket as a SQL
6211// dump or CSV file.
6212func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall {
6213	c := &InstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6214	c.project = project
6215	c.instance = instance
6216	c.instancesexportrequest = instancesexportrequest
6217	return c
6218}
6219
6220// Fields allows partial responses to be retrieved. See
6221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6222// for more information.
6223func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall {
6224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6225	return c
6226}
6227
6228// Context sets the context to be used in this call's Do method. Any
6229// pending HTTP request will be aborted if the provided context is
6230// canceled.
6231func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall {
6232	c.ctx_ = ctx
6233	return c
6234}
6235
6236// Header returns an http.Header that can be modified by the caller to
6237// add HTTP headers to the request.
6238func (c *InstancesExportCall) Header() http.Header {
6239	if c.header_ == nil {
6240		c.header_ = make(http.Header)
6241	}
6242	return c.header_
6243}
6244
6245func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) {
6246	reqHeaders := make(http.Header)
6247	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6248	for k, v := range c.header_ {
6249		reqHeaders[k] = v
6250	}
6251	reqHeaders.Set("User-Agent", c.s.userAgent())
6252	var body io.Reader = nil
6253	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest)
6254	if err != nil {
6255		return nil, err
6256	}
6257	reqHeaders.Set("Content-Type", "application/json")
6258	c.urlParams_.Set("alt", alt)
6259	c.urlParams_.Set("prettyPrint", "false")
6260	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/export")
6261	urls += "?" + c.urlParams_.Encode()
6262	req, err := http.NewRequest("POST", urls, body)
6263	if err != nil {
6264		return nil, err
6265	}
6266	req.Header = reqHeaders
6267	googleapi.Expand(req.URL, map[string]string{
6268		"project":  c.project,
6269		"instance": c.instance,
6270	})
6271	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6272}
6273
6274// Do executes the "sql.instances.export" call.
6275// Exactly one of *Operation or error will be non-nil. Any non-2xx
6276// status code is an error. Response headers are in either
6277// *Operation.ServerResponse.Header or (if a response was returned at
6278// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6279// to check whether the returned error was because
6280// http.StatusNotModified was returned.
6281func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6282	gensupport.SetOptions(c.urlParams_, opts...)
6283	res, err := c.doRequest("json")
6284	if res != nil && res.StatusCode == http.StatusNotModified {
6285		if res.Body != nil {
6286			res.Body.Close()
6287		}
6288		return nil, &googleapi.Error{
6289			Code:   res.StatusCode,
6290			Header: res.Header,
6291		}
6292	}
6293	if err != nil {
6294		return nil, err
6295	}
6296	defer googleapi.CloseBody(res)
6297	if err := googleapi.CheckResponse(res); err != nil {
6298		return nil, err
6299	}
6300	ret := &Operation{
6301		ServerResponse: googleapi.ServerResponse{
6302			Header:         res.Header,
6303			HTTPStatusCode: res.StatusCode,
6304		},
6305	}
6306	target := &ret
6307	if err := gensupport.DecodeResponse(target, res); err != nil {
6308		return nil, err
6309	}
6310	return ret, nil
6311	// {
6312	//   "description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL\ndump or CSV file.",
6313	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/export",
6314	//   "httpMethod": "POST",
6315	//   "id": "sql.instances.export",
6316	//   "parameterOrder": [
6317	//     "project",
6318	//     "instance"
6319	//   ],
6320	//   "parameters": {
6321	//     "instance": {
6322	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6323	//       "location": "path",
6324	//       "required": true,
6325	//       "type": "string"
6326	//     },
6327	//     "project": {
6328	//       "description": "Project ID of the project that contains the instance to be exported.",
6329	//       "location": "path",
6330	//       "required": true,
6331	//       "type": "string"
6332	//     }
6333	//   },
6334	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/export",
6335	//   "request": {
6336	//     "$ref": "InstancesExportRequest"
6337	//   },
6338	//   "response": {
6339	//     "$ref": "Operation"
6340	//   },
6341	//   "scopes": [
6342	//     "https://www.googleapis.com/auth/cloud-platform"
6343	//   ]
6344	// }
6345
6346}
6347
6348// method id "sql.instances.failover":
6349
6350type InstancesFailoverCall struct {
6351	s                        *Service
6352	project                  string
6353	instance                 string
6354	instancesfailoverrequest *InstancesFailoverRequest
6355	urlParams_               gensupport.URLParams
6356	ctx_                     context.Context
6357	header_                  http.Header
6358}
6359
6360// Failover: Failover the instance to its failover replica instance.
6361// Using this
6362// operation might cause your instance to restart.
6363func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall {
6364	c := &InstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6365	c.project = project
6366	c.instance = instance
6367	c.instancesfailoverrequest = instancesfailoverrequest
6368	return c
6369}
6370
6371// Fields allows partial responses to be retrieved. See
6372// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6373// for more information.
6374func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall {
6375	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6376	return c
6377}
6378
6379// Context sets the context to be used in this call's Do method. Any
6380// pending HTTP request will be aborted if the provided context is
6381// canceled.
6382func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall {
6383	c.ctx_ = ctx
6384	return c
6385}
6386
6387// Header returns an http.Header that can be modified by the caller to
6388// add HTTP headers to the request.
6389func (c *InstancesFailoverCall) Header() http.Header {
6390	if c.header_ == nil {
6391		c.header_ = make(http.Header)
6392	}
6393	return c.header_
6394}
6395
6396func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) {
6397	reqHeaders := make(http.Header)
6398	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6399	for k, v := range c.header_ {
6400		reqHeaders[k] = v
6401	}
6402	reqHeaders.Set("User-Agent", c.s.userAgent())
6403	var body io.Reader = nil
6404	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesfailoverrequest)
6405	if err != nil {
6406		return nil, err
6407	}
6408	reqHeaders.Set("Content-Type", "application/json")
6409	c.urlParams_.Set("alt", alt)
6410	c.urlParams_.Set("prettyPrint", "false")
6411	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/failover")
6412	urls += "?" + c.urlParams_.Encode()
6413	req, err := http.NewRequest("POST", urls, body)
6414	if err != nil {
6415		return nil, err
6416	}
6417	req.Header = reqHeaders
6418	googleapi.Expand(req.URL, map[string]string{
6419		"project":  c.project,
6420		"instance": c.instance,
6421	})
6422	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6423}
6424
6425// Do executes the "sql.instances.failover" call.
6426// Exactly one of *Operation or error will be non-nil. Any non-2xx
6427// status code is an error. Response headers are in either
6428// *Operation.ServerResponse.Header or (if a response was returned at
6429// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6430// to check whether the returned error was because
6431// http.StatusNotModified was returned.
6432func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6433	gensupport.SetOptions(c.urlParams_, opts...)
6434	res, err := c.doRequest("json")
6435	if res != nil && res.StatusCode == http.StatusNotModified {
6436		if res.Body != nil {
6437			res.Body.Close()
6438		}
6439		return nil, &googleapi.Error{
6440			Code:   res.StatusCode,
6441			Header: res.Header,
6442		}
6443	}
6444	if err != nil {
6445		return nil, err
6446	}
6447	defer googleapi.CloseBody(res)
6448	if err := googleapi.CheckResponse(res); err != nil {
6449		return nil, err
6450	}
6451	ret := &Operation{
6452		ServerResponse: googleapi.ServerResponse{
6453			Header:         res.Header,
6454			HTTPStatusCode: res.StatusCode,
6455		},
6456	}
6457	target := &ret
6458	if err := gensupport.DecodeResponse(target, res); err != nil {
6459		return nil, err
6460	}
6461	return ret, nil
6462	// {
6463	//   "description": "Failover the instance to its failover replica instance. Using this\noperation might cause your instance to restart.",
6464	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/failover",
6465	//   "httpMethod": "POST",
6466	//   "id": "sql.instances.failover",
6467	//   "parameterOrder": [
6468	//     "project",
6469	//     "instance"
6470	//   ],
6471	//   "parameters": {
6472	//     "instance": {
6473	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6474	//       "location": "path",
6475	//       "required": true,
6476	//       "type": "string"
6477	//     },
6478	//     "project": {
6479	//       "description": "ID of the project that contains the read replica.",
6480	//       "location": "path",
6481	//       "required": true,
6482	//       "type": "string"
6483	//     }
6484	//   },
6485	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/failover",
6486	//   "request": {
6487	//     "$ref": "InstancesFailoverRequest"
6488	//   },
6489	//   "response": {
6490	//     "$ref": "Operation"
6491	//   },
6492	//   "scopes": [
6493	//     "https://www.googleapis.com/auth/cloud-platform",
6494	//     "https://www.googleapis.com/auth/sqlservice.admin"
6495	//   ]
6496	// }
6497
6498}
6499
6500// method id "sql.instances.get":
6501
6502type InstancesGetCall struct {
6503	s            *Service
6504	project      string
6505	instance     string
6506	urlParams_   gensupport.URLParams
6507	ifNoneMatch_ string
6508	ctx_         context.Context
6509	header_      http.Header
6510}
6511
6512// Get: Retrieves a resource containing information about a Cloud SQL
6513// instance.
6514func (r *InstancesService) Get(project string, instance string) *InstancesGetCall {
6515	c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6516	c.project = project
6517	c.instance = instance
6518	return c
6519}
6520
6521// Fields allows partial responses to be retrieved. See
6522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6523// for more information.
6524func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
6525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6526	return c
6527}
6528
6529// IfNoneMatch sets the optional parameter which makes the operation
6530// fail if the object's ETag matches the given value. This is useful for
6531// getting updates only after the object has changed since the last
6532// request. Use googleapi.IsNotModified to check whether the response
6533// error from Do is the result of In-None-Match.
6534func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
6535	c.ifNoneMatch_ = entityTag
6536	return c
6537}
6538
6539// Context sets the context to be used in this call's Do method. Any
6540// pending HTTP request will be aborted if the provided context is
6541// canceled.
6542func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
6543	c.ctx_ = ctx
6544	return c
6545}
6546
6547// Header returns an http.Header that can be modified by the caller to
6548// add HTTP headers to the request.
6549func (c *InstancesGetCall) Header() http.Header {
6550	if c.header_ == nil {
6551		c.header_ = make(http.Header)
6552	}
6553	return c.header_
6554}
6555
6556func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
6557	reqHeaders := make(http.Header)
6558	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6559	for k, v := range c.header_ {
6560		reqHeaders[k] = v
6561	}
6562	reqHeaders.Set("User-Agent", c.s.userAgent())
6563	if c.ifNoneMatch_ != "" {
6564		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6565	}
6566	var body io.Reader = nil
6567	c.urlParams_.Set("alt", alt)
6568	c.urlParams_.Set("prettyPrint", "false")
6569	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}")
6570	urls += "?" + c.urlParams_.Encode()
6571	req, err := http.NewRequest("GET", urls, body)
6572	if err != nil {
6573		return nil, err
6574	}
6575	req.Header = reqHeaders
6576	googleapi.Expand(req.URL, map[string]string{
6577		"project":  c.project,
6578		"instance": c.instance,
6579	})
6580	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6581}
6582
6583// Do executes the "sql.instances.get" call.
6584// Exactly one of *DatabaseInstance or error will be non-nil. Any
6585// non-2xx status code is an error. Response headers are in either
6586// *DatabaseInstance.ServerResponse.Header or (if a response was
6587// returned at all) in error.(*googleapi.Error).Header. Use
6588// googleapi.IsNotModified to check whether the returned error was
6589// because http.StatusNotModified was returned.
6590func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error) {
6591	gensupport.SetOptions(c.urlParams_, opts...)
6592	res, err := c.doRequest("json")
6593	if res != nil && res.StatusCode == http.StatusNotModified {
6594		if res.Body != nil {
6595			res.Body.Close()
6596		}
6597		return nil, &googleapi.Error{
6598			Code:   res.StatusCode,
6599			Header: res.Header,
6600		}
6601	}
6602	if err != nil {
6603		return nil, err
6604	}
6605	defer googleapi.CloseBody(res)
6606	if err := googleapi.CheckResponse(res); err != nil {
6607		return nil, err
6608	}
6609	ret := &DatabaseInstance{
6610		ServerResponse: googleapi.ServerResponse{
6611			Header:         res.Header,
6612			HTTPStatusCode: res.StatusCode,
6613		},
6614	}
6615	target := &ret
6616	if err := gensupport.DecodeResponse(target, res); err != nil {
6617		return nil, err
6618	}
6619	return ret, nil
6620	// {
6621	//   "description": "Retrieves a resource containing information about a Cloud SQL instance.",
6622	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}",
6623	//   "httpMethod": "GET",
6624	//   "id": "sql.instances.get",
6625	//   "parameterOrder": [
6626	//     "project",
6627	//     "instance"
6628	//   ],
6629	//   "parameters": {
6630	//     "instance": {
6631	//       "description": "Database instance ID. This does not include the project ID.",
6632	//       "location": "path",
6633	//       "required": true,
6634	//       "type": "string"
6635	//     },
6636	//     "project": {
6637	//       "description": "Project ID of the project that contains the instance.",
6638	//       "location": "path",
6639	//       "required": true,
6640	//       "type": "string"
6641	//     }
6642	//   },
6643	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}",
6644	//   "response": {
6645	//     "$ref": "DatabaseInstance"
6646	//   },
6647	//   "scopes": [
6648	//     "https://www.googleapis.com/auth/cloud-platform",
6649	//     "https://www.googleapis.com/auth/sqlservice.admin"
6650	//   ]
6651	// }
6652
6653}
6654
6655// method id "sql.instances.import":
6656
6657type InstancesImportCall struct {
6658	s                      *Service
6659	project                string
6660	instance               string
6661	instancesimportrequest *InstancesImportRequest
6662	urlParams_             gensupport.URLParams
6663	ctx_                   context.Context
6664	header_                http.Header
6665}
6666
6667// Import: Imports data into a Cloud SQL instance from a SQL dump  or
6668// CSV file in
6669// Cloud Storage.
6670func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall {
6671	c := &InstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6672	c.project = project
6673	c.instance = instance
6674	c.instancesimportrequest = instancesimportrequest
6675	return c
6676}
6677
6678// Fields allows partial responses to be retrieved. See
6679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6680// for more information.
6681func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall {
6682	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6683	return c
6684}
6685
6686// Context sets the context to be used in this call's Do method. Any
6687// pending HTTP request will be aborted if the provided context is
6688// canceled.
6689func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall {
6690	c.ctx_ = ctx
6691	return c
6692}
6693
6694// Header returns an http.Header that can be modified by the caller to
6695// add HTTP headers to the request.
6696func (c *InstancesImportCall) Header() http.Header {
6697	if c.header_ == nil {
6698		c.header_ = make(http.Header)
6699	}
6700	return c.header_
6701}
6702
6703func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) {
6704	reqHeaders := make(http.Header)
6705	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6706	for k, v := range c.header_ {
6707		reqHeaders[k] = v
6708	}
6709	reqHeaders.Set("User-Agent", c.s.userAgent())
6710	var body io.Reader = nil
6711	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest)
6712	if err != nil {
6713		return nil, err
6714	}
6715	reqHeaders.Set("Content-Type", "application/json")
6716	c.urlParams_.Set("alt", alt)
6717	c.urlParams_.Set("prettyPrint", "false")
6718	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/import")
6719	urls += "?" + c.urlParams_.Encode()
6720	req, err := http.NewRequest("POST", urls, body)
6721	if err != nil {
6722		return nil, err
6723	}
6724	req.Header = reqHeaders
6725	googleapi.Expand(req.URL, map[string]string{
6726		"project":  c.project,
6727		"instance": c.instance,
6728	})
6729	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6730}
6731
6732// Do executes the "sql.instances.import" call.
6733// Exactly one of *Operation or error will be non-nil. Any non-2xx
6734// status code is an error. Response headers are in either
6735// *Operation.ServerResponse.Header or (if a response was returned at
6736// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6737// to check whether the returned error was because
6738// http.StatusNotModified was returned.
6739func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6740	gensupport.SetOptions(c.urlParams_, opts...)
6741	res, err := c.doRequest("json")
6742	if res != nil && res.StatusCode == http.StatusNotModified {
6743		if res.Body != nil {
6744			res.Body.Close()
6745		}
6746		return nil, &googleapi.Error{
6747			Code:   res.StatusCode,
6748			Header: res.Header,
6749		}
6750	}
6751	if err != nil {
6752		return nil, err
6753	}
6754	defer googleapi.CloseBody(res)
6755	if err := googleapi.CheckResponse(res); err != nil {
6756		return nil, err
6757	}
6758	ret := &Operation{
6759		ServerResponse: googleapi.ServerResponse{
6760			Header:         res.Header,
6761			HTTPStatusCode: res.StatusCode,
6762		},
6763	}
6764	target := &ret
6765	if err := gensupport.DecodeResponse(target, res); err != nil {
6766		return nil, err
6767	}
6768	return ret, nil
6769	// {
6770	//   "description": "Imports data into a Cloud SQL instance from a SQL dump  or CSV file in\nCloud Storage.",
6771	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/import",
6772	//   "httpMethod": "POST",
6773	//   "id": "sql.instances.import",
6774	//   "parameterOrder": [
6775	//     "project",
6776	//     "instance"
6777	//   ],
6778	//   "parameters": {
6779	//     "instance": {
6780	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6781	//       "location": "path",
6782	//       "required": true,
6783	//       "type": "string"
6784	//     },
6785	//     "project": {
6786	//       "description": "Project ID of the project that contains the instance.",
6787	//       "location": "path",
6788	//       "required": true,
6789	//       "type": "string"
6790	//     }
6791	//   },
6792	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/import",
6793	//   "request": {
6794	//     "$ref": "InstancesImportRequest"
6795	//   },
6796	//   "response": {
6797	//     "$ref": "Operation"
6798	//   },
6799	//   "scopes": [
6800	//     "https://www.googleapis.com/auth/cloud-platform"
6801	//   ]
6802	// }
6803
6804}
6805
6806// method id "sql.instances.insert":
6807
6808type InstancesInsertCall struct {
6809	s                *Service
6810	project          string
6811	databaseinstance *DatabaseInstance
6812	urlParams_       gensupport.URLParams
6813	ctx_             context.Context
6814	header_          http.Header
6815}
6816
6817// Insert: Creates a new Cloud SQL instance.
6818func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall {
6819	c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6820	c.project = project
6821	c.databaseinstance = databaseinstance
6822	return c
6823}
6824
6825// Fields allows partial responses to be retrieved. See
6826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6827// for more information.
6828func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
6829	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6830	return c
6831}
6832
6833// Context sets the context to be used in this call's Do method. Any
6834// pending HTTP request will be aborted if the provided context is
6835// canceled.
6836func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
6837	c.ctx_ = ctx
6838	return c
6839}
6840
6841// Header returns an http.Header that can be modified by the caller to
6842// add HTTP headers to the request.
6843func (c *InstancesInsertCall) Header() http.Header {
6844	if c.header_ == nil {
6845		c.header_ = make(http.Header)
6846	}
6847	return c.header_
6848}
6849
6850func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
6851	reqHeaders := make(http.Header)
6852	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6853	for k, v := range c.header_ {
6854		reqHeaders[k] = v
6855	}
6856	reqHeaders.Set("User-Agent", c.s.userAgent())
6857	var body io.Reader = nil
6858	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
6859	if err != nil {
6860		return nil, err
6861	}
6862	reqHeaders.Set("Content-Type", "application/json")
6863	c.urlParams_.Set("alt", alt)
6864	c.urlParams_.Set("prettyPrint", "false")
6865	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances")
6866	urls += "?" + c.urlParams_.Encode()
6867	req, err := http.NewRequest("POST", urls, body)
6868	if err != nil {
6869		return nil, err
6870	}
6871	req.Header = reqHeaders
6872	googleapi.Expand(req.URL, map[string]string{
6873		"project": c.project,
6874	})
6875	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6876}
6877
6878// Do executes the "sql.instances.insert" call.
6879// Exactly one of *Operation or error will be non-nil. Any non-2xx
6880// status code is an error. Response headers are in either
6881// *Operation.ServerResponse.Header or (if a response was returned at
6882// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6883// to check whether the returned error was because
6884// http.StatusNotModified was returned.
6885func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6886	gensupport.SetOptions(c.urlParams_, opts...)
6887	res, err := c.doRequest("json")
6888	if res != nil && res.StatusCode == http.StatusNotModified {
6889		if res.Body != nil {
6890			res.Body.Close()
6891		}
6892		return nil, &googleapi.Error{
6893			Code:   res.StatusCode,
6894			Header: res.Header,
6895		}
6896	}
6897	if err != nil {
6898		return nil, err
6899	}
6900	defer googleapi.CloseBody(res)
6901	if err := googleapi.CheckResponse(res); err != nil {
6902		return nil, err
6903	}
6904	ret := &Operation{
6905		ServerResponse: googleapi.ServerResponse{
6906			Header:         res.Header,
6907			HTTPStatusCode: res.StatusCode,
6908		},
6909	}
6910	target := &ret
6911	if err := gensupport.DecodeResponse(target, res); err != nil {
6912		return nil, err
6913	}
6914	return ret, nil
6915	// {
6916	//   "description": "Creates a new Cloud SQL instance.",
6917	//   "flatPath": "sql/v1beta4/projects/{project}/instances",
6918	//   "httpMethod": "POST",
6919	//   "id": "sql.instances.insert",
6920	//   "parameterOrder": [
6921	//     "project"
6922	//   ],
6923	//   "parameters": {
6924	//     "project": {
6925	//       "description": "Project ID of the project to which the newly created Cloud SQL instances\nshould belong.",
6926	//       "location": "path",
6927	//       "required": true,
6928	//       "type": "string"
6929	//     }
6930	//   },
6931	//   "path": "sql/v1beta4/projects/{project}/instances",
6932	//   "request": {
6933	//     "$ref": "DatabaseInstance"
6934	//   },
6935	//   "response": {
6936	//     "$ref": "Operation"
6937	//   },
6938	//   "scopes": [
6939	//     "https://www.googleapis.com/auth/cloud-platform",
6940	//     "https://www.googleapis.com/auth/sqlservice.admin"
6941	//   ]
6942	// }
6943
6944}
6945
6946// method id "sql.instances.list":
6947
6948type InstancesListCall struct {
6949	s            *Service
6950	project      string
6951	urlParams_   gensupport.URLParams
6952	ifNoneMatch_ string
6953	ctx_         context.Context
6954	header_      http.Header
6955}
6956
6957// List: Lists instances under a given project.
6958func (r *InstancesService) List(project string) *InstancesListCall {
6959	c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6960	c.project = project
6961	return c
6962}
6963
6964// Filter sets the optional parameter "filter": A filter expression that
6965// filters resources listed in the response.
6966// The expression is in the form of field:value. For
6967// example,
6968// 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as
6969// per
6970// their JSON representation, such as
6971// 'settings.userLabels.auto_start:true'.
6972//
6973// Multiple filter queries are space-separated. For
6974// example.
6975// 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default,
6976// each
6977// expression is an AND expression. However, you can include AND and
6978// OR
6979// expressions explicitly.
6980func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
6981	c.urlParams_.Set("filter", filter)
6982	return c
6983}
6984
6985// MaxResults sets the optional parameter "maxResults": The maximum
6986// number of results to return per response.
6987func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
6988	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6989	return c
6990}
6991
6992// PageToken sets the optional parameter "pageToken": A
6993// previously-returned page token representing part of the larger set
6994// of
6995// results to view.
6996func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
6997	c.urlParams_.Set("pageToken", pageToken)
6998	return c
6999}
7000
7001// Fields allows partial responses to be retrieved. See
7002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7003// for more information.
7004func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
7005	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7006	return c
7007}
7008
7009// IfNoneMatch sets the optional parameter which makes the operation
7010// fail if the object's ETag matches the given value. This is useful for
7011// getting updates only after the object has changed since the last
7012// request. Use googleapi.IsNotModified to check whether the response
7013// error from Do is the result of In-None-Match.
7014func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
7015	c.ifNoneMatch_ = entityTag
7016	return c
7017}
7018
7019// Context sets the context to be used in this call's Do method. Any
7020// pending HTTP request will be aborted if the provided context is
7021// canceled.
7022func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
7023	c.ctx_ = ctx
7024	return c
7025}
7026
7027// Header returns an http.Header that can be modified by the caller to
7028// add HTTP headers to the request.
7029func (c *InstancesListCall) Header() http.Header {
7030	if c.header_ == nil {
7031		c.header_ = make(http.Header)
7032	}
7033	return c.header_
7034}
7035
7036func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
7037	reqHeaders := make(http.Header)
7038	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7039	for k, v := range c.header_ {
7040		reqHeaders[k] = v
7041	}
7042	reqHeaders.Set("User-Agent", c.s.userAgent())
7043	if c.ifNoneMatch_ != "" {
7044		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7045	}
7046	var body io.Reader = nil
7047	c.urlParams_.Set("alt", alt)
7048	c.urlParams_.Set("prettyPrint", "false")
7049	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances")
7050	urls += "?" + c.urlParams_.Encode()
7051	req, err := http.NewRequest("GET", urls, body)
7052	if err != nil {
7053		return nil, err
7054	}
7055	req.Header = reqHeaders
7056	googleapi.Expand(req.URL, map[string]string{
7057		"project": c.project,
7058	})
7059	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7060}
7061
7062// Do executes the "sql.instances.list" call.
7063// Exactly one of *InstancesListResponse or error will be non-nil. Any
7064// non-2xx status code is an error. Response headers are in either
7065// *InstancesListResponse.ServerResponse.Header or (if a response was
7066// returned at all) in error.(*googleapi.Error).Header. Use
7067// googleapi.IsNotModified to check whether the returned error was
7068// because http.StatusNotModified was returned.
7069func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error) {
7070	gensupport.SetOptions(c.urlParams_, opts...)
7071	res, err := c.doRequest("json")
7072	if res != nil && res.StatusCode == http.StatusNotModified {
7073		if res.Body != nil {
7074			res.Body.Close()
7075		}
7076		return nil, &googleapi.Error{
7077			Code:   res.StatusCode,
7078			Header: res.Header,
7079		}
7080	}
7081	if err != nil {
7082		return nil, err
7083	}
7084	defer googleapi.CloseBody(res)
7085	if err := googleapi.CheckResponse(res); err != nil {
7086		return nil, err
7087	}
7088	ret := &InstancesListResponse{
7089		ServerResponse: googleapi.ServerResponse{
7090			Header:         res.Header,
7091			HTTPStatusCode: res.StatusCode,
7092		},
7093	}
7094	target := &ret
7095	if err := gensupport.DecodeResponse(target, res); err != nil {
7096		return nil, err
7097	}
7098	return ret, nil
7099	// {
7100	//   "description": "Lists instances under a given project.",
7101	//   "flatPath": "sql/v1beta4/projects/{project}/instances",
7102	//   "httpMethod": "GET",
7103	//   "id": "sql.instances.list",
7104	//   "parameterOrder": [
7105	//     "project"
7106	//   ],
7107	//   "parameters": {
7108	//     "filter": {
7109	//       "description": "A filter expression that filters resources listed in the response.\nThe expression is in the form of field:value. For example,\n'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per\ntheir JSON representation, such as 'settings.userLabels.auto_start:true'.\n\nMultiple filter queries are space-separated. For example.\n'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each\nexpression is an AND expression. However, you can include AND and OR\nexpressions explicitly.",
7110	//       "location": "query",
7111	//       "type": "string"
7112	//     },
7113	//     "maxResults": {
7114	//       "description": "The maximum number of results to return per response.",
7115	//       "format": "uint32",
7116	//       "location": "query",
7117	//       "type": "integer"
7118	//     },
7119	//     "pageToken": {
7120	//       "description": "A previously-returned page token representing part of the larger set of\nresults to view.",
7121	//       "location": "query",
7122	//       "type": "string"
7123	//     },
7124	//     "project": {
7125	//       "description": "Project ID of the project for which to list Cloud SQL instances.",
7126	//       "location": "path",
7127	//       "required": true,
7128	//       "type": "string"
7129	//     }
7130	//   },
7131	//   "path": "sql/v1beta4/projects/{project}/instances",
7132	//   "response": {
7133	//     "$ref": "InstancesListResponse"
7134	//   },
7135	//   "scopes": [
7136	//     "https://www.googleapis.com/auth/cloud-platform",
7137	//     "https://www.googleapis.com/auth/sqlservice.admin"
7138	//   ]
7139	// }
7140
7141}
7142
7143// Pages invokes f for each page of results.
7144// A non-nil error returned from f will halt the iteration.
7145// The provided context supersedes any context provided to the Context method.
7146func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error {
7147	c.ctx_ = ctx
7148	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7149	for {
7150		x, err := c.Do()
7151		if err != nil {
7152			return err
7153		}
7154		if err := f(x); err != nil {
7155			return err
7156		}
7157		if x.NextPageToken == "" {
7158			return nil
7159		}
7160		c.PageToken(x.NextPageToken)
7161	}
7162}
7163
7164// method id "sql.instances.listServerCas":
7165
7166type InstancesListServerCasCall struct {
7167	s            *Service
7168	project      string
7169	instance     string
7170	urlParams_   gensupport.URLParams
7171	ifNoneMatch_ string
7172	ctx_         context.Context
7173	header_      http.Header
7174}
7175
7176// ListServerCas: Lists all of the trusted Certificate Authorities (CAs)
7177// for the specified
7178// instance. There can be up to three CAs listed: the CA that was used
7179// to sign
7180// the certificate that is currently in use, a CA that has been added
7181// but not
7182// yet used to sign a certificate, and a CA used to sign a certificate
7183// that
7184// has previously rotated out.
7185func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall {
7186	c := &InstancesListServerCasCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7187	c.project = project
7188	c.instance = instance
7189	return c
7190}
7191
7192// Fields allows partial responses to be retrieved. See
7193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7194// for more information.
7195func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall {
7196	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7197	return c
7198}
7199
7200// IfNoneMatch sets the optional parameter which makes the operation
7201// fail if the object's ETag matches the given value. This is useful for
7202// getting updates only after the object has changed since the last
7203// request. Use googleapi.IsNotModified to check whether the response
7204// error from Do is the result of In-None-Match.
7205func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall {
7206	c.ifNoneMatch_ = entityTag
7207	return c
7208}
7209
7210// Context sets the context to be used in this call's Do method. Any
7211// pending HTTP request will be aborted if the provided context is
7212// canceled.
7213func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall {
7214	c.ctx_ = ctx
7215	return c
7216}
7217
7218// Header returns an http.Header that can be modified by the caller to
7219// add HTTP headers to the request.
7220func (c *InstancesListServerCasCall) Header() http.Header {
7221	if c.header_ == nil {
7222		c.header_ = make(http.Header)
7223	}
7224	return c.header_
7225}
7226
7227func (c *InstancesListServerCasCall) doRequest(alt string) (*http.Response, error) {
7228	reqHeaders := make(http.Header)
7229	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7230	for k, v := range c.header_ {
7231		reqHeaders[k] = v
7232	}
7233	reqHeaders.Set("User-Agent", c.s.userAgent())
7234	if c.ifNoneMatch_ != "" {
7235		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7236	}
7237	var body io.Reader = nil
7238	c.urlParams_.Set("alt", alt)
7239	c.urlParams_.Set("prettyPrint", "false")
7240	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/listServerCas")
7241	urls += "?" + c.urlParams_.Encode()
7242	req, err := http.NewRequest("GET", urls, body)
7243	if err != nil {
7244		return nil, err
7245	}
7246	req.Header = reqHeaders
7247	googleapi.Expand(req.URL, map[string]string{
7248		"project":  c.project,
7249		"instance": c.instance,
7250	})
7251	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7252}
7253
7254// Do executes the "sql.instances.listServerCas" call.
7255// Exactly one of *InstancesListServerCasResponse or error will be
7256// non-nil. Any non-2xx status code is an error. Response headers are in
7257// either *InstancesListServerCasResponse.ServerResponse.Header or (if a
7258// response was returned at all) in error.(*googleapi.Error).Header. Use
7259// googleapi.IsNotModified to check whether the returned error was
7260// because http.StatusNotModified was returned.
7261func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error) {
7262	gensupport.SetOptions(c.urlParams_, opts...)
7263	res, err := c.doRequest("json")
7264	if res != nil && res.StatusCode == http.StatusNotModified {
7265		if res.Body != nil {
7266			res.Body.Close()
7267		}
7268		return nil, &googleapi.Error{
7269			Code:   res.StatusCode,
7270			Header: res.Header,
7271		}
7272	}
7273	if err != nil {
7274		return nil, err
7275	}
7276	defer googleapi.CloseBody(res)
7277	if err := googleapi.CheckResponse(res); err != nil {
7278		return nil, err
7279	}
7280	ret := &InstancesListServerCasResponse{
7281		ServerResponse: googleapi.ServerResponse{
7282			Header:         res.Header,
7283			HTTPStatusCode: res.StatusCode,
7284		},
7285	}
7286	target := &ret
7287	if err := gensupport.DecodeResponse(target, res); err != nil {
7288		return nil, err
7289	}
7290	return ret, nil
7291	// {
7292	//   "description": "Lists all of the trusted Certificate Authorities (CAs) for the specified\ninstance. There can be up to three CAs listed: the CA that was used to sign\nthe certificate that is currently in use, a CA that has been added but not\nyet used to sign a certificate, and a CA used to sign a certificate that\nhas previously rotated out.",
7293	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/listServerCas",
7294	//   "httpMethod": "GET",
7295	//   "id": "sql.instances.listServerCas",
7296	//   "parameterOrder": [
7297	//     "project",
7298	//     "instance"
7299	//   ],
7300	//   "parameters": {
7301	//     "instance": {
7302	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7303	//       "location": "path",
7304	//       "required": true,
7305	//       "type": "string"
7306	//     },
7307	//     "project": {
7308	//       "description": "Project ID of the project that contains the instance.",
7309	//       "location": "path",
7310	//       "required": true,
7311	//       "type": "string"
7312	//     }
7313	//   },
7314	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/listServerCas",
7315	//   "response": {
7316	//     "$ref": "InstancesListServerCasResponse"
7317	//   },
7318	//   "scopes": [
7319	//     "https://www.googleapis.com/auth/cloud-platform",
7320	//     "https://www.googleapis.com/auth/sqlservice.admin"
7321	//   ]
7322	// }
7323
7324}
7325
7326// method id "sql.instances.patch":
7327
7328type InstancesPatchCall struct {
7329	s                *Service
7330	project          string
7331	instance         string
7332	databaseinstance *DatabaseInstance
7333	urlParams_       gensupport.URLParams
7334	ctx_             context.Context
7335	header_          http.Header
7336}
7337
7338// Patch: Updates settings of a Cloud SQL instance.
7339// This method supports patch semantics.
7340func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall {
7341	c := &InstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7342	c.project = project
7343	c.instance = instance
7344	c.databaseinstance = databaseinstance
7345	return c
7346}
7347
7348// Fields allows partial responses to be retrieved. See
7349// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7350// for more information.
7351func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall {
7352	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7353	return c
7354}
7355
7356// Context sets the context to be used in this call's Do method. Any
7357// pending HTTP request will be aborted if the provided context is
7358// canceled.
7359func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall {
7360	c.ctx_ = ctx
7361	return c
7362}
7363
7364// Header returns an http.Header that can be modified by the caller to
7365// add HTTP headers to the request.
7366func (c *InstancesPatchCall) Header() http.Header {
7367	if c.header_ == nil {
7368		c.header_ = make(http.Header)
7369	}
7370	return c.header_
7371}
7372
7373func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) {
7374	reqHeaders := make(http.Header)
7375	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7376	for k, v := range c.header_ {
7377		reqHeaders[k] = v
7378	}
7379	reqHeaders.Set("User-Agent", c.s.userAgent())
7380	var body io.Reader = nil
7381	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
7382	if err != nil {
7383		return nil, err
7384	}
7385	reqHeaders.Set("Content-Type", "application/json")
7386	c.urlParams_.Set("alt", alt)
7387	c.urlParams_.Set("prettyPrint", "false")
7388	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}")
7389	urls += "?" + c.urlParams_.Encode()
7390	req, err := http.NewRequest("PATCH", urls, body)
7391	if err != nil {
7392		return nil, err
7393	}
7394	req.Header = reqHeaders
7395	googleapi.Expand(req.URL, map[string]string{
7396		"project":  c.project,
7397		"instance": c.instance,
7398	})
7399	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7400}
7401
7402// Do executes the "sql.instances.patch" call.
7403// Exactly one of *Operation or error will be non-nil. Any non-2xx
7404// status code is an error. Response headers are in either
7405// *Operation.ServerResponse.Header or (if a response was returned at
7406// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7407// to check whether the returned error was because
7408// http.StatusNotModified was returned.
7409func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7410	gensupport.SetOptions(c.urlParams_, opts...)
7411	res, err := c.doRequest("json")
7412	if res != nil && res.StatusCode == http.StatusNotModified {
7413		if res.Body != nil {
7414			res.Body.Close()
7415		}
7416		return nil, &googleapi.Error{
7417			Code:   res.StatusCode,
7418			Header: res.Header,
7419		}
7420	}
7421	if err != nil {
7422		return nil, err
7423	}
7424	defer googleapi.CloseBody(res)
7425	if err := googleapi.CheckResponse(res); err != nil {
7426		return nil, err
7427	}
7428	ret := &Operation{
7429		ServerResponse: googleapi.ServerResponse{
7430			Header:         res.Header,
7431			HTTPStatusCode: res.StatusCode,
7432		},
7433	}
7434	target := &ret
7435	if err := gensupport.DecodeResponse(target, res); err != nil {
7436		return nil, err
7437	}
7438	return ret, nil
7439	// {
7440	//   "description": "Updates settings of a Cloud SQL instance.\nThis method supports patch semantics.",
7441	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}",
7442	//   "httpMethod": "PATCH",
7443	//   "id": "sql.instances.patch",
7444	//   "parameterOrder": [
7445	//     "project",
7446	//     "instance"
7447	//   ],
7448	//   "parameters": {
7449	//     "instance": {
7450	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7451	//       "location": "path",
7452	//       "required": true,
7453	//       "type": "string"
7454	//     },
7455	//     "project": {
7456	//       "description": "Project ID of the project that contains the instance.",
7457	//       "location": "path",
7458	//       "required": true,
7459	//       "type": "string"
7460	//     }
7461	//   },
7462	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}",
7463	//   "request": {
7464	//     "$ref": "DatabaseInstance"
7465	//   },
7466	//   "response": {
7467	//     "$ref": "Operation"
7468	//   },
7469	//   "scopes": [
7470	//     "https://www.googleapis.com/auth/cloud-platform",
7471	//     "https://www.googleapis.com/auth/sqlservice.admin"
7472	//   ]
7473	// }
7474
7475}
7476
7477// method id "sql.instances.promoteReplica":
7478
7479type InstancesPromoteReplicaCall struct {
7480	s          *Service
7481	project    string
7482	instance   string
7483	urlParams_ gensupport.URLParams
7484	ctx_       context.Context
7485	header_    http.Header
7486}
7487
7488// PromoteReplica: Promotes the read replica instance to be a
7489// stand-alone Cloud SQL instance.
7490// Using this operation might cause your instance to restart.
7491func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall {
7492	c := &InstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7493	c.project = project
7494	c.instance = instance
7495	return c
7496}
7497
7498// Fields allows partial responses to be retrieved. See
7499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7500// for more information.
7501func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall {
7502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7503	return c
7504}
7505
7506// Context sets the context to be used in this call's Do method. Any
7507// pending HTTP request will be aborted if the provided context is
7508// canceled.
7509func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall {
7510	c.ctx_ = ctx
7511	return c
7512}
7513
7514// Header returns an http.Header that can be modified by the caller to
7515// add HTTP headers to the request.
7516func (c *InstancesPromoteReplicaCall) Header() http.Header {
7517	if c.header_ == nil {
7518		c.header_ = make(http.Header)
7519	}
7520	return c.header_
7521}
7522
7523func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
7524	reqHeaders := make(http.Header)
7525	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7526	for k, v := range c.header_ {
7527		reqHeaders[k] = v
7528	}
7529	reqHeaders.Set("User-Agent", c.s.userAgent())
7530	var body io.Reader = nil
7531	c.urlParams_.Set("alt", alt)
7532	c.urlParams_.Set("prettyPrint", "false")
7533	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica")
7534	urls += "?" + c.urlParams_.Encode()
7535	req, err := http.NewRequest("POST", urls, body)
7536	if err != nil {
7537		return nil, err
7538	}
7539	req.Header = reqHeaders
7540	googleapi.Expand(req.URL, map[string]string{
7541		"project":  c.project,
7542		"instance": c.instance,
7543	})
7544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7545}
7546
7547// Do executes the "sql.instances.promoteReplica" call.
7548// Exactly one of *Operation or error will be non-nil. Any non-2xx
7549// status code is an error. Response headers are in either
7550// *Operation.ServerResponse.Header or (if a response was returned at
7551// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7552// to check whether the returned error was because
7553// http.StatusNotModified was returned.
7554func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7555	gensupport.SetOptions(c.urlParams_, opts...)
7556	res, err := c.doRequest("json")
7557	if res != nil && res.StatusCode == http.StatusNotModified {
7558		if res.Body != nil {
7559			res.Body.Close()
7560		}
7561		return nil, &googleapi.Error{
7562			Code:   res.StatusCode,
7563			Header: res.Header,
7564		}
7565	}
7566	if err != nil {
7567		return nil, err
7568	}
7569	defer googleapi.CloseBody(res)
7570	if err := googleapi.CheckResponse(res); err != nil {
7571		return nil, err
7572	}
7573	ret := &Operation{
7574		ServerResponse: googleapi.ServerResponse{
7575			Header:         res.Header,
7576			HTTPStatusCode: res.StatusCode,
7577		},
7578	}
7579	target := &ret
7580	if err := gensupport.DecodeResponse(target, res); err != nil {
7581		return nil, err
7582	}
7583	return ret, nil
7584	// {
7585	//   "description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance.\nUsing this operation might cause your instance to restart.",
7586	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica",
7587	//   "httpMethod": "POST",
7588	//   "id": "sql.instances.promoteReplica",
7589	//   "parameterOrder": [
7590	//     "project",
7591	//     "instance"
7592	//   ],
7593	//   "parameters": {
7594	//     "instance": {
7595	//       "description": "Cloud SQL read replica instance name.",
7596	//       "location": "path",
7597	//       "required": true,
7598	//       "type": "string"
7599	//     },
7600	//     "project": {
7601	//       "description": "ID of the project that contains the read replica.",
7602	//       "location": "path",
7603	//       "required": true,
7604	//       "type": "string"
7605	//     }
7606	//   },
7607	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica",
7608	//   "response": {
7609	//     "$ref": "Operation"
7610	//   },
7611	//   "scopes": [
7612	//     "https://www.googleapis.com/auth/cloud-platform",
7613	//     "https://www.googleapis.com/auth/sqlservice.admin"
7614	//   ]
7615	// }
7616
7617}
7618
7619// method id "sql.instances.resetSslConfig":
7620
7621type InstancesResetSslConfigCall struct {
7622	s          *Service
7623	project    string
7624	instance   string
7625	urlParams_ gensupport.URLParams
7626	ctx_       context.Context
7627	header_    http.Header
7628}
7629
7630// ResetSslConfig: Deletes all client certificates and generates a new
7631// server SSL certificate
7632// for the instance.
7633func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall {
7634	c := &InstancesResetSslConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7635	c.project = project
7636	c.instance = instance
7637	return c
7638}
7639
7640// Fields allows partial responses to be retrieved. See
7641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7642// for more information.
7643func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall {
7644	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7645	return c
7646}
7647
7648// Context sets the context to be used in this call's Do method. Any
7649// pending HTTP request will be aborted if the provided context is
7650// canceled.
7651func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall {
7652	c.ctx_ = ctx
7653	return c
7654}
7655
7656// Header returns an http.Header that can be modified by the caller to
7657// add HTTP headers to the request.
7658func (c *InstancesResetSslConfigCall) Header() http.Header {
7659	if c.header_ == nil {
7660		c.header_ = make(http.Header)
7661	}
7662	return c.header_
7663}
7664
7665func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) {
7666	reqHeaders := make(http.Header)
7667	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7668	for k, v := range c.header_ {
7669		reqHeaders[k] = v
7670	}
7671	reqHeaders.Set("User-Agent", c.s.userAgent())
7672	var body io.Reader = nil
7673	c.urlParams_.Set("alt", alt)
7674	c.urlParams_.Set("prettyPrint", "false")
7675	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig")
7676	urls += "?" + c.urlParams_.Encode()
7677	req, err := http.NewRequest("POST", urls, body)
7678	if err != nil {
7679		return nil, err
7680	}
7681	req.Header = reqHeaders
7682	googleapi.Expand(req.URL, map[string]string{
7683		"project":  c.project,
7684		"instance": c.instance,
7685	})
7686	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7687}
7688
7689// Do executes the "sql.instances.resetSslConfig" call.
7690// Exactly one of *Operation or error will be non-nil. Any non-2xx
7691// status code is an error. Response headers are in either
7692// *Operation.ServerResponse.Header or (if a response was returned at
7693// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7694// to check whether the returned error was because
7695// http.StatusNotModified was returned.
7696func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7697	gensupport.SetOptions(c.urlParams_, opts...)
7698	res, err := c.doRequest("json")
7699	if res != nil && res.StatusCode == http.StatusNotModified {
7700		if res.Body != nil {
7701			res.Body.Close()
7702		}
7703		return nil, &googleapi.Error{
7704			Code:   res.StatusCode,
7705			Header: res.Header,
7706		}
7707	}
7708	if err != nil {
7709		return nil, err
7710	}
7711	defer googleapi.CloseBody(res)
7712	if err := googleapi.CheckResponse(res); err != nil {
7713		return nil, err
7714	}
7715	ret := &Operation{
7716		ServerResponse: googleapi.ServerResponse{
7717			Header:         res.Header,
7718			HTTPStatusCode: res.StatusCode,
7719		},
7720	}
7721	target := &ret
7722	if err := gensupport.DecodeResponse(target, res); err != nil {
7723		return nil, err
7724	}
7725	return ret, nil
7726	// {
7727	//   "description": "Deletes all client certificates and generates a new server SSL certificate\nfor the instance.",
7728	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig",
7729	//   "httpMethod": "POST",
7730	//   "id": "sql.instances.resetSslConfig",
7731	//   "parameterOrder": [
7732	//     "project",
7733	//     "instance"
7734	//   ],
7735	//   "parameters": {
7736	//     "instance": {
7737	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7738	//       "location": "path",
7739	//       "required": true,
7740	//       "type": "string"
7741	//     },
7742	//     "project": {
7743	//       "description": "Project ID of the project that contains the instance.",
7744	//       "location": "path",
7745	//       "required": true,
7746	//       "type": "string"
7747	//     }
7748	//   },
7749	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig",
7750	//   "response": {
7751	//     "$ref": "Operation"
7752	//   },
7753	//   "scopes": [
7754	//     "https://www.googleapis.com/auth/cloud-platform",
7755	//     "https://www.googleapis.com/auth/sqlservice.admin"
7756	//   ]
7757	// }
7758
7759}
7760
7761// method id "sql.instances.restart":
7762
7763type InstancesRestartCall struct {
7764	s          *Service
7765	project    string
7766	instance   string
7767	urlParams_ gensupport.URLParams
7768	ctx_       context.Context
7769	header_    http.Header
7770}
7771
7772// Restart: Restarts a Cloud SQL instance.
7773func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall {
7774	c := &InstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7775	c.project = project
7776	c.instance = instance
7777	return c
7778}
7779
7780// Fields allows partial responses to be retrieved. See
7781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7782// for more information.
7783func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall {
7784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7785	return c
7786}
7787
7788// Context sets the context to be used in this call's Do method. Any
7789// pending HTTP request will be aborted if the provided context is
7790// canceled.
7791func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall {
7792	c.ctx_ = ctx
7793	return c
7794}
7795
7796// Header returns an http.Header that can be modified by the caller to
7797// add HTTP headers to the request.
7798func (c *InstancesRestartCall) Header() http.Header {
7799	if c.header_ == nil {
7800		c.header_ = make(http.Header)
7801	}
7802	return c.header_
7803}
7804
7805func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) {
7806	reqHeaders := make(http.Header)
7807	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7808	for k, v := range c.header_ {
7809		reqHeaders[k] = v
7810	}
7811	reqHeaders.Set("User-Agent", c.s.userAgent())
7812	var body io.Reader = nil
7813	c.urlParams_.Set("alt", alt)
7814	c.urlParams_.Set("prettyPrint", "false")
7815	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/restart")
7816	urls += "?" + c.urlParams_.Encode()
7817	req, err := http.NewRequest("POST", urls, body)
7818	if err != nil {
7819		return nil, err
7820	}
7821	req.Header = reqHeaders
7822	googleapi.Expand(req.URL, map[string]string{
7823		"project":  c.project,
7824		"instance": c.instance,
7825	})
7826	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7827}
7828
7829// Do executes the "sql.instances.restart" call.
7830// Exactly one of *Operation or error will be non-nil. Any non-2xx
7831// status code is an error. Response headers are in either
7832// *Operation.ServerResponse.Header or (if a response was returned at
7833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7834// to check whether the returned error was because
7835// http.StatusNotModified was returned.
7836func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7837	gensupport.SetOptions(c.urlParams_, opts...)
7838	res, err := c.doRequest("json")
7839	if res != nil && res.StatusCode == http.StatusNotModified {
7840		if res.Body != nil {
7841			res.Body.Close()
7842		}
7843		return nil, &googleapi.Error{
7844			Code:   res.StatusCode,
7845			Header: res.Header,
7846		}
7847	}
7848	if err != nil {
7849		return nil, err
7850	}
7851	defer googleapi.CloseBody(res)
7852	if err := googleapi.CheckResponse(res); err != nil {
7853		return nil, err
7854	}
7855	ret := &Operation{
7856		ServerResponse: googleapi.ServerResponse{
7857			Header:         res.Header,
7858			HTTPStatusCode: res.StatusCode,
7859		},
7860	}
7861	target := &ret
7862	if err := gensupport.DecodeResponse(target, res); err != nil {
7863		return nil, err
7864	}
7865	return ret, nil
7866	// {
7867	//   "description": "Restarts a Cloud SQL instance.",
7868	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/restart",
7869	//   "httpMethod": "POST",
7870	//   "id": "sql.instances.restart",
7871	//   "parameterOrder": [
7872	//     "project",
7873	//     "instance"
7874	//   ],
7875	//   "parameters": {
7876	//     "instance": {
7877	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7878	//       "location": "path",
7879	//       "required": true,
7880	//       "type": "string"
7881	//     },
7882	//     "project": {
7883	//       "description": "Project ID of the project that contains the instance to be restarted.",
7884	//       "location": "path",
7885	//       "required": true,
7886	//       "type": "string"
7887	//     }
7888	//   },
7889	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/restart",
7890	//   "response": {
7891	//     "$ref": "Operation"
7892	//   },
7893	//   "scopes": [
7894	//     "https://www.googleapis.com/auth/cloud-platform",
7895	//     "https://www.googleapis.com/auth/sqlservice.admin"
7896	//   ]
7897	// }
7898
7899}
7900
7901// method id "sql.instances.restoreBackup":
7902
7903type InstancesRestoreBackupCall struct {
7904	s                             *Service
7905	project                       string
7906	instance                      string
7907	instancesrestorebackuprequest *InstancesRestoreBackupRequest
7908	urlParams_                    gensupport.URLParams
7909	ctx_                          context.Context
7910	header_                       http.Header
7911}
7912
7913// RestoreBackup: Restores a backup of a Cloud SQL instance. Using this
7914// operation might cause
7915// your instance to restart.
7916func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall {
7917	c := &InstancesRestoreBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7918	c.project = project
7919	c.instance = instance
7920	c.instancesrestorebackuprequest = instancesrestorebackuprequest
7921	return c
7922}
7923
7924// Fields allows partial responses to be retrieved. See
7925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7926// for more information.
7927func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall {
7928	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7929	return c
7930}
7931
7932// Context sets the context to be used in this call's Do method. Any
7933// pending HTTP request will be aborted if the provided context is
7934// canceled.
7935func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall {
7936	c.ctx_ = ctx
7937	return c
7938}
7939
7940// Header returns an http.Header that can be modified by the caller to
7941// add HTTP headers to the request.
7942func (c *InstancesRestoreBackupCall) Header() http.Header {
7943	if c.header_ == nil {
7944		c.header_ = make(http.Header)
7945	}
7946	return c.header_
7947}
7948
7949func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) {
7950	reqHeaders := make(http.Header)
7951	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7952	for k, v := range c.header_ {
7953		reqHeaders[k] = v
7954	}
7955	reqHeaders.Set("User-Agent", c.s.userAgent())
7956	var body io.Reader = nil
7957	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrestorebackuprequest)
7958	if err != nil {
7959		return nil, err
7960	}
7961	reqHeaders.Set("Content-Type", "application/json")
7962	c.urlParams_.Set("alt", alt)
7963	c.urlParams_.Set("prettyPrint", "false")
7964	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup")
7965	urls += "?" + c.urlParams_.Encode()
7966	req, err := http.NewRequest("POST", urls, body)
7967	if err != nil {
7968		return nil, err
7969	}
7970	req.Header = reqHeaders
7971	googleapi.Expand(req.URL, map[string]string{
7972		"project":  c.project,
7973		"instance": c.instance,
7974	})
7975	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7976}
7977
7978// Do executes the "sql.instances.restoreBackup" call.
7979// Exactly one of *Operation or error will be non-nil. Any non-2xx
7980// status code is an error. Response headers are in either
7981// *Operation.ServerResponse.Header or (if a response was returned at
7982// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7983// to check whether the returned error was because
7984// http.StatusNotModified was returned.
7985func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7986	gensupport.SetOptions(c.urlParams_, opts...)
7987	res, err := c.doRequest("json")
7988	if res != nil && res.StatusCode == http.StatusNotModified {
7989		if res.Body != nil {
7990			res.Body.Close()
7991		}
7992		return nil, &googleapi.Error{
7993			Code:   res.StatusCode,
7994			Header: res.Header,
7995		}
7996	}
7997	if err != nil {
7998		return nil, err
7999	}
8000	defer googleapi.CloseBody(res)
8001	if err := googleapi.CheckResponse(res); err != nil {
8002		return nil, err
8003	}
8004	ret := &Operation{
8005		ServerResponse: googleapi.ServerResponse{
8006			Header:         res.Header,
8007			HTTPStatusCode: res.StatusCode,
8008		},
8009	}
8010	target := &ret
8011	if err := gensupport.DecodeResponse(target, res); err != nil {
8012		return nil, err
8013	}
8014	return ret, nil
8015	// {
8016	//   "description": "Restores a backup of a Cloud SQL instance. Using this operation might cause\nyour instance to restart.",
8017	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup",
8018	//   "httpMethod": "POST",
8019	//   "id": "sql.instances.restoreBackup",
8020	//   "parameterOrder": [
8021	//     "project",
8022	//     "instance"
8023	//   ],
8024	//   "parameters": {
8025	//     "instance": {
8026	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8027	//       "location": "path",
8028	//       "required": true,
8029	//       "type": "string"
8030	//     },
8031	//     "project": {
8032	//       "description": "Project ID of the project that contains the instance.",
8033	//       "location": "path",
8034	//       "required": true,
8035	//       "type": "string"
8036	//     }
8037	//   },
8038	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup",
8039	//   "request": {
8040	//     "$ref": "InstancesRestoreBackupRequest"
8041	//   },
8042	//   "response": {
8043	//     "$ref": "Operation"
8044	//   },
8045	//   "scopes": [
8046	//     "https://www.googleapis.com/auth/cloud-platform",
8047	//     "https://www.googleapis.com/auth/sqlservice.admin"
8048	//   ]
8049	// }
8050
8051}
8052
8053// method id "sql.instances.rotateServerCa":
8054
8055type InstancesRotateServerCaCall struct {
8056	s                              *Service
8057	project                        string
8058	instance                       string
8059	instancesrotateservercarequest *InstancesRotateServerCaRequest
8060	urlParams_                     gensupport.URLParams
8061	ctx_                           context.Context
8062	header_                        http.Header
8063}
8064
8065// RotateServerCa: Rotates the server certificate to one signed by the
8066// Certificate Authority
8067// (CA) version previously added with the addServerCA method.
8068func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall {
8069	c := &InstancesRotateServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8070	c.project = project
8071	c.instance = instance
8072	c.instancesrotateservercarequest = instancesrotateservercarequest
8073	return c
8074}
8075
8076// Fields allows partial responses to be retrieved. See
8077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8078// for more information.
8079func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall {
8080	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8081	return c
8082}
8083
8084// Context sets the context to be used in this call's Do method. Any
8085// pending HTTP request will be aborted if the provided context is
8086// canceled.
8087func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall {
8088	c.ctx_ = ctx
8089	return c
8090}
8091
8092// Header returns an http.Header that can be modified by the caller to
8093// add HTTP headers to the request.
8094func (c *InstancesRotateServerCaCall) Header() http.Header {
8095	if c.header_ == nil {
8096		c.header_ = make(http.Header)
8097	}
8098	return c.header_
8099}
8100
8101func (c *InstancesRotateServerCaCall) doRequest(alt string) (*http.Response, error) {
8102	reqHeaders := make(http.Header)
8103	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8104	for k, v := range c.header_ {
8105		reqHeaders[k] = v
8106	}
8107	reqHeaders.Set("User-Agent", c.s.userAgent())
8108	var body io.Reader = nil
8109	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrotateservercarequest)
8110	if err != nil {
8111		return nil, err
8112	}
8113	reqHeaders.Set("Content-Type", "application/json")
8114	c.urlParams_.Set("alt", alt)
8115	c.urlParams_.Set("prettyPrint", "false")
8116	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa")
8117	urls += "?" + c.urlParams_.Encode()
8118	req, err := http.NewRequest("POST", urls, body)
8119	if err != nil {
8120		return nil, err
8121	}
8122	req.Header = reqHeaders
8123	googleapi.Expand(req.URL, map[string]string{
8124		"project":  c.project,
8125		"instance": c.instance,
8126	})
8127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8128}
8129
8130// Do executes the "sql.instances.rotateServerCa" call.
8131// Exactly one of *Operation or error will be non-nil. Any non-2xx
8132// status code is an error. Response headers are in either
8133// *Operation.ServerResponse.Header or (if a response was returned at
8134// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8135// to check whether the returned error was because
8136// http.StatusNotModified was returned.
8137func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8138	gensupport.SetOptions(c.urlParams_, opts...)
8139	res, err := c.doRequest("json")
8140	if res != nil && res.StatusCode == http.StatusNotModified {
8141		if res.Body != nil {
8142			res.Body.Close()
8143		}
8144		return nil, &googleapi.Error{
8145			Code:   res.StatusCode,
8146			Header: res.Header,
8147		}
8148	}
8149	if err != nil {
8150		return nil, err
8151	}
8152	defer googleapi.CloseBody(res)
8153	if err := googleapi.CheckResponse(res); err != nil {
8154		return nil, err
8155	}
8156	ret := &Operation{
8157		ServerResponse: googleapi.ServerResponse{
8158			Header:         res.Header,
8159			HTTPStatusCode: res.StatusCode,
8160		},
8161	}
8162	target := &ret
8163	if err := gensupport.DecodeResponse(target, res); err != nil {
8164		return nil, err
8165	}
8166	return ret, nil
8167	// {
8168	//   "description": "Rotates the server certificate to one signed by the Certificate Authority\n(CA) version previously added with the addServerCA method.",
8169	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa",
8170	//   "httpMethod": "POST",
8171	//   "id": "sql.instances.rotateServerCa",
8172	//   "parameterOrder": [
8173	//     "project",
8174	//     "instance"
8175	//   ],
8176	//   "parameters": {
8177	//     "instance": {
8178	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8179	//       "location": "path",
8180	//       "required": true,
8181	//       "type": "string"
8182	//     },
8183	//     "project": {
8184	//       "description": "Project ID of the project that contains the instance.",
8185	//       "location": "path",
8186	//       "required": true,
8187	//       "type": "string"
8188	//     }
8189	//   },
8190	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa",
8191	//   "request": {
8192	//     "$ref": "InstancesRotateServerCaRequest"
8193	//   },
8194	//   "response": {
8195	//     "$ref": "Operation"
8196	//   },
8197	//   "scopes": [
8198	//     "https://www.googleapis.com/auth/cloud-platform",
8199	//     "https://www.googleapis.com/auth/sqlservice.admin"
8200	//   ]
8201	// }
8202
8203}
8204
8205// method id "sql.instances.startReplica":
8206
8207type InstancesStartReplicaCall struct {
8208	s          *Service
8209	project    string
8210	instance   string
8211	urlParams_ gensupport.URLParams
8212	ctx_       context.Context
8213	header_    http.Header
8214}
8215
8216// StartReplica: Starts the replication in the read replica instance.
8217func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall {
8218	c := &InstancesStartReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8219	c.project = project
8220	c.instance = instance
8221	return c
8222}
8223
8224// Fields allows partial responses to be retrieved. See
8225// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8226// for more information.
8227func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall {
8228	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8229	return c
8230}
8231
8232// Context sets the context to be used in this call's Do method. Any
8233// pending HTTP request will be aborted if the provided context is
8234// canceled.
8235func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall {
8236	c.ctx_ = ctx
8237	return c
8238}
8239
8240// Header returns an http.Header that can be modified by the caller to
8241// add HTTP headers to the request.
8242func (c *InstancesStartReplicaCall) Header() http.Header {
8243	if c.header_ == nil {
8244		c.header_ = make(http.Header)
8245	}
8246	return c.header_
8247}
8248
8249func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) {
8250	reqHeaders := make(http.Header)
8251	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8252	for k, v := range c.header_ {
8253		reqHeaders[k] = v
8254	}
8255	reqHeaders.Set("User-Agent", c.s.userAgent())
8256	var body io.Reader = nil
8257	c.urlParams_.Set("alt", alt)
8258	c.urlParams_.Set("prettyPrint", "false")
8259	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/startReplica")
8260	urls += "?" + c.urlParams_.Encode()
8261	req, err := http.NewRequest("POST", urls, body)
8262	if err != nil {
8263		return nil, err
8264	}
8265	req.Header = reqHeaders
8266	googleapi.Expand(req.URL, map[string]string{
8267		"project":  c.project,
8268		"instance": c.instance,
8269	})
8270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8271}
8272
8273// Do executes the "sql.instances.startReplica" call.
8274// Exactly one of *Operation or error will be non-nil. Any non-2xx
8275// status code is an error. Response headers are in either
8276// *Operation.ServerResponse.Header or (if a response was returned at
8277// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8278// to check whether the returned error was because
8279// http.StatusNotModified was returned.
8280func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8281	gensupport.SetOptions(c.urlParams_, opts...)
8282	res, err := c.doRequest("json")
8283	if res != nil && res.StatusCode == http.StatusNotModified {
8284		if res.Body != nil {
8285			res.Body.Close()
8286		}
8287		return nil, &googleapi.Error{
8288			Code:   res.StatusCode,
8289			Header: res.Header,
8290		}
8291	}
8292	if err != nil {
8293		return nil, err
8294	}
8295	defer googleapi.CloseBody(res)
8296	if err := googleapi.CheckResponse(res); err != nil {
8297		return nil, err
8298	}
8299	ret := &Operation{
8300		ServerResponse: googleapi.ServerResponse{
8301			Header:         res.Header,
8302			HTTPStatusCode: res.StatusCode,
8303		},
8304	}
8305	target := &ret
8306	if err := gensupport.DecodeResponse(target, res); err != nil {
8307		return nil, err
8308	}
8309	return ret, nil
8310	// {
8311	//   "description": "Starts the replication in the read replica instance.",
8312	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/startReplica",
8313	//   "httpMethod": "POST",
8314	//   "id": "sql.instances.startReplica",
8315	//   "parameterOrder": [
8316	//     "project",
8317	//     "instance"
8318	//   ],
8319	//   "parameters": {
8320	//     "instance": {
8321	//       "description": "Cloud SQL read replica instance name.",
8322	//       "location": "path",
8323	//       "required": true,
8324	//       "type": "string"
8325	//     },
8326	//     "project": {
8327	//       "description": "ID of the project that contains the read replica.",
8328	//       "location": "path",
8329	//       "required": true,
8330	//       "type": "string"
8331	//     }
8332	//   },
8333	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/startReplica",
8334	//   "response": {
8335	//     "$ref": "Operation"
8336	//   },
8337	//   "scopes": [
8338	//     "https://www.googleapis.com/auth/cloud-platform",
8339	//     "https://www.googleapis.com/auth/sqlservice.admin"
8340	//   ]
8341	// }
8342
8343}
8344
8345// method id "sql.instances.stopReplica":
8346
8347type InstancesStopReplicaCall struct {
8348	s          *Service
8349	project    string
8350	instance   string
8351	urlParams_ gensupport.URLParams
8352	ctx_       context.Context
8353	header_    http.Header
8354}
8355
8356// StopReplica: Stops the replication in the read replica instance.
8357func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall {
8358	c := &InstancesStopReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8359	c.project = project
8360	c.instance = instance
8361	return c
8362}
8363
8364// Fields allows partial responses to be retrieved. See
8365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8366// for more information.
8367func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall {
8368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8369	return c
8370}
8371
8372// Context sets the context to be used in this call's Do method. Any
8373// pending HTTP request will be aborted if the provided context is
8374// canceled.
8375func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall {
8376	c.ctx_ = ctx
8377	return c
8378}
8379
8380// Header returns an http.Header that can be modified by the caller to
8381// add HTTP headers to the request.
8382func (c *InstancesStopReplicaCall) Header() http.Header {
8383	if c.header_ == nil {
8384		c.header_ = make(http.Header)
8385	}
8386	return c.header_
8387}
8388
8389func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) {
8390	reqHeaders := make(http.Header)
8391	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8392	for k, v := range c.header_ {
8393		reqHeaders[k] = v
8394	}
8395	reqHeaders.Set("User-Agent", c.s.userAgent())
8396	var body io.Reader = nil
8397	c.urlParams_.Set("alt", alt)
8398	c.urlParams_.Set("prettyPrint", "false")
8399	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/stopReplica")
8400	urls += "?" + c.urlParams_.Encode()
8401	req, err := http.NewRequest("POST", urls, body)
8402	if err != nil {
8403		return nil, err
8404	}
8405	req.Header = reqHeaders
8406	googleapi.Expand(req.URL, map[string]string{
8407		"project":  c.project,
8408		"instance": c.instance,
8409	})
8410	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8411}
8412
8413// Do executes the "sql.instances.stopReplica" call.
8414// Exactly one of *Operation or error will be non-nil. Any non-2xx
8415// status code is an error. Response headers are in either
8416// *Operation.ServerResponse.Header or (if a response was returned at
8417// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8418// to check whether the returned error was because
8419// http.StatusNotModified was returned.
8420func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8421	gensupport.SetOptions(c.urlParams_, opts...)
8422	res, err := c.doRequest("json")
8423	if res != nil && res.StatusCode == http.StatusNotModified {
8424		if res.Body != nil {
8425			res.Body.Close()
8426		}
8427		return nil, &googleapi.Error{
8428			Code:   res.StatusCode,
8429			Header: res.Header,
8430		}
8431	}
8432	if err != nil {
8433		return nil, err
8434	}
8435	defer googleapi.CloseBody(res)
8436	if err := googleapi.CheckResponse(res); err != nil {
8437		return nil, err
8438	}
8439	ret := &Operation{
8440		ServerResponse: googleapi.ServerResponse{
8441			Header:         res.Header,
8442			HTTPStatusCode: res.StatusCode,
8443		},
8444	}
8445	target := &ret
8446	if err := gensupport.DecodeResponse(target, res); err != nil {
8447		return nil, err
8448	}
8449	return ret, nil
8450	// {
8451	//   "description": "Stops the replication in the read replica instance.",
8452	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/stopReplica",
8453	//   "httpMethod": "POST",
8454	//   "id": "sql.instances.stopReplica",
8455	//   "parameterOrder": [
8456	//     "project",
8457	//     "instance"
8458	//   ],
8459	//   "parameters": {
8460	//     "instance": {
8461	//       "description": "Cloud SQL read replica instance name.",
8462	//       "location": "path",
8463	//       "required": true,
8464	//       "type": "string"
8465	//     },
8466	//     "project": {
8467	//       "description": "ID of the project that contains the read replica.",
8468	//       "location": "path",
8469	//       "required": true,
8470	//       "type": "string"
8471	//     }
8472	//   },
8473	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/stopReplica",
8474	//   "response": {
8475	//     "$ref": "Operation"
8476	//   },
8477	//   "scopes": [
8478	//     "https://www.googleapis.com/auth/cloud-platform",
8479	//     "https://www.googleapis.com/auth/sqlservice.admin"
8480	//   ]
8481	// }
8482
8483}
8484
8485// method id "sql.instances.truncateLog":
8486
8487type InstancesTruncateLogCall struct {
8488	s                           *Service
8489	project                     string
8490	instance                    string
8491	instancestruncatelogrequest *InstancesTruncateLogRequest
8492	urlParams_                  gensupport.URLParams
8493	ctx_                        context.Context
8494	header_                     http.Header
8495}
8496
8497// TruncateLog: Truncate MySQL general and slow query log tables
8498func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall {
8499	c := &InstancesTruncateLogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8500	c.project = project
8501	c.instance = instance
8502	c.instancestruncatelogrequest = instancestruncatelogrequest
8503	return c
8504}
8505
8506// Fields allows partial responses to be retrieved. See
8507// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8508// for more information.
8509func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall {
8510	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8511	return c
8512}
8513
8514// Context sets the context to be used in this call's Do method. Any
8515// pending HTTP request will be aborted if the provided context is
8516// canceled.
8517func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall {
8518	c.ctx_ = ctx
8519	return c
8520}
8521
8522// Header returns an http.Header that can be modified by the caller to
8523// add HTTP headers to the request.
8524func (c *InstancesTruncateLogCall) Header() http.Header {
8525	if c.header_ == nil {
8526		c.header_ = make(http.Header)
8527	}
8528	return c.header_
8529}
8530
8531func (c *InstancesTruncateLogCall) doRequest(alt string) (*http.Response, error) {
8532	reqHeaders := make(http.Header)
8533	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8534	for k, v := range c.header_ {
8535		reqHeaders[k] = v
8536	}
8537	reqHeaders.Set("User-Agent", c.s.userAgent())
8538	var body io.Reader = nil
8539	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancestruncatelogrequest)
8540	if err != nil {
8541		return nil, err
8542	}
8543	reqHeaders.Set("Content-Type", "application/json")
8544	c.urlParams_.Set("alt", alt)
8545	c.urlParams_.Set("prettyPrint", "false")
8546	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/truncateLog")
8547	urls += "?" + c.urlParams_.Encode()
8548	req, err := http.NewRequest("POST", urls, body)
8549	if err != nil {
8550		return nil, err
8551	}
8552	req.Header = reqHeaders
8553	googleapi.Expand(req.URL, map[string]string{
8554		"project":  c.project,
8555		"instance": c.instance,
8556	})
8557	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8558}
8559
8560// Do executes the "sql.instances.truncateLog" call.
8561// Exactly one of *Operation or error will be non-nil. Any non-2xx
8562// status code is an error. Response headers are in either
8563// *Operation.ServerResponse.Header or (if a response was returned at
8564// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8565// to check whether the returned error was because
8566// http.StatusNotModified was returned.
8567func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8568	gensupport.SetOptions(c.urlParams_, opts...)
8569	res, err := c.doRequest("json")
8570	if res != nil && res.StatusCode == http.StatusNotModified {
8571		if res.Body != nil {
8572			res.Body.Close()
8573		}
8574		return nil, &googleapi.Error{
8575			Code:   res.StatusCode,
8576			Header: res.Header,
8577		}
8578	}
8579	if err != nil {
8580		return nil, err
8581	}
8582	defer googleapi.CloseBody(res)
8583	if err := googleapi.CheckResponse(res); err != nil {
8584		return nil, err
8585	}
8586	ret := &Operation{
8587		ServerResponse: googleapi.ServerResponse{
8588			Header:         res.Header,
8589			HTTPStatusCode: res.StatusCode,
8590		},
8591	}
8592	target := &ret
8593	if err := gensupport.DecodeResponse(target, res); err != nil {
8594		return nil, err
8595	}
8596	return ret, nil
8597	// {
8598	//   "description": "Truncate MySQL general and slow query log tables",
8599	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/truncateLog",
8600	//   "httpMethod": "POST",
8601	//   "id": "sql.instances.truncateLog",
8602	//   "parameterOrder": [
8603	//     "project",
8604	//     "instance"
8605	//   ],
8606	//   "parameters": {
8607	//     "instance": {
8608	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8609	//       "location": "path",
8610	//       "required": true,
8611	//       "type": "string"
8612	//     },
8613	//     "project": {
8614	//       "description": "Project ID of the Cloud SQL project.",
8615	//       "location": "path",
8616	//       "required": true,
8617	//       "type": "string"
8618	//     }
8619	//   },
8620	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/truncateLog",
8621	//   "request": {
8622	//     "$ref": "InstancesTruncateLogRequest"
8623	//   },
8624	//   "response": {
8625	//     "$ref": "Operation"
8626	//   },
8627	//   "scopes": [
8628	//     "https://www.googleapis.com/auth/cloud-platform",
8629	//     "https://www.googleapis.com/auth/sqlservice.admin"
8630	//   ]
8631	// }
8632
8633}
8634
8635// method id "sql.instances.update":
8636
8637type InstancesUpdateCall struct {
8638	s                *Service
8639	project          string
8640	instance         string
8641	databaseinstance *DatabaseInstance
8642	urlParams_       gensupport.URLParams
8643	ctx_             context.Context
8644	header_          http.Header
8645}
8646
8647// Update: Updates settings of a Cloud SQL instance. Using this
8648// operation might cause
8649// your instance to restart.
8650func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall {
8651	c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8652	c.project = project
8653	c.instance = instance
8654	c.databaseinstance = databaseinstance
8655	return c
8656}
8657
8658// Fields allows partial responses to be retrieved. See
8659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8660// for more information.
8661func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall {
8662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8663	return c
8664}
8665
8666// Context sets the context to be used in this call's Do method. Any
8667// pending HTTP request will be aborted if the provided context is
8668// canceled.
8669func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall {
8670	c.ctx_ = ctx
8671	return c
8672}
8673
8674// Header returns an http.Header that can be modified by the caller to
8675// add HTTP headers to the request.
8676func (c *InstancesUpdateCall) Header() http.Header {
8677	if c.header_ == nil {
8678		c.header_ = make(http.Header)
8679	}
8680	return c.header_
8681}
8682
8683func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
8684	reqHeaders := make(http.Header)
8685	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8686	for k, v := range c.header_ {
8687		reqHeaders[k] = v
8688	}
8689	reqHeaders.Set("User-Agent", c.s.userAgent())
8690	var body io.Reader = nil
8691	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
8692	if err != nil {
8693		return nil, err
8694	}
8695	reqHeaders.Set("Content-Type", "application/json")
8696	c.urlParams_.Set("alt", alt)
8697	c.urlParams_.Set("prettyPrint", "false")
8698	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}")
8699	urls += "?" + c.urlParams_.Encode()
8700	req, err := http.NewRequest("PUT", urls, body)
8701	if err != nil {
8702		return nil, err
8703	}
8704	req.Header = reqHeaders
8705	googleapi.Expand(req.URL, map[string]string{
8706		"project":  c.project,
8707		"instance": c.instance,
8708	})
8709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8710}
8711
8712// Do executes the "sql.instances.update" call.
8713// Exactly one of *Operation or error will be non-nil. Any non-2xx
8714// status code is an error. Response headers are in either
8715// *Operation.ServerResponse.Header or (if a response was returned at
8716// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8717// to check whether the returned error was because
8718// http.StatusNotModified was returned.
8719func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8720	gensupport.SetOptions(c.urlParams_, opts...)
8721	res, err := c.doRequest("json")
8722	if res != nil && res.StatusCode == http.StatusNotModified {
8723		if res.Body != nil {
8724			res.Body.Close()
8725		}
8726		return nil, &googleapi.Error{
8727			Code:   res.StatusCode,
8728			Header: res.Header,
8729		}
8730	}
8731	if err != nil {
8732		return nil, err
8733	}
8734	defer googleapi.CloseBody(res)
8735	if err := googleapi.CheckResponse(res); err != nil {
8736		return nil, err
8737	}
8738	ret := &Operation{
8739		ServerResponse: googleapi.ServerResponse{
8740			Header:         res.Header,
8741			HTTPStatusCode: res.StatusCode,
8742		},
8743	}
8744	target := &ret
8745	if err := gensupport.DecodeResponse(target, res); err != nil {
8746		return nil, err
8747	}
8748	return ret, nil
8749	// {
8750	//   "description": "Updates settings of a Cloud SQL instance. Using this operation might cause\nyour instance to restart.",
8751	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}",
8752	//   "httpMethod": "PUT",
8753	//   "id": "sql.instances.update",
8754	//   "parameterOrder": [
8755	//     "project",
8756	//     "instance"
8757	//   ],
8758	//   "parameters": {
8759	//     "instance": {
8760	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8761	//       "location": "path",
8762	//       "required": true,
8763	//       "type": "string"
8764	//     },
8765	//     "project": {
8766	//       "description": "Project ID of the project that contains the instance.",
8767	//       "location": "path",
8768	//       "required": true,
8769	//       "type": "string"
8770	//     }
8771	//   },
8772	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}",
8773	//   "request": {
8774	//     "$ref": "DatabaseInstance"
8775	//   },
8776	//   "response": {
8777	//     "$ref": "Operation"
8778	//   },
8779	//   "scopes": [
8780	//     "https://www.googleapis.com/auth/cloud-platform",
8781	//     "https://www.googleapis.com/auth/sqlservice.admin"
8782	//   ]
8783	// }
8784
8785}
8786
8787// method id "sql.operations.get":
8788
8789type OperationsGetCall struct {
8790	s            *Service
8791	project      string
8792	operation    string
8793	urlParams_   gensupport.URLParams
8794	ifNoneMatch_ string
8795	ctx_         context.Context
8796	header_      http.Header
8797}
8798
8799// Get: Retrieves an instance operation that has been performed on an
8800// instance.
8801func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
8802	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8803	c.project = project
8804	c.operation = operation
8805	return c
8806}
8807
8808// Fields allows partial responses to be retrieved. See
8809// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8810// for more information.
8811func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
8812	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8813	return c
8814}
8815
8816// IfNoneMatch sets the optional parameter which makes the operation
8817// fail if the object's ETag matches the given value. This is useful for
8818// getting updates only after the object has changed since the last
8819// request. Use googleapi.IsNotModified to check whether the response
8820// error from Do is the result of In-None-Match.
8821func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
8822	c.ifNoneMatch_ = entityTag
8823	return c
8824}
8825
8826// Context sets the context to be used in this call's Do method. Any
8827// pending HTTP request will be aborted if the provided context is
8828// canceled.
8829func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
8830	c.ctx_ = ctx
8831	return c
8832}
8833
8834// Header returns an http.Header that can be modified by the caller to
8835// add HTTP headers to the request.
8836func (c *OperationsGetCall) Header() http.Header {
8837	if c.header_ == nil {
8838		c.header_ = make(http.Header)
8839	}
8840	return c.header_
8841}
8842
8843func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
8844	reqHeaders := make(http.Header)
8845	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8846	for k, v := range c.header_ {
8847		reqHeaders[k] = v
8848	}
8849	reqHeaders.Set("User-Agent", c.s.userAgent())
8850	if c.ifNoneMatch_ != "" {
8851		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8852	}
8853	var body io.Reader = nil
8854	c.urlParams_.Set("alt", alt)
8855	c.urlParams_.Set("prettyPrint", "false")
8856	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/operations/{operation}")
8857	urls += "?" + c.urlParams_.Encode()
8858	req, err := http.NewRequest("GET", urls, body)
8859	if err != nil {
8860		return nil, err
8861	}
8862	req.Header = reqHeaders
8863	googleapi.Expand(req.URL, map[string]string{
8864		"project":   c.project,
8865		"operation": c.operation,
8866	})
8867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8868}
8869
8870// Do executes the "sql.operations.get" call.
8871// Exactly one of *Operation or error will be non-nil. Any non-2xx
8872// status code is an error. Response headers are in either
8873// *Operation.ServerResponse.Header or (if a response was returned at
8874// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8875// to check whether the returned error was because
8876// http.StatusNotModified was returned.
8877func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8878	gensupport.SetOptions(c.urlParams_, opts...)
8879	res, err := c.doRequest("json")
8880	if res != nil && res.StatusCode == http.StatusNotModified {
8881		if res.Body != nil {
8882			res.Body.Close()
8883		}
8884		return nil, &googleapi.Error{
8885			Code:   res.StatusCode,
8886			Header: res.Header,
8887		}
8888	}
8889	if err != nil {
8890		return nil, err
8891	}
8892	defer googleapi.CloseBody(res)
8893	if err := googleapi.CheckResponse(res); err != nil {
8894		return nil, err
8895	}
8896	ret := &Operation{
8897		ServerResponse: googleapi.ServerResponse{
8898			Header:         res.Header,
8899			HTTPStatusCode: res.StatusCode,
8900		},
8901	}
8902	target := &ret
8903	if err := gensupport.DecodeResponse(target, res); err != nil {
8904		return nil, err
8905	}
8906	return ret, nil
8907	// {
8908	//   "description": "Retrieves an instance operation that has been performed on an instance.",
8909	//   "flatPath": "sql/v1beta4/projects/{project}/operations/{operation}",
8910	//   "httpMethod": "GET",
8911	//   "id": "sql.operations.get",
8912	//   "parameterOrder": [
8913	//     "project",
8914	//     "operation"
8915	//   ],
8916	//   "parameters": {
8917	//     "operation": {
8918	//       "description": "Instance operation ID.",
8919	//       "location": "path",
8920	//       "required": true,
8921	//       "type": "string"
8922	//     },
8923	//     "project": {
8924	//       "description": "Project ID of the project that contains the instance.",
8925	//       "location": "path",
8926	//       "required": true,
8927	//       "type": "string"
8928	//     }
8929	//   },
8930	//   "path": "sql/v1beta4/projects/{project}/operations/{operation}",
8931	//   "response": {
8932	//     "$ref": "Operation"
8933	//   },
8934	//   "scopes": [
8935	//     "https://www.googleapis.com/auth/cloud-platform",
8936	//     "https://www.googleapis.com/auth/sqlservice.admin"
8937	//   ]
8938	// }
8939
8940}
8941
8942// method id "sql.operations.list":
8943
8944type OperationsListCall struct {
8945	s            *Service
8946	project      string
8947	urlParams_   gensupport.URLParams
8948	ifNoneMatch_ string
8949	ctx_         context.Context
8950	header_      http.Header
8951}
8952
8953// List: Lists all instance operations that have been performed on the
8954// given Cloud
8955// SQL instance in the reverse chronological order of the start time.
8956func (r *OperationsService) List(project string) *OperationsListCall {
8957	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8958	c.project = project
8959	return c
8960}
8961
8962// Instance sets the optional parameter "instance": Cloud SQL instance
8963// ID. This does not include the project ID.
8964func (c *OperationsListCall) Instance(instance string) *OperationsListCall {
8965	c.urlParams_.Set("instance", instance)
8966	return c
8967}
8968
8969// MaxResults sets the optional parameter "maxResults": Maximum number
8970// of operations per response.
8971func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
8972	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8973	return c
8974}
8975
8976// PageToken sets the optional parameter "pageToken": A
8977// previously-returned page token representing part of the larger set
8978// of
8979// results to view.
8980func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
8981	c.urlParams_.Set("pageToken", pageToken)
8982	return c
8983}
8984
8985// Fields allows partial responses to be retrieved. See
8986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8987// for more information.
8988func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
8989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8990	return c
8991}
8992
8993// IfNoneMatch sets the optional parameter which makes the operation
8994// fail if the object's ETag matches the given value. This is useful for
8995// getting updates only after the object has changed since the last
8996// request. Use googleapi.IsNotModified to check whether the response
8997// error from Do is the result of In-None-Match.
8998func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
8999	c.ifNoneMatch_ = entityTag
9000	return c
9001}
9002
9003// Context sets the context to be used in this call's Do method. Any
9004// pending HTTP request will be aborted if the provided context is
9005// canceled.
9006func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
9007	c.ctx_ = ctx
9008	return c
9009}
9010
9011// Header returns an http.Header that can be modified by the caller to
9012// add HTTP headers to the request.
9013func (c *OperationsListCall) Header() http.Header {
9014	if c.header_ == nil {
9015		c.header_ = make(http.Header)
9016	}
9017	return c.header_
9018}
9019
9020func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
9021	reqHeaders := make(http.Header)
9022	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9023	for k, v := range c.header_ {
9024		reqHeaders[k] = v
9025	}
9026	reqHeaders.Set("User-Agent", c.s.userAgent())
9027	if c.ifNoneMatch_ != "" {
9028		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9029	}
9030	var body io.Reader = nil
9031	c.urlParams_.Set("alt", alt)
9032	c.urlParams_.Set("prettyPrint", "false")
9033	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/operations")
9034	urls += "?" + c.urlParams_.Encode()
9035	req, err := http.NewRequest("GET", urls, body)
9036	if err != nil {
9037		return nil, err
9038	}
9039	req.Header = reqHeaders
9040	googleapi.Expand(req.URL, map[string]string{
9041		"project": c.project,
9042	})
9043	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9044}
9045
9046// Do executes the "sql.operations.list" call.
9047// Exactly one of *OperationsListResponse or error will be non-nil. Any
9048// non-2xx status code is an error. Response headers are in either
9049// *OperationsListResponse.ServerResponse.Header or (if a response was
9050// returned at all) in error.(*googleapi.Error).Header. Use
9051// googleapi.IsNotModified to check whether the returned error was
9052// because http.StatusNotModified was returned.
9053func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
9054	gensupport.SetOptions(c.urlParams_, opts...)
9055	res, err := c.doRequest("json")
9056	if res != nil && res.StatusCode == http.StatusNotModified {
9057		if res.Body != nil {
9058			res.Body.Close()
9059		}
9060		return nil, &googleapi.Error{
9061			Code:   res.StatusCode,
9062			Header: res.Header,
9063		}
9064	}
9065	if err != nil {
9066		return nil, err
9067	}
9068	defer googleapi.CloseBody(res)
9069	if err := googleapi.CheckResponse(res); err != nil {
9070		return nil, err
9071	}
9072	ret := &OperationsListResponse{
9073		ServerResponse: googleapi.ServerResponse{
9074			Header:         res.Header,
9075			HTTPStatusCode: res.StatusCode,
9076		},
9077	}
9078	target := &ret
9079	if err := gensupport.DecodeResponse(target, res); err != nil {
9080		return nil, err
9081	}
9082	return ret, nil
9083	// {
9084	//   "description": "Lists all instance operations that have been performed on the given Cloud\nSQL instance in the reverse chronological order of the start time.",
9085	//   "flatPath": "sql/v1beta4/projects/{project}/operations",
9086	//   "httpMethod": "GET",
9087	//   "id": "sql.operations.list",
9088	//   "parameterOrder": [
9089	//     "project"
9090	//   ],
9091	//   "parameters": {
9092	//     "instance": {
9093	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9094	//       "location": "query",
9095	//       "type": "string"
9096	//     },
9097	//     "maxResults": {
9098	//       "description": "Maximum number of operations per response.",
9099	//       "format": "uint32",
9100	//       "location": "query",
9101	//       "type": "integer"
9102	//     },
9103	//     "pageToken": {
9104	//       "description": "A previously-returned page token representing part of the larger set of\nresults to view.",
9105	//       "location": "query",
9106	//       "type": "string"
9107	//     },
9108	//     "project": {
9109	//       "description": "Project ID of the project that contains the instance.",
9110	//       "location": "path",
9111	//       "required": true,
9112	//       "type": "string"
9113	//     }
9114	//   },
9115	//   "path": "sql/v1beta4/projects/{project}/operations",
9116	//   "response": {
9117	//     "$ref": "OperationsListResponse"
9118	//   },
9119	//   "scopes": [
9120	//     "https://www.googleapis.com/auth/cloud-platform",
9121	//     "https://www.googleapis.com/auth/sqlservice.admin"
9122	//   ]
9123	// }
9124
9125}
9126
9127// Pages invokes f for each page of results.
9128// A non-nil error returned from f will halt the iteration.
9129// The provided context supersedes any context provided to the Context method.
9130func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
9131	c.ctx_ = ctx
9132	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9133	for {
9134		x, err := c.Do()
9135		if err != nil {
9136			return err
9137		}
9138		if err := f(x); err != nil {
9139			return err
9140		}
9141		if x.NextPageToken == "" {
9142			return nil
9143		}
9144		c.PageToken(x.NextPageToken)
9145	}
9146}
9147
9148// method id "sql.projects.instances.rescheduleMaintenance":
9149
9150type ProjectsInstancesRescheduleMaintenanceCall struct {
9151	s                                            *Service
9152	project                                      string
9153	instance                                     string
9154	sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody
9155	urlParams_                                   gensupport.URLParams
9156	ctx_                                         context.Context
9157	header_                                      http.Header
9158}
9159
9160// RescheduleMaintenance: Reschedules the maintenance on the given
9161// instance.
9162func (r *ProjectsInstancesService) RescheduleMaintenance(project string, instance string, sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody) *ProjectsInstancesRescheduleMaintenanceCall {
9163	c := &ProjectsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9164	c.project = project
9165	c.instance = instance
9166	c.sqlinstancesreschedulemaintenancerequestbody = sqlinstancesreschedulemaintenancerequestbody
9167	return c
9168}
9169
9170// Fields allows partial responses to be retrieved. See
9171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9172// for more information.
9173func (c *ProjectsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesRescheduleMaintenanceCall {
9174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9175	return c
9176}
9177
9178// Context sets the context to be used in this call's Do method. Any
9179// pending HTTP request will be aborted if the provided context is
9180// canceled.
9181func (c *ProjectsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsInstancesRescheduleMaintenanceCall {
9182	c.ctx_ = ctx
9183	return c
9184}
9185
9186// Header returns an http.Header that can be modified by the caller to
9187// add HTTP headers to the request.
9188func (c *ProjectsInstancesRescheduleMaintenanceCall) Header() http.Header {
9189	if c.header_ == nil {
9190		c.header_ = make(http.Header)
9191	}
9192	return c.header_
9193}
9194
9195func (c *ProjectsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) {
9196	reqHeaders := make(http.Header)
9197	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9198	for k, v := range c.header_ {
9199		reqHeaders[k] = v
9200	}
9201	reqHeaders.Set("User-Agent", c.s.userAgent())
9202	var body io.Reader = nil
9203	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesreschedulemaintenancerequestbody)
9204	if err != nil {
9205		return nil, err
9206	}
9207	reqHeaders.Set("Content-Type", "application/json")
9208	c.urlParams_.Set("alt", alt)
9209	c.urlParams_.Set("prettyPrint", "false")
9210	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance")
9211	urls += "?" + c.urlParams_.Encode()
9212	req, err := http.NewRequest("POST", urls, body)
9213	if err != nil {
9214		return nil, err
9215	}
9216	req.Header = reqHeaders
9217	googleapi.Expand(req.URL, map[string]string{
9218		"project":  c.project,
9219		"instance": c.instance,
9220	})
9221	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9222}
9223
9224// Do executes the "sql.projects.instances.rescheduleMaintenance" call.
9225// Exactly one of *Operation or error will be non-nil. Any non-2xx
9226// status code is an error. Response headers are in either
9227// *Operation.ServerResponse.Header or (if a response was returned at
9228// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9229// to check whether the returned error was because
9230// http.StatusNotModified was returned.
9231func (c *ProjectsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9232	gensupport.SetOptions(c.urlParams_, opts...)
9233	res, err := c.doRequest("json")
9234	if res != nil && res.StatusCode == http.StatusNotModified {
9235		if res.Body != nil {
9236			res.Body.Close()
9237		}
9238		return nil, &googleapi.Error{
9239			Code:   res.StatusCode,
9240			Header: res.Header,
9241		}
9242	}
9243	if err != nil {
9244		return nil, err
9245	}
9246	defer googleapi.CloseBody(res)
9247	if err := googleapi.CheckResponse(res); err != nil {
9248		return nil, err
9249	}
9250	ret := &Operation{
9251		ServerResponse: googleapi.ServerResponse{
9252			Header:         res.Header,
9253			HTTPStatusCode: res.StatusCode,
9254		},
9255	}
9256	target := &ret
9257	if err := gensupport.DecodeResponse(target, res); err != nil {
9258		return nil, err
9259	}
9260	return ret, nil
9261	// {
9262	//   "description": "Reschedules the maintenance on the given instance.",
9263	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance",
9264	//   "httpMethod": "POST",
9265	//   "id": "sql.projects.instances.rescheduleMaintenance",
9266	//   "parameterOrder": [
9267	//     "project",
9268	//     "instance"
9269	//   ],
9270	//   "parameters": {
9271	//     "instance": {
9272	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9273	//       "location": "path",
9274	//       "required": true,
9275	//       "type": "string"
9276	//     },
9277	//     "project": {
9278	//       "description": "ID of the project that contains the instance.",
9279	//       "location": "path",
9280	//       "required": true,
9281	//       "type": "string"
9282	//     }
9283	//   },
9284	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance",
9285	//   "request": {
9286	//     "$ref": "SqlInstancesRescheduleMaintenanceRequestBody"
9287	//   },
9288	//   "response": {
9289	//     "$ref": "Operation"
9290	//   },
9291	//   "scopes": [
9292	//     "https://www.googleapis.com/auth/cloud-platform",
9293	//     "https://www.googleapis.com/auth/sqlservice.admin"
9294	//   ]
9295	// }
9296
9297}
9298
9299// method id "sql.projects.instances.startExternalSync":
9300
9301type ProjectsInstancesStartExternalSyncCall struct {
9302	s          *Service
9303	project    string
9304	instance   string
9305	urlParams_ gensupport.URLParams
9306	ctx_       context.Context
9307	header_    http.Header
9308}
9309
9310// StartExternalSync: Start External master migration.
9311func (r *ProjectsInstancesService) StartExternalSync(project string, instance string) *ProjectsInstancesStartExternalSyncCall {
9312	c := &ProjectsInstancesStartExternalSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9313	c.project = project
9314	c.instance = instance
9315	return c
9316}
9317
9318// SyncMode sets the optional parameter "syncMode": External sync mode
9319//
9320// Possible values:
9321//   "EXTERNAL_SYNC_MODE_UNSPECIFIED"
9322//   "ONLINE"
9323//   "OFFLINE"
9324func (c *ProjectsInstancesStartExternalSyncCall) SyncMode(syncMode string) *ProjectsInstancesStartExternalSyncCall {
9325	c.urlParams_.Set("syncMode", syncMode)
9326	return c
9327}
9328
9329// Fields allows partial responses to be retrieved. See
9330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9331// for more information.
9332func (c *ProjectsInstancesStartExternalSyncCall) Fields(s ...googleapi.Field) *ProjectsInstancesStartExternalSyncCall {
9333	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9334	return c
9335}
9336
9337// Context sets the context to be used in this call's Do method. Any
9338// pending HTTP request will be aborted if the provided context is
9339// canceled.
9340func (c *ProjectsInstancesStartExternalSyncCall) Context(ctx context.Context) *ProjectsInstancesStartExternalSyncCall {
9341	c.ctx_ = ctx
9342	return c
9343}
9344
9345// Header returns an http.Header that can be modified by the caller to
9346// add HTTP headers to the request.
9347func (c *ProjectsInstancesStartExternalSyncCall) Header() http.Header {
9348	if c.header_ == nil {
9349		c.header_ = make(http.Header)
9350	}
9351	return c.header_
9352}
9353
9354func (c *ProjectsInstancesStartExternalSyncCall) doRequest(alt string) (*http.Response, error) {
9355	reqHeaders := make(http.Header)
9356	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9357	for k, v := range c.header_ {
9358		reqHeaders[k] = v
9359	}
9360	reqHeaders.Set("User-Agent", c.s.userAgent())
9361	var body io.Reader = nil
9362	c.urlParams_.Set("alt", alt)
9363	c.urlParams_.Set("prettyPrint", "false")
9364	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync")
9365	urls += "?" + c.urlParams_.Encode()
9366	req, err := http.NewRequest("POST", urls, body)
9367	if err != nil {
9368		return nil, err
9369	}
9370	req.Header = reqHeaders
9371	googleapi.Expand(req.URL, map[string]string{
9372		"project":  c.project,
9373		"instance": c.instance,
9374	})
9375	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9376}
9377
9378// Do executes the "sql.projects.instances.startExternalSync" call.
9379// Exactly one of *Operation or error will be non-nil. Any non-2xx
9380// status code is an error. Response headers are in either
9381// *Operation.ServerResponse.Header or (if a response was returned at
9382// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9383// to check whether the returned error was because
9384// http.StatusNotModified was returned.
9385func (c *ProjectsInstancesStartExternalSyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9386	gensupport.SetOptions(c.urlParams_, opts...)
9387	res, err := c.doRequest("json")
9388	if res != nil && res.StatusCode == http.StatusNotModified {
9389		if res.Body != nil {
9390			res.Body.Close()
9391		}
9392		return nil, &googleapi.Error{
9393			Code:   res.StatusCode,
9394			Header: res.Header,
9395		}
9396	}
9397	if err != nil {
9398		return nil, err
9399	}
9400	defer googleapi.CloseBody(res)
9401	if err := googleapi.CheckResponse(res); err != nil {
9402		return nil, err
9403	}
9404	ret := &Operation{
9405		ServerResponse: googleapi.ServerResponse{
9406			Header:         res.Header,
9407			HTTPStatusCode: res.StatusCode,
9408		},
9409	}
9410	target := &ret
9411	if err := gensupport.DecodeResponse(target, res); err != nil {
9412		return nil, err
9413	}
9414	return ret, nil
9415	// {
9416	//   "description": "Start External master migration.",
9417	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync",
9418	//   "httpMethod": "POST",
9419	//   "id": "sql.projects.instances.startExternalSync",
9420	//   "parameterOrder": [
9421	//     "project",
9422	//     "instance"
9423	//   ],
9424	//   "parameters": {
9425	//     "instance": {
9426	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9427	//       "location": "path",
9428	//       "required": true,
9429	//       "type": "string"
9430	//     },
9431	//     "project": {
9432	//       "description": "ID of the project that contains the first generation instance.",
9433	//       "location": "path",
9434	//       "required": true,
9435	//       "type": "string"
9436	//     },
9437	//     "syncMode": {
9438	//       "description": "External sync mode",
9439	//       "enum": [
9440	//         "EXTERNAL_SYNC_MODE_UNSPECIFIED",
9441	//         "ONLINE",
9442	//         "OFFLINE"
9443	//       ],
9444	//       "location": "query",
9445	//       "type": "string"
9446	//     }
9447	//   },
9448	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync",
9449	//   "response": {
9450	//     "$ref": "Operation"
9451	//   },
9452	//   "scopes": [
9453	//     "https://www.googleapis.com/auth/cloud-platform",
9454	//     "https://www.googleapis.com/auth/sqlservice.admin"
9455	//   ]
9456	// }
9457
9458}
9459
9460// method id "sql.projects.instances.verifyExternalSyncSettings":
9461
9462type ProjectsInstancesVerifyExternalSyncSettingsCall struct {
9463	s          *Service
9464	project    string
9465	instance   string
9466	urlParams_ gensupport.URLParams
9467	ctx_       context.Context
9468	header_    http.Header
9469}
9470
9471// VerifyExternalSyncSettings: Verify External master external sync
9472// settings.
9473func (r *ProjectsInstancesService) VerifyExternalSyncSettings(project string, instance string) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9474	c := &ProjectsInstancesVerifyExternalSyncSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9475	c.project = project
9476	c.instance = instance
9477	return c
9478}
9479
9480// SyncMode sets the optional parameter "syncMode": External sync mode
9481//
9482// Possible values:
9483//   "EXTERNAL_SYNC_MODE_UNSPECIFIED"
9484//   "ONLINE"
9485//   "OFFLINE"
9486func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) SyncMode(syncMode string) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9487	c.urlParams_.Set("syncMode", syncMode)
9488	return c
9489}
9490
9491// VerifyConnectionOnly sets the optional parameter
9492// "verifyConnectionOnly": Flag to enable verifying connection only
9493func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) VerifyConnectionOnly(verifyConnectionOnly bool) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9494	c.urlParams_.Set("verifyConnectionOnly", fmt.Sprint(verifyConnectionOnly))
9495	return c
9496}
9497
9498// Fields allows partial responses to be retrieved. See
9499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9500// for more information.
9501func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Fields(s ...googleapi.Field) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9503	return c
9504}
9505
9506// Context sets the context to be used in this call's Do method. Any
9507// pending HTTP request will be aborted if the provided context is
9508// canceled.
9509func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Context(ctx context.Context) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9510	c.ctx_ = ctx
9511	return c
9512}
9513
9514// Header returns an http.Header that can be modified by the caller to
9515// add HTTP headers to the request.
9516func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Header() http.Header {
9517	if c.header_ == nil {
9518		c.header_ = make(http.Header)
9519	}
9520	return c.header_
9521}
9522
9523func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) doRequest(alt string) (*http.Response, error) {
9524	reqHeaders := make(http.Header)
9525	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9526	for k, v := range c.header_ {
9527		reqHeaders[k] = v
9528	}
9529	reqHeaders.Set("User-Agent", c.s.userAgent())
9530	var body io.Reader = nil
9531	c.urlParams_.Set("alt", alt)
9532	c.urlParams_.Set("prettyPrint", "false")
9533	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings")
9534	urls += "?" + c.urlParams_.Encode()
9535	req, err := http.NewRequest("POST", urls, body)
9536	if err != nil {
9537		return nil, err
9538	}
9539	req.Header = reqHeaders
9540	googleapi.Expand(req.URL, map[string]string{
9541		"project":  c.project,
9542		"instance": c.instance,
9543	})
9544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9545}
9546
9547// Do executes the "sql.projects.instances.verifyExternalSyncSettings" call.
9548// Exactly one of *SqlInstancesVerifyExternalSyncSettingsResponse or
9549// error will be non-nil. Any non-2xx status code is an error. Response
9550// headers are in either
9551// *SqlInstancesVerifyExternalSyncSettingsResponse.ServerResponse.Header
9552// or (if a response was returned at all) in
9553// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9554// whether the returned error was because http.StatusNotModified was
9555// returned.
9556func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Do(opts ...googleapi.CallOption) (*SqlInstancesVerifyExternalSyncSettingsResponse, error) {
9557	gensupport.SetOptions(c.urlParams_, opts...)
9558	res, err := c.doRequest("json")
9559	if res != nil && res.StatusCode == http.StatusNotModified {
9560		if res.Body != nil {
9561			res.Body.Close()
9562		}
9563		return nil, &googleapi.Error{
9564			Code:   res.StatusCode,
9565			Header: res.Header,
9566		}
9567	}
9568	if err != nil {
9569		return nil, err
9570	}
9571	defer googleapi.CloseBody(res)
9572	if err := googleapi.CheckResponse(res); err != nil {
9573		return nil, err
9574	}
9575	ret := &SqlInstancesVerifyExternalSyncSettingsResponse{
9576		ServerResponse: googleapi.ServerResponse{
9577			Header:         res.Header,
9578			HTTPStatusCode: res.StatusCode,
9579		},
9580	}
9581	target := &ret
9582	if err := gensupport.DecodeResponse(target, res); err != nil {
9583		return nil, err
9584	}
9585	return ret, nil
9586	// {
9587	//   "description": "Verify External master external sync settings.",
9588	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings",
9589	//   "httpMethod": "POST",
9590	//   "id": "sql.projects.instances.verifyExternalSyncSettings",
9591	//   "parameterOrder": [
9592	//     "project",
9593	//     "instance"
9594	//   ],
9595	//   "parameters": {
9596	//     "instance": {
9597	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9598	//       "location": "path",
9599	//       "required": true,
9600	//       "type": "string"
9601	//     },
9602	//     "project": {
9603	//       "description": "Project ID of the project that contains the instance.",
9604	//       "location": "path",
9605	//       "required": true,
9606	//       "type": "string"
9607	//     },
9608	//     "syncMode": {
9609	//       "description": "External sync mode",
9610	//       "enum": [
9611	//         "EXTERNAL_SYNC_MODE_UNSPECIFIED",
9612	//         "ONLINE",
9613	//         "OFFLINE"
9614	//       ],
9615	//       "location": "query",
9616	//       "type": "string"
9617	//     },
9618	//     "verifyConnectionOnly": {
9619	//       "description": "Flag to enable verifying connection only",
9620	//       "location": "query",
9621	//       "type": "boolean"
9622	//     }
9623	//   },
9624	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings",
9625	//   "response": {
9626	//     "$ref": "SqlInstancesVerifyExternalSyncSettingsResponse"
9627	//   },
9628	//   "scopes": [
9629	//     "https://www.googleapis.com/auth/cloud-platform",
9630	//     "https://www.googleapis.com/auth/sqlservice.admin"
9631	//   ]
9632	// }
9633
9634}
9635
9636// method id "sql.sslCerts.createEphemeral":
9637
9638type SslCertsCreateEphemeralCall struct {
9639	s                              *Service
9640	project                        string
9641	instance                       string
9642	sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest
9643	urlParams_                     gensupport.URLParams
9644	ctx_                           context.Context
9645	header_                        http.Header
9646}
9647
9648// CreateEphemeral: Generates a short-lived X509 certificate containing
9649// the provided public key
9650// and signed by a private key specific to the target instance. Users
9651// may use
9652// the certificate to authenticate as themselves when connecting to
9653// the
9654// database.
9655func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall {
9656	c := &SslCertsCreateEphemeralCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9657	c.project = project
9658	c.instance = instance
9659	c.sslcertscreateephemeralrequest = sslcertscreateephemeralrequest
9660	return c
9661}
9662
9663// Fields allows partial responses to be retrieved. See
9664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9665// for more information.
9666func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall {
9667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9668	return c
9669}
9670
9671// Context sets the context to be used in this call's Do method. Any
9672// pending HTTP request will be aborted if the provided context is
9673// canceled.
9674func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall {
9675	c.ctx_ = ctx
9676	return c
9677}
9678
9679// Header returns an http.Header that can be modified by the caller to
9680// add HTTP headers to the request.
9681func (c *SslCertsCreateEphemeralCall) Header() http.Header {
9682	if c.header_ == nil {
9683		c.header_ = make(http.Header)
9684	}
9685	return c.header_
9686}
9687
9688func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) {
9689	reqHeaders := make(http.Header)
9690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9691	for k, v := range c.header_ {
9692		reqHeaders[k] = v
9693	}
9694	reqHeaders.Set("User-Agent", c.s.userAgent())
9695	var body io.Reader = nil
9696	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertscreateephemeralrequest)
9697	if err != nil {
9698		return nil, err
9699	}
9700	reqHeaders.Set("Content-Type", "application/json")
9701	c.urlParams_.Set("alt", alt)
9702	c.urlParams_.Set("prettyPrint", "false")
9703	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral")
9704	urls += "?" + c.urlParams_.Encode()
9705	req, err := http.NewRequest("POST", urls, body)
9706	if err != nil {
9707		return nil, err
9708	}
9709	req.Header = reqHeaders
9710	googleapi.Expand(req.URL, map[string]string{
9711		"project":  c.project,
9712		"instance": c.instance,
9713	})
9714	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9715}
9716
9717// Do executes the "sql.sslCerts.createEphemeral" call.
9718// Exactly one of *SslCert or error will be non-nil. Any non-2xx status
9719// code is an error. Response headers are in either
9720// *SslCert.ServerResponse.Header or (if a response was returned at all)
9721// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9722// check whether the returned error was because http.StatusNotModified
9723// was returned.
9724func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
9725	gensupport.SetOptions(c.urlParams_, opts...)
9726	res, err := c.doRequest("json")
9727	if res != nil && res.StatusCode == http.StatusNotModified {
9728		if res.Body != nil {
9729			res.Body.Close()
9730		}
9731		return nil, &googleapi.Error{
9732			Code:   res.StatusCode,
9733			Header: res.Header,
9734		}
9735	}
9736	if err != nil {
9737		return nil, err
9738	}
9739	defer googleapi.CloseBody(res)
9740	if err := googleapi.CheckResponse(res); err != nil {
9741		return nil, err
9742	}
9743	ret := &SslCert{
9744		ServerResponse: googleapi.ServerResponse{
9745			Header:         res.Header,
9746			HTTPStatusCode: res.StatusCode,
9747		},
9748	}
9749	target := &ret
9750	if err := gensupport.DecodeResponse(target, res); err != nil {
9751		return nil, err
9752	}
9753	return ret, nil
9754	// {
9755	//   "description": "Generates a short-lived X509 certificate containing the provided public key\nand signed by a private key specific to the target instance. Users may use\nthe certificate to authenticate as themselves when connecting to the\ndatabase.",
9756	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral",
9757	//   "httpMethod": "POST",
9758	//   "id": "sql.sslCerts.createEphemeral",
9759	//   "parameterOrder": [
9760	//     "project",
9761	//     "instance"
9762	//   ],
9763	//   "parameters": {
9764	//     "instance": {
9765	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9766	//       "location": "path",
9767	//       "required": true,
9768	//       "type": "string"
9769	//     },
9770	//     "project": {
9771	//       "description": "Project ID of the Cloud SQL project.",
9772	//       "location": "path",
9773	//       "required": true,
9774	//       "type": "string"
9775	//     }
9776	//   },
9777	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral",
9778	//   "request": {
9779	//     "$ref": "SslCertsCreateEphemeralRequest"
9780	//   },
9781	//   "response": {
9782	//     "$ref": "SslCert"
9783	//   },
9784	//   "scopes": [
9785	//     "https://www.googleapis.com/auth/cloud-platform",
9786	//     "https://www.googleapis.com/auth/sqlservice.admin"
9787	//   ]
9788	// }
9789
9790}
9791
9792// method id "sql.sslCerts.delete":
9793
9794type SslCertsDeleteCall struct {
9795	s               *Service
9796	project         string
9797	instance        string
9798	sha1Fingerprint string
9799	urlParams_      gensupport.URLParams
9800	ctx_            context.Context
9801	header_         http.Header
9802}
9803
9804// Delete: Deletes the SSL certificate. For First Generation instances,
9805// the
9806// certificate remains valid until the instance is restarted.
9807func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall {
9808	c := &SslCertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9809	c.project = project
9810	c.instance = instance
9811	c.sha1Fingerprint = sha1Fingerprint
9812	return c
9813}
9814
9815// Fields allows partial responses to be retrieved. See
9816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9817// for more information.
9818func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall {
9819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9820	return c
9821}
9822
9823// Context sets the context to be used in this call's Do method. Any
9824// pending HTTP request will be aborted if the provided context is
9825// canceled.
9826func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall {
9827	c.ctx_ = ctx
9828	return c
9829}
9830
9831// Header returns an http.Header that can be modified by the caller to
9832// add HTTP headers to the request.
9833func (c *SslCertsDeleteCall) Header() http.Header {
9834	if c.header_ == nil {
9835		c.header_ = make(http.Header)
9836	}
9837	return c.header_
9838}
9839
9840func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) {
9841	reqHeaders := make(http.Header)
9842	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9843	for k, v := range c.header_ {
9844		reqHeaders[k] = v
9845	}
9846	reqHeaders.Set("User-Agent", c.s.userAgent())
9847	var body io.Reader = nil
9848	c.urlParams_.Set("alt", alt)
9849	c.urlParams_.Set("prettyPrint", "false")
9850	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
9851	urls += "?" + c.urlParams_.Encode()
9852	req, err := http.NewRequest("DELETE", urls, body)
9853	if err != nil {
9854		return nil, err
9855	}
9856	req.Header = reqHeaders
9857	googleapi.Expand(req.URL, map[string]string{
9858		"project":         c.project,
9859		"instance":        c.instance,
9860		"sha1Fingerprint": c.sha1Fingerprint,
9861	})
9862	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9863}
9864
9865// Do executes the "sql.sslCerts.delete" call.
9866// Exactly one of *Operation or error will be non-nil. Any non-2xx
9867// status code is an error. Response headers are in either
9868// *Operation.ServerResponse.Header or (if a response was returned at
9869// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9870// to check whether the returned error was because
9871// http.StatusNotModified was returned.
9872func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9873	gensupport.SetOptions(c.urlParams_, opts...)
9874	res, err := c.doRequest("json")
9875	if res != nil && res.StatusCode == http.StatusNotModified {
9876		if res.Body != nil {
9877			res.Body.Close()
9878		}
9879		return nil, &googleapi.Error{
9880			Code:   res.StatusCode,
9881			Header: res.Header,
9882		}
9883	}
9884	if err != nil {
9885		return nil, err
9886	}
9887	defer googleapi.CloseBody(res)
9888	if err := googleapi.CheckResponse(res); err != nil {
9889		return nil, err
9890	}
9891	ret := &Operation{
9892		ServerResponse: googleapi.ServerResponse{
9893			Header:         res.Header,
9894			HTTPStatusCode: res.StatusCode,
9895		},
9896	}
9897	target := &ret
9898	if err := gensupport.DecodeResponse(target, res); err != nil {
9899		return nil, err
9900	}
9901	return ret, nil
9902	// {
9903	//   "description": "Deletes the SSL certificate. For First Generation instances, the\ncertificate remains valid until the instance is restarted.",
9904	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
9905	//   "httpMethod": "DELETE",
9906	//   "id": "sql.sslCerts.delete",
9907	//   "parameterOrder": [
9908	//     "project",
9909	//     "instance",
9910	//     "sha1Fingerprint"
9911	//   ],
9912	//   "parameters": {
9913	//     "instance": {
9914	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9915	//       "location": "path",
9916	//       "required": true,
9917	//       "type": "string"
9918	//     },
9919	//     "project": {
9920	//       "description": "Project ID of the project that contains the instance.",
9921	//       "location": "path",
9922	//       "required": true,
9923	//       "type": "string"
9924	//     },
9925	//     "sha1Fingerprint": {
9926	//       "description": "Sha1 FingerPrint.",
9927	//       "location": "path",
9928	//       "required": true,
9929	//       "type": "string"
9930	//     }
9931	//   },
9932	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
9933	//   "response": {
9934	//     "$ref": "Operation"
9935	//   },
9936	//   "scopes": [
9937	//     "https://www.googleapis.com/auth/cloud-platform",
9938	//     "https://www.googleapis.com/auth/sqlservice.admin"
9939	//   ]
9940	// }
9941
9942}
9943
9944// method id "sql.sslCerts.get":
9945
9946type SslCertsGetCall struct {
9947	s               *Service
9948	project         string
9949	instance        string
9950	sha1Fingerprint string
9951	urlParams_      gensupport.URLParams
9952	ifNoneMatch_    string
9953	ctx_            context.Context
9954	header_         http.Header
9955}
9956
9957// Get: Retrieves a particular SSL certificate.  Does not include the
9958// private key
9959// (required for usage).  The private key must be saved from the
9960// response to
9961// initial creation.
9962func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall {
9963	c := &SslCertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9964	c.project = project
9965	c.instance = instance
9966	c.sha1Fingerprint = sha1Fingerprint
9967	return c
9968}
9969
9970// Fields allows partial responses to be retrieved. See
9971// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9972// for more information.
9973func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall {
9974	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9975	return c
9976}
9977
9978// IfNoneMatch sets the optional parameter which makes the operation
9979// fail if the object's ETag matches the given value. This is useful for
9980// getting updates only after the object has changed since the last
9981// request. Use googleapi.IsNotModified to check whether the response
9982// error from Do is the result of In-None-Match.
9983func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall {
9984	c.ifNoneMatch_ = entityTag
9985	return c
9986}
9987
9988// Context sets the context to be used in this call's Do method. Any
9989// pending HTTP request will be aborted if the provided context is
9990// canceled.
9991func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall {
9992	c.ctx_ = ctx
9993	return c
9994}
9995
9996// Header returns an http.Header that can be modified by the caller to
9997// add HTTP headers to the request.
9998func (c *SslCertsGetCall) Header() http.Header {
9999	if c.header_ == nil {
10000		c.header_ = make(http.Header)
10001	}
10002	return c.header_
10003}
10004
10005func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) {
10006	reqHeaders := make(http.Header)
10007	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10008	for k, v := range c.header_ {
10009		reqHeaders[k] = v
10010	}
10011	reqHeaders.Set("User-Agent", c.s.userAgent())
10012	if c.ifNoneMatch_ != "" {
10013		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10014	}
10015	var body io.Reader = nil
10016	c.urlParams_.Set("alt", alt)
10017	c.urlParams_.Set("prettyPrint", "false")
10018	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
10019	urls += "?" + c.urlParams_.Encode()
10020	req, err := http.NewRequest("GET", urls, body)
10021	if err != nil {
10022		return nil, err
10023	}
10024	req.Header = reqHeaders
10025	googleapi.Expand(req.URL, map[string]string{
10026		"project":         c.project,
10027		"instance":        c.instance,
10028		"sha1Fingerprint": c.sha1Fingerprint,
10029	})
10030	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10031}
10032
10033// Do executes the "sql.sslCerts.get" call.
10034// Exactly one of *SslCert or error will be non-nil. Any non-2xx status
10035// code is an error. Response headers are in either
10036// *SslCert.ServerResponse.Header or (if a response was returned at all)
10037// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10038// check whether the returned error was because http.StatusNotModified
10039// was returned.
10040func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
10041	gensupport.SetOptions(c.urlParams_, opts...)
10042	res, err := c.doRequest("json")
10043	if res != nil && res.StatusCode == http.StatusNotModified {
10044		if res.Body != nil {
10045			res.Body.Close()
10046		}
10047		return nil, &googleapi.Error{
10048			Code:   res.StatusCode,
10049			Header: res.Header,
10050		}
10051	}
10052	if err != nil {
10053		return nil, err
10054	}
10055	defer googleapi.CloseBody(res)
10056	if err := googleapi.CheckResponse(res); err != nil {
10057		return nil, err
10058	}
10059	ret := &SslCert{
10060		ServerResponse: googleapi.ServerResponse{
10061			Header:         res.Header,
10062			HTTPStatusCode: res.StatusCode,
10063		},
10064	}
10065	target := &ret
10066	if err := gensupport.DecodeResponse(target, res); err != nil {
10067		return nil, err
10068	}
10069	return ret, nil
10070	// {
10071	//   "description": "Retrieves a particular SSL certificate.  Does not include the private key\n(required for usage).  The private key must be saved from the response to\ninitial creation.",
10072	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
10073	//   "httpMethod": "GET",
10074	//   "id": "sql.sslCerts.get",
10075	//   "parameterOrder": [
10076	//     "project",
10077	//     "instance",
10078	//     "sha1Fingerprint"
10079	//   ],
10080	//   "parameters": {
10081	//     "instance": {
10082	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10083	//       "location": "path",
10084	//       "required": true,
10085	//       "type": "string"
10086	//     },
10087	//     "project": {
10088	//       "description": "Project ID of the project that contains the instance.",
10089	//       "location": "path",
10090	//       "required": true,
10091	//       "type": "string"
10092	//     },
10093	//     "sha1Fingerprint": {
10094	//       "description": "Sha1 FingerPrint.",
10095	//       "location": "path",
10096	//       "required": true,
10097	//       "type": "string"
10098	//     }
10099	//   },
10100	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
10101	//   "response": {
10102	//     "$ref": "SslCert"
10103	//   },
10104	//   "scopes": [
10105	//     "https://www.googleapis.com/auth/cloud-platform",
10106	//     "https://www.googleapis.com/auth/sqlservice.admin"
10107	//   ]
10108	// }
10109
10110}
10111
10112// method id "sql.sslCerts.insert":
10113
10114type SslCertsInsertCall struct {
10115	s                     *Service
10116	project               string
10117	instance              string
10118	sslcertsinsertrequest *SslCertsInsertRequest
10119	urlParams_            gensupport.URLParams
10120	ctx_                  context.Context
10121	header_               http.Header
10122}
10123
10124// Insert: Creates an SSL certificate and returns it along with the
10125// private key and
10126// server certificate authority.  The new certificate will not be usable
10127// until
10128// the instance is restarted.
10129func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall {
10130	c := &SslCertsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10131	c.project = project
10132	c.instance = instance
10133	c.sslcertsinsertrequest = sslcertsinsertrequest
10134	return c
10135}
10136
10137// Fields allows partial responses to be retrieved. See
10138// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10139// for more information.
10140func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall {
10141	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10142	return c
10143}
10144
10145// Context sets the context to be used in this call's Do method. Any
10146// pending HTTP request will be aborted if the provided context is
10147// canceled.
10148func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall {
10149	c.ctx_ = ctx
10150	return c
10151}
10152
10153// Header returns an http.Header that can be modified by the caller to
10154// add HTTP headers to the request.
10155func (c *SslCertsInsertCall) Header() http.Header {
10156	if c.header_ == nil {
10157		c.header_ = make(http.Header)
10158	}
10159	return c.header_
10160}
10161
10162func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) {
10163	reqHeaders := make(http.Header)
10164	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10165	for k, v := range c.header_ {
10166		reqHeaders[k] = v
10167	}
10168	reqHeaders.Set("User-Agent", c.s.userAgent())
10169	var body io.Reader = nil
10170	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest)
10171	if err != nil {
10172		return nil, err
10173	}
10174	reqHeaders.Set("Content-Type", "application/json")
10175	c.urlParams_.Set("alt", alt)
10176	c.urlParams_.Set("prettyPrint", "false")
10177	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts")
10178	urls += "?" + c.urlParams_.Encode()
10179	req, err := http.NewRequest("POST", urls, body)
10180	if err != nil {
10181		return nil, err
10182	}
10183	req.Header = reqHeaders
10184	googleapi.Expand(req.URL, map[string]string{
10185		"project":  c.project,
10186		"instance": c.instance,
10187	})
10188	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10189}
10190
10191// Do executes the "sql.sslCerts.insert" call.
10192// Exactly one of *SslCertsInsertResponse or error will be non-nil. Any
10193// non-2xx status code is an error. Response headers are in either
10194// *SslCertsInsertResponse.ServerResponse.Header or (if a response was
10195// returned at all) in error.(*googleapi.Error).Header. Use
10196// googleapi.IsNotModified to check whether the returned error was
10197// because http.StatusNotModified was returned.
10198func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error) {
10199	gensupport.SetOptions(c.urlParams_, opts...)
10200	res, err := c.doRequest("json")
10201	if res != nil && res.StatusCode == http.StatusNotModified {
10202		if res.Body != nil {
10203			res.Body.Close()
10204		}
10205		return nil, &googleapi.Error{
10206			Code:   res.StatusCode,
10207			Header: res.Header,
10208		}
10209	}
10210	if err != nil {
10211		return nil, err
10212	}
10213	defer googleapi.CloseBody(res)
10214	if err := googleapi.CheckResponse(res); err != nil {
10215		return nil, err
10216	}
10217	ret := &SslCertsInsertResponse{
10218		ServerResponse: googleapi.ServerResponse{
10219			Header:         res.Header,
10220			HTTPStatusCode: res.StatusCode,
10221		},
10222	}
10223	target := &ret
10224	if err := gensupport.DecodeResponse(target, res); err != nil {
10225		return nil, err
10226	}
10227	return ret, nil
10228	// {
10229	//   "description": "Creates an SSL certificate and returns it along with the private key and\nserver certificate authority.  The new certificate will not be usable until\nthe instance is restarted.",
10230	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts",
10231	//   "httpMethod": "POST",
10232	//   "id": "sql.sslCerts.insert",
10233	//   "parameterOrder": [
10234	//     "project",
10235	//     "instance"
10236	//   ],
10237	//   "parameters": {
10238	//     "instance": {
10239	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10240	//       "location": "path",
10241	//       "required": true,
10242	//       "type": "string"
10243	//     },
10244	//     "project": {
10245	//       "description": "Project ID of the project that contains the instance.",
10246	//       "location": "path",
10247	//       "required": true,
10248	//       "type": "string"
10249	//     }
10250	//   },
10251	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts",
10252	//   "request": {
10253	//     "$ref": "SslCertsInsertRequest"
10254	//   },
10255	//   "response": {
10256	//     "$ref": "SslCertsInsertResponse"
10257	//   },
10258	//   "scopes": [
10259	//     "https://www.googleapis.com/auth/cloud-platform",
10260	//     "https://www.googleapis.com/auth/sqlservice.admin"
10261	//   ]
10262	// }
10263
10264}
10265
10266// method id "sql.sslCerts.list":
10267
10268type SslCertsListCall struct {
10269	s            *Service
10270	project      string
10271	instance     string
10272	urlParams_   gensupport.URLParams
10273	ifNoneMatch_ string
10274	ctx_         context.Context
10275	header_      http.Header
10276}
10277
10278// List: Lists all of the current SSL certificates for the instance.
10279func (r *SslCertsService) List(project string, instance string) *SslCertsListCall {
10280	c := &SslCertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10281	c.project = project
10282	c.instance = instance
10283	return c
10284}
10285
10286// Fields allows partial responses to be retrieved. See
10287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10288// for more information.
10289func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall {
10290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10291	return c
10292}
10293
10294// IfNoneMatch sets the optional parameter which makes the operation
10295// fail if the object's ETag matches the given value. This is useful for
10296// getting updates only after the object has changed since the last
10297// request. Use googleapi.IsNotModified to check whether the response
10298// error from Do is the result of In-None-Match.
10299func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall {
10300	c.ifNoneMatch_ = entityTag
10301	return c
10302}
10303
10304// Context sets the context to be used in this call's Do method. Any
10305// pending HTTP request will be aborted if the provided context is
10306// canceled.
10307func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall {
10308	c.ctx_ = ctx
10309	return c
10310}
10311
10312// Header returns an http.Header that can be modified by the caller to
10313// add HTTP headers to the request.
10314func (c *SslCertsListCall) Header() http.Header {
10315	if c.header_ == nil {
10316		c.header_ = make(http.Header)
10317	}
10318	return c.header_
10319}
10320
10321func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) {
10322	reqHeaders := make(http.Header)
10323	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10324	for k, v := range c.header_ {
10325		reqHeaders[k] = v
10326	}
10327	reqHeaders.Set("User-Agent", c.s.userAgent())
10328	if c.ifNoneMatch_ != "" {
10329		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10330	}
10331	var body io.Reader = nil
10332	c.urlParams_.Set("alt", alt)
10333	c.urlParams_.Set("prettyPrint", "false")
10334	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts")
10335	urls += "?" + c.urlParams_.Encode()
10336	req, err := http.NewRequest("GET", urls, body)
10337	if err != nil {
10338		return nil, err
10339	}
10340	req.Header = reqHeaders
10341	googleapi.Expand(req.URL, map[string]string{
10342		"project":  c.project,
10343		"instance": c.instance,
10344	})
10345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10346}
10347
10348// Do executes the "sql.sslCerts.list" call.
10349// Exactly one of *SslCertsListResponse or error will be non-nil. Any
10350// non-2xx status code is an error. Response headers are in either
10351// *SslCertsListResponse.ServerResponse.Header or (if a response was
10352// returned at all) in error.(*googleapi.Error).Header. Use
10353// googleapi.IsNotModified to check whether the returned error was
10354// because http.StatusNotModified was returned.
10355func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error) {
10356	gensupport.SetOptions(c.urlParams_, opts...)
10357	res, err := c.doRequest("json")
10358	if res != nil && res.StatusCode == http.StatusNotModified {
10359		if res.Body != nil {
10360			res.Body.Close()
10361		}
10362		return nil, &googleapi.Error{
10363			Code:   res.StatusCode,
10364			Header: res.Header,
10365		}
10366	}
10367	if err != nil {
10368		return nil, err
10369	}
10370	defer googleapi.CloseBody(res)
10371	if err := googleapi.CheckResponse(res); err != nil {
10372		return nil, err
10373	}
10374	ret := &SslCertsListResponse{
10375		ServerResponse: googleapi.ServerResponse{
10376			Header:         res.Header,
10377			HTTPStatusCode: res.StatusCode,
10378		},
10379	}
10380	target := &ret
10381	if err := gensupport.DecodeResponse(target, res); err != nil {
10382		return nil, err
10383	}
10384	return ret, nil
10385	// {
10386	//   "description": "Lists all of the current SSL certificates for the instance.",
10387	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts",
10388	//   "httpMethod": "GET",
10389	//   "id": "sql.sslCerts.list",
10390	//   "parameterOrder": [
10391	//     "project",
10392	//     "instance"
10393	//   ],
10394	//   "parameters": {
10395	//     "instance": {
10396	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10397	//       "location": "path",
10398	//       "required": true,
10399	//       "type": "string"
10400	//     },
10401	//     "project": {
10402	//       "description": "Project ID of the project that contains the instance.",
10403	//       "location": "path",
10404	//       "required": true,
10405	//       "type": "string"
10406	//     }
10407	//   },
10408	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts",
10409	//   "response": {
10410	//     "$ref": "SslCertsListResponse"
10411	//   },
10412	//   "scopes": [
10413	//     "https://www.googleapis.com/auth/cloud-platform",
10414	//     "https://www.googleapis.com/auth/sqlservice.admin"
10415	//   ]
10416	// }
10417
10418}
10419
10420// method id "sql.tiers.list":
10421
10422type TiersListCall struct {
10423	s            *Service
10424	project      string
10425	urlParams_   gensupport.URLParams
10426	ifNoneMatch_ string
10427	ctx_         context.Context
10428	header_      http.Header
10429}
10430
10431// List: Lists all available machine types (tiers) for Cloud SQL, for
10432// example,
10433// db-n1-standard-1. For related information, see
10434// <a
10435// href="/sql/pricing">Pricing</a>.
10436func (r *TiersService) List(project string) *TiersListCall {
10437	c := &TiersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10438	c.project = project
10439	return c
10440}
10441
10442// Fields allows partial responses to be retrieved. See
10443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10444// for more information.
10445func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall {
10446	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10447	return c
10448}
10449
10450// IfNoneMatch sets the optional parameter which makes the operation
10451// fail if the object's ETag matches the given value. This is useful for
10452// getting updates only after the object has changed since the last
10453// request. Use googleapi.IsNotModified to check whether the response
10454// error from Do is the result of In-None-Match.
10455func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall {
10456	c.ifNoneMatch_ = entityTag
10457	return c
10458}
10459
10460// Context sets the context to be used in this call's Do method. Any
10461// pending HTTP request will be aborted if the provided context is
10462// canceled.
10463func (c *TiersListCall) Context(ctx context.Context) *TiersListCall {
10464	c.ctx_ = ctx
10465	return c
10466}
10467
10468// Header returns an http.Header that can be modified by the caller to
10469// add HTTP headers to the request.
10470func (c *TiersListCall) Header() http.Header {
10471	if c.header_ == nil {
10472		c.header_ = make(http.Header)
10473	}
10474	return c.header_
10475}
10476
10477func (c *TiersListCall) doRequest(alt string) (*http.Response, error) {
10478	reqHeaders := make(http.Header)
10479	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10480	for k, v := range c.header_ {
10481		reqHeaders[k] = v
10482	}
10483	reqHeaders.Set("User-Agent", c.s.userAgent())
10484	if c.ifNoneMatch_ != "" {
10485		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10486	}
10487	var body io.Reader = nil
10488	c.urlParams_.Set("alt", alt)
10489	c.urlParams_.Set("prettyPrint", "false")
10490	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/tiers")
10491	urls += "?" + c.urlParams_.Encode()
10492	req, err := http.NewRequest("GET", urls, body)
10493	if err != nil {
10494		return nil, err
10495	}
10496	req.Header = reqHeaders
10497	googleapi.Expand(req.URL, map[string]string{
10498		"project": c.project,
10499	})
10500	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10501}
10502
10503// Do executes the "sql.tiers.list" call.
10504// Exactly one of *TiersListResponse or error will be non-nil. Any
10505// non-2xx status code is an error. Response headers are in either
10506// *TiersListResponse.ServerResponse.Header or (if a response was
10507// returned at all) in error.(*googleapi.Error).Header. Use
10508// googleapi.IsNotModified to check whether the returned error was
10509// because http.StatusNotModified was returned.
10510func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error) {
10511	gensupport.SetOptions(c.urlParams_, opts...)
10512	res, err := c.doRequest("json")
10513	if res != nil && res.StatusCode == http.StatusNotModified {
10514		if res.Body != nil {
10515			res.Body.Close()
10516		}
10517		return nil, &googleapi.Error{
10518			Code:   res.StatusCode,
10519			Header: res.Header,
10520		}
10521	}
10522	if err != nil {
10523		return nil, err
10524	}
10525	defer googleapi.CloseBody(res)
10526	if err := googleapi.CheckResponse(res); err != nil {
10527		return nil, err
10528	}
10529	ret := &TiersListResponse{
10530		ServerResponse: googleapi.ServerResponse{
10531			Header:         res.Header,
10532			HTTPStatusCode: res.StatusCode,
10533		},
10534	}
10535	target := &ret
10536	if err := gensupport.DecodeResponse(target, res); err != nil {
10537		return nil, err
10538	}
10539	return ret, nil
10540	// {
10541	//   "description": "Lists all available machine types (tiers) for Cloud SQL, for example,\ndb-n1-standard-1. For related information, see \u003ca\nhref=\"/sql/pricing\"\u003ePricing\u003c/a\u003e.",
10542	//   "flatPath": "sql/v1beta4/projects/{project}/tiers",
10543	//   "httpMethod": "GET",
10544	//   "id": "sql.tiers.list",
10545	//   "parameterOrder": [
10546	//     "project"
10547	//   ],
10548	//   "parameters": {
10549	//     "project": {
10550	//       "description": "Project ID of the project for which to list tiers.",
10551	//       "location": "path",
10552	//       "required": true,
10553	//       "type": "string"
10554	//     }
10555	//   },
10556	//   "path": "sql/v1beta4/projects/{project}/tiers",
10557	//   "response": {
10558	//     "$ref": "TiersListResponse"
10559	//   },
10560	//   "scopes": [
10561	//     "https://www.googleapis.com/auth/cloud-platform",
10562	//     "https://www.googleapis.com/auth/sqlservice.admin"
10563	//   ]
10564	// }
10565
10566}
10567
10568// method id "sql.users.delete":
10569
10570type UsersDeleteCall struct {
10571	s          *Service
10572	project    string
10573	instance   string
10574	urlParams_ gensupport.URLParams
10575	ctx_       context.Context
10576	header_    http.Header
10577}
10578
10579// Delete: Deletes a user from a Cloud SQL instance.
10580func (r *UsersService) Delete(project string, instance string) *UsersDeleteCall {
10581	c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10582	c.project = project
10583	c.instance = instance
10584	return c
10585}
10586
10587// Host sets the optional parameter "host": Host of the user in the
10588// instance.
10589func (c *UsersDeleteCall) Host(host string) *UsersDeleteCall {
10590	c.urlParams_.Set("host", host)
10591	return c
10592}
10593
10594// Name sets the optional parameter "name": Name of the user in the
10595// instance.
10596func (c *UsersDeleteCall) Name(name string) *UsersDeleteCall {
10597	c.urlParams_.Set("name", name)
10598	return c
10599}
10600
10601// Fields allows partial responses to be retrieved. See
10602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10603// for more information.
10604func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
10605	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10606	return c
10607}
10608
10609// Context sets the context to be used in this call's Do method. Any
10610// pending HTTP request will be aborted if the provided context is
10611// canceled.
10612func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
10613	c.ctx_ = ctx
10614	return c
10615}
10616
10617// Header returns an http.Header that can be modified by the caller to
10618// add HTTP headers to the request.
10619func (c *UsersDeleteCall) Header() http.Header {
10620	if c.header_ == nil {
10621		c.header_ = make(http.Header)
10622	}
10623	return c.header_
10624}
10625
10626func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
10627	reqHeaders := make(http.Header)
10628	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10629	for k, v := range c.header_ {
10630		reqHeaders[k] = v
10631	}
10632	reqHeaders.Set("User-Agent", c.s.userAgent())
10633	var body io.Reader = nil
10634	c.urlParams_.Set("alt", alt)
10635	c.urlParams_.Set("prettyPrint", "false")
10636	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/users")
10637	urls += "?" + c.urlParams_.Encode()
10638	req, err := http.NewRequest("DELETE", urls, body)
10639	if err != nil {
10640		return nil, err
10641	}
10642	req.Header = reqHeaders
10643	googleapi.Expand(req.URL, map[string]string{
10644		"project":  c.project,
10645		"instance": c.instance,
10646	})
10647	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10648}
10649
10650// Do executes the "sql.users.delete" call.
10651// Exactly one of *Operation or error will be non-nil. Any non-2xx
10652// status code is an error. Response headers are in either
10653// *Operation.ServerResponse.Header or (if a response was returned at
10654// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10655// to check whether the returned error was because
10656// http.StatusNotModified was returned.
10657func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10658	gensupport.SetOptions(c.urlParams_, opts...)
10659	res, err := c.doRequest("json")
10660	if res != nil && res.StatusCode == http.StatusNotModified {
10661		if res.Body != nil {
10662			res.Body.Close()
10663		}
10664		return nil, &googleapi.Error{
10665			Code:   res.StatusCode,
10666			Header: res.Header,
10667		}
10668	}
10669	if err != nil {
10670		return nil, err
10671	}
10672	defer googleapi.CloseBody(res)
10673	if err := googleapi.CheckResponse(res); err != nil {
10674		return nil, err
10675	}
10676	ret := &Operation{
10677		ServerResponse: googleapi.ServerResponse{
10678			Header:         res.Header,
10679			HTTPStatusCode: res.StatusCode,
10680		},
10681	}
10682	target := &ret
10683	if err := gensupport.DecodeResponse(target, res); err != nil {
10684		return nil, err
10685	}
10686	return ret, nil
10687	// {
10688	//   "description": "Deletes a user from a Cloud SQL instance.",
10689	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users",
10690	//   "httpMethod": "DELETE",
10691	//   "id": "sql.users.delete",
10692	//   "parameterOrder": [
10693	//     "project",
10694	//     "instance"
10695	//   ],
10696	//   "parameters": {
10697	//     "host": {
10698	//       "description": "Host of the user in the instance.",
10699	//       "location": "query",
10700	//       "type": "string"
10701	//     },
10702	//     "instance": {
10703	//       "description": "Database instance ID. This does not include the project ID.",
10704	//       "location": "path",
10705	//       "required": true,
10706	//       "type": "string"
10707	//     },
10708	//     "name": {
10709	//       "description": "Name of the user in the instance.",
10710	//       "location": "query",
10711	//       "type": "string"
10712	//     },
10713	//     "project": {
10714	//       "description": "Project ID of the project that contains the instance.",
10715	//       "location": "path",
10716	//       "required": true,
10717	//       "type": "string"
10718	//     }
10719	//   },
10720	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/users",
10721	//   "response": {
10722	//     "$ref": "Operation"
10723	//   },
10724	//   "scopes": [
10725	//     "https://www.googleapis.com/auth/cloud-platform",
10726	//     "https://www.googleapis.com/auth/sqlservice.admin"
10727	//   ]
10728	// }
10729
10730}
10731
10732// method id "sql.users.insert":
10733
10734type UsersInsertCall struct {
10735	s          *Service
10736	project    string
10737	instance   string
10738	user       *User
10739	urlParams_ gensupport.URLParams
10740	ctx_       context.Context
10741	header_    http.Header
10742}
10743
10744// Insert: Creates a new user in a Cloud SQL instance.
10745func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall {
10746	c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10747	c.project = project
10748	c.instance = instance
10749	c.user = user
10750	return c
10751}
10752
10753// Fields allows partial responses to be retrieved. See
10754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10755// for more information.
10756func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
10757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10758	return c
10759}
10760
10761// Context sets the context to be used in this call's Do method. Any
10762// pending HTTP request will be aborted if the provided context is
10763// canceled.
10764func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
10765	c.ctx_ = ctx
10766	return c
10767}
10768
10769// Header returns an http.Header that can be modified by the caller to
10770// add HTTP headers to the request.
10771func (c *UsersInsertCall) Header() http.Header {
10772	if c.header_ == nil {
10773		c.header_ = make(http.Header)
10774	}
10775	return c.header_
10776}
10777
10778func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
10779	reqHeaders := make(http.Header)
10780	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10781	for k, v := range c.header_ {
10782		reqHeaders[k] = v
10783	}
10784	reqHeaders.Set("User-Agent", c.s.userAgent())
10785	var body io.Reader = nil
10786	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
10787	if err != nil {
10788		return nil, err
10789	}
10790	reqHeaders.Set("Content-Type", "application/json")
10791	c.urlParams_.Set("alt", alt)
10792	c.urlParams_.Set("prettyPrint", "false")
10793	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/users")
10794	urls += "?" + c.urlParams_.Encode()
10795	req, err := http.NewRequest("POST", urls, body)
10796	if err != nil {
10797		return nil, err
10798	}
10799	req.Header = reqHeaders
10800	googleapi.Expand(req.URL, map[string]string{
10801		"project":  c.project,
10802		"instance": c.instance,
10803	})
10804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10805}
10806
10807// Do executes the "sql.users.insert" call.
10808// Exactly one of *Operation or error will be non-nil. Any non-2xx
10809// status code is an error. Response headers are in either
10810// *Operation.ServerResponse.Header or (if a response was returned at
10811// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10812// to check whether the returned error was because
10813// http.StatusNotModified was returned.
10814func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10815	gensupport.SetOptions(c.urlParams_, opts...)
10816	res, err := c.doRequest("json")
10817	if res != nil && res.StatusCode == http.StatusNotModified {
10818		if res.Body != nil {
10819			res.Body.Close()
10820		}
10821		return nil, &googleapi.Error{
10822			Code:   res.StatusCode,
10823			Header: res.Header,
10824		}
10825	}
10826	if err != nil {
10827		return nil, err
10828	}
10829	defer googleapi.CloseBody(res)
10830	if err := googleapi.CheckResponse(res); err != nil {
10831		return nil, err
10832	}
10833	ret := &Operation{
10834		ServerResponse: googleapi.ServerResponse{
10835			Header:         res.Header,
10836			HTTPStatusCode: res.StatusCode,
10837		},
10838	}
10839	target := &ret
10840	if err := gensupport.DecodeResponse(target, res); err != nil {
10841		return nil, err
10842	}
10843	return ret, nil
10844	// {
10845	//   "description": "Creates a new user in a Cloud SQL instance.",
10846	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users",
10847	//   "httpMethod": "POST",
10848	//   "id": "sql.users.insert",
10849	//   "parameterOrder": [
10850	//     "project",
10851	//     "instance"
10852	//   ],
10853	//   "parameters": {
10854	//     "instance": {
10855	//       "description": "Database instance ID. This does not include the project ID.",
10856	//       "location": "path",
10857	//       "required": true,
10858	//       "type": "string"
10859	//     },
10860	//     "project": {
10861	//       "description": "Project ID of the project that contains the instance.",
10862	//       "location": "path",
10863	//       "required": true,
10864	//       "type": "string"
10865	//     }
10866	//   },
10867	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/users",
10868	//   "request": {
10869	//     "$ref": "User"
10870	//   },
10871	//   "response": {
10872	//     "$ref": "Operation"
10873	//   },
10874	//   "scopes": [
10875	//     "https://www.googleapis.com/auth/cloud-platform",
10876	//     "https://www.googleapis.com/auth/sqlservice.admin"
10877	//   ]
10878	// }
10879
10880}
10881
10882// method id "sql.users.list":
10883
10884type UsersListCall struct {
10885	s            *Service
10886	project      string
10887	instance     string
10888	urlParams_   gensupport.URLParams
10889	ifNoneMatch_ string
10890	ctx_         context.Context
10891	header_      http.Header
10892}
10893
10894// List: Lists users in the specified Cloud SQL instance.
10895func (r *UsersService) List(project string, instance string) *UsersListCall {
10896	c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10897	c.project = project
10898	c.instance = instance
10899	return c
10900}
10901
10902// Fields allows partial responses to be retrieved. See
10903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10904// for more information.
10905func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
10906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10907	return c
10908}
10909
10910// IfNoneMatch sets the optional parameter which makes the operation
10911// fail if the object's ETag matches the given value. This is useful for
10912// getting updates only after the object has changed since the last
10913// request. Use googleapi.IsNotModified to check whether the response
10914// error from Do is the result of In-None-Match.
10915func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
10916	c.ifNoneMatch_ = entityTag
10917	return c
10918}
10919
10920// Context sets the context to be used in this call's Do method. Any
10921// pending HTTP request will be aborted if the provided context is
10922// canceled.
10923func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
10924	c.ctx_ = ctx
10925	return c
10926}
10927
10928// Header returns an http.Header that can be modified by the caller to
10929// add HTTP headers to the request.
10930func (c *UsersListCall) Header() http.Header {
10931	if c.header_ == nil {
10932		c.header_ = make(http.Header)
10933	}
10934	return c.header_
10935}
10936
10937func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
10938	reqHeaders := make(http.Header)
10939	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10940	for k, v := range c.header_ {
10941		reqHeaders[k] = v
10942	}
10943	reqHeaders.Set("User-Agent", c.s.userAgent())
10944	if c.ifNoneMatch_ != "" {
10945		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10946	}
10947	var body io.Reader = nil
10948	c.urlParams_.Set("alt", alt)
10949	c.urlParams_.Set("prettyPrint", "false")
10950	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/users")
10951	urls += "?" + c.urlParams_.Encode()
10952	req, err := http.NewRequest("GET", urls, body)
10953	if err != nil {
10954		return nil, err
10955	}
10956	req.Header = reqHeaders
10957	googleapi.Expand(req.URL, map[string]string{
10958		"project":  c.project,
10959		"instance": c.instance,
10960	})
10961	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10962}
10963
10964// Do executes the "sql.users.list" call.
10965// Exactly one of *UsersListResponse or error will be non-nil. Any
10966// non-2xx status code is an error. Response headers are in either
10967// *UsersListResponse.ServerResponse.Header or (if a response was
10968// returned at all) in error.(*googleapi.Error).Header. Use
10969// googleapi.IsNotModified to check whether the returned error was
10970// because http.StatusNotModified was returned.
10971func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) {
10972	gensupport.SetOptions(c.urlParams_, opts...)
10973	res, err := c.doRequest("json")
10974	if res != nil && res.StatusCode == http.StatusNotModified {
10975		if res.Body != nil {
10976			res.Body.Close()
10977		}
10978		return nil, &googleapi.Error{
10979			Code:   res.StatusCode,
10980			Header: res.Header,
10981		}
10982	}
10983	if err != nil {
10984		return nil, err
10985	}
10986	defer googleapi.CloseBody(res)
10987	if err := googleapi.CheckResponse(res); err != nil {
10988		return nil, err
10989	}
10990	ret := &UsersListResponse{
10991		ServerResponse: googleapi.ServerResponse{
10992			Header:         res.Header,
10993			HTTPStatusCode: res.StatusCode,
10994		},
10995	}
10996	target := &ret
10997	if err := gensupport.DecodeResponse(target, res); err != nil {
10998		return nil, err
10999	}
11000	return ret, nil
11001	// {
11002	//   "description": "Lists users in the specified Cloud SQL instance.",
11003	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users",
11004	//   "httpMethod": "GET",
11005	//   "id": "sql.users.list",
11006	//   "parameterOrder": [
11007	//     "project",
11008	//     "instance"
11009	//   ],
11010	//   "parameters": {
11011	//     "instance": {
11012	//       "description": "Database instance ID. This does not include the project ID.",
11013	//       "location": "path",
11014	//       "required": true,
11015	//       "type": "string"
11016	//     },
11017	//     "project": {
11018	//       "description": "Project ID of the project that contains the instance.",
11019	//       "location": "path",
11020	//       "required": true,
11021	//       "type": "string"
11022	//     }
11023	//   },
11024	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/users",
11025	//   "response": {
11026	//     "$ref": "UsersListResponse"
11027	//   },
11028	//   "scopes": [
11029	//     "https://www.googleapis.com/auth/cloud-platform",
11030	//     "https://www.googleapis.com/auth/sqlservice.admin"
11031	//   ]
11032	// }
11033
11034}
11035
11036// method id "sql.users.update":
11037
11038type UsersUpdateCall struct {
11039	s          *Service
11040	project    string
11041	instance   string
11042	user       *User
11043	urlParams_ gensupport.URLParams
11044	ctx_       context.Context
11045	header_    http.Header
11046}
11047
11048// Update: Updates an existing user in a Cloud SQL instance.
11049func (r *UsersService) Update(project string, instance string, user *User) *UsersUpdateCall {
11050	c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11051	c.project = project
11052	c.instance = instance
11053	c.user = user
11054	return c
11055}
11056
11057// Host sets the optional parameter "host": Host of the user in the
11058// instance.
11059func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall {
11060	c.urlParams_.Set("host", host)
11061	return c
11062}
11063
11064// Name sets the optional parameter "name": Name of the user in the
11065// instance.
11066func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall {
11067	c.urlParams_.Set("name", name)
11068	return c
11069}
11070
11071// Fields allows partial responses to be retrieved. See
11072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11073// for more information.
11074func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
11075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11076	return c
11077}
11078
11079// Context sets the context to be used in this call's Do method. Any
11080// pending HTTP request will be aborted if the provided context is
11081// canceled.
11082func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
11083	c.ctx_ = ctx
11084	return c
11085}
11086
11087// Header returns an http.Header that can be modified by the caller to
11088// add HTTP headers to the request.
11089func (c *UsersUpdateCall) Header() http.Header {
11090	if c.header_ == nil {
11091		c.header_ = make(http.Header)
11092	}
11093	return c.header_
11094}
11095
11096func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
11097	reqHeaders := make(http.Header)
11098	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11099	for k, v := range c.header_ {
11100		reqHeaders[k] = v
11101	}
11102	reqHeaders.Set("User-Agent", c.s.userAgent())
11103	var body io.Reader = nil
11104	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
11105	if err != nil {
11106		return nil, err
11107	}
11108	reqHeaders.Set("Content-Type", "application/json")
11109	c.urlParams_.Set("alt", alt)
11110	c.urlParams_.Set("prettyPrint", "false")
11111	urls := googleapi.ResolveRelative(c.s.BasePath, "sql/v1beta4/projects/{project}/instances/{instance}/users")
11112	urls += "?" + c.urlParams_.Encode()
11113	req, err := http.NewRequest("PUT", urls, body)
11114	if err != nil {
11115		return nil, err
11116	}
11117	req.Header = reqHeaders
11118	googleapi.Expand(req.URL, map[string]string{
11119		"project":  c.project,
11120		"instance": c.instance,
11121	})
11122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11123}
11124
11125// Do executes the "sql.users.update" call.
11126// Exactly one of *Operation or error will be non-nil. Any non-2xx
11127// status code is an error. Response headers are in either
11128// *Operation.ServerResponse.Header or (if a response was returned at
11129// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11130// to check whether the returned error was because
11131// http.StatusNotModified was returned.
11132func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11133	gensupport.SetOptions(c.urlParams_, opts...)
11134	res, err := c.doRequest("json")
11135	if res != nil && res.StatusCode == http.StatusNotModified {
11136		if res.Body != nil {
11137			res.Body.Close()
11138		}
11139		return nil, &googleapi.Error{
11140			Code:   res.StatusCode,
11141			Header: res.Header,
11142		}
11143	}
11144	if err != nil {
11145		return nil, err
11146	}
11147	defer googleapi.CloseBody(res)
11148	if err := googleapi.CheckResponse(res); err != nil {
11149		return nil, err
11150	}
11151	ret := &Operation{
11152		ServerResponse: googleapi.ServerResponse{
11153			Header:         res.Header,
11154			HTTPStatusCode: res.StatusCode,
11155		},
11156	}
11157	target := &ret
11158	if err := gensupport.DecodeResponse(target, res); err != nil {
11159		return nil, err
11160	}
11161	return ret, nil
11162	// {
11163	//   "description": "Updates an existing user in a Cloud SQL instance.",
11164	//   "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users",
11165	//   "httpMethod": "PUT",
11166	//   "id": "sql.users.update",
11167	//   "parameterOrder": [
11168	//     "project",
11169	//     "instance"
11170	//   ],
11171	//   "parameters": {
11172	//     "host": {
11173	//       "description": "Optional. Host of the user in the instance.",
11174	//       "location": "query",
11175	//       "type": "string"
11176	//     },
11177	//     "instance": {
11178	//       "description": "Database instance ID. This does not include the project ID.",
11179	//       "location": "path",
11180	//       "required": true,
11181	//       "type": "string"
11182	//     },
11183	//     "name": {
11184	//       "description": "Name of the user in the instance.",
11185	//       "location": "query",
11186	//       "type": "string"
11187	//     },
11188	//     "project": {
11189	//       "description": "Project ID of the project that contains the instance.",
11190	//       "location": "path",
11191	//       "required": true,
11192	//       "type": "string"
11193	//     }
11194	//   },
11195	//   "path": "sql/v1beta4/projects/{project}/instances/{instance}/users",
11196	//   "request": {
11197	//     "$ref": "User"
11198	//   },
11199	//   "response": {
11200	//     "$ref": "Operation"
11201	//   },
11202	//   "scopes": [
11203	//     "https://www.googleapis.com/auth/cloud-platform",
11204	//     "https://www.googleapis.com/auth/sqlservice.admin"
11205	//   ]
11206	// }
11207
11208}
11209