blob: 5c2901f34af28d75ae7f4f59080d4e0660ddd27e [file] [log] [blame]
// Copyright 2018 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package sqladmin provides access to the Cloud SQL Admin API.
//
// See https://cloud.google.com/sql/docs/reference/latest
//
// Usage example:
//
// import "google.golang.org/api/sqladmin/v1beta4"
// ...
// sqladminService, err := sqladmin.New(oauthHttpClient)
package sqladmin // import "google.golang.org/api/sqladmin/v1beta4"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
const apiId = "sqladmin:v1beta4"
const apiName = "sqladmin"
const apiVersion = "v1beta4"
const basePath = "https://www.googleapis.com/sql/v1beta4/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// Manage your Google SQL Service instances
SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.BackupRuns = NewBackupRunsService(s)
s.Databases = NewDatabasesService(s)
s.Flags = NewFlagsService(s)
s.Instances = NewInstancesService(s)
s.Operations = NewOperationsService(s)
s.SslCerts = NewSslCertsService(s)
s.Tiers = NewTiersService(s)
s.Users = NewUsersService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
BackupRuns *BackupRunsService
Databases *DatabasesService
Flags *FlagsService
Instances *InstancesService
Operations *OperationsService
SslCerts *SslCertsService
Tiers *TiersService
Users *UsersService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewBackupRunsService(s *Service) *BackupRunsService {
rs := &BackupRunsService{s: s}
return rs
}
type BackupRunsService struct {
s *Service
}
func NewDatabasesService(s *Service) *DatabasesService {
rs := &DatabasesService{s: s}
return rs
}
type DatabasesService struct {
s *Service
}
func NewFlagsService(s *Service) *FlagsService {
rs := &FlagsService{s: s}
return rs
}
type FlagsService struct {
s *Service
}
func NewInstancesService(s *Service) *InstancesService {
rs := &InstancesService{s: s}
return rs
}
type InstancesService struct {
s *Service
}
func NewOperationsService(s *Service) *OperationsService {
rs := &OperationsService{s: s}
return rs
}
type OperationsService struct {
s *Service
}
func NewSslCertsService(s *Service) *SslCertsService {
rs := &SslCertsService{s: s}
return rs
}
type SslCertsService struct {
s *Service
}
func NewTiersService(s *Service) *TiersService {
rs := &TiersService{s: s}
return rs
}
type TiersService struct {
s *Service
}
func NewUsersService(s *Service) *UsersService {
rs := &UsersService{s: s}
return rs
}
type UsersService struct {
s *Service
}
// AclEntry: An entry for an Access Control list.
type AclEntry struct {
// ExpirationTime: The time when this access control entry expires in
// RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
ExpirationTime string `json:"expirationTime,omitempty"`
// Kind: This is always sql#aclEntry.
Kind string `json:"kind,omitempty"`
// Name: An optional label to identify this entry.
Name string `json:"name,omitempty"`
// Value: The whitelisted value for the access control list.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExpirationTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExpirationTime") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AclEntry) MarshalJSON() ([]byte, error) {
type NoMethod AclEntry
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ApiWarning: An Admin API warning message.
type ApiWarning struct {
// Code: Code to uniquely identify the warning type.
Code string `json:"code,omitempty"`
// Message: The warning message.
Message string `json:"message,omitempty"`
// ForceSendFields is a list of field names (e.g. "Code") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Code") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApiWarning) MarshalJSON() ([]byte, error) {
type NoMethod ApiWarning
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BackupConfiguration: Database instance backup configuration.
type BackupConfiguration struct {
// BinaryLogEnabled: Whether binary log is enabled. If backup
// configuration is disabled, binary log must be disabled as well.
BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"`
// Enabled: Whether this configuration is enabled.
Enabled bool `json:"enabled,omitempty"`
// Kind: This is always sql#backupConfiguration.
Kind string `json:"kind,omitempty"`
// ReplicationLogArchivingEnabled: Reserved for future use.
ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"`
// StartTime: Start time for the daily backup configuration in UTC
// timezone in the 24 hour format - HH:MM.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "BinaryLogEnabled") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BinaryLogEnabled") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *BackupConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod BackupConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BackupRun: A BackupRun resource.
type BackupRun struct {
// Description: The description of this run, only applicable to
// on-demand backups.
Description string `json:"description,omitempty"`
// EndTime: The time the backup operation completed in UTC timezone in
// RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
EndTime string `json:"endTime,omitempty"`
// EnqueuedTime: The time the run was enqueued in UTC timezone in RFC
// 3339 format, for example 2012-11-15T16:19:00.094Z.
EnqueuedTime string `json:"enqueuedTime,omitempty"`
// Error: Information about why the backup operation failed. This is
// only present if the run has the FAILED status.
Error *OperationError `json:"error,omitempty"`
// Id: The identifier for this backup run. Unique only for a specific
// Cloud SQL instance.
Id int64 `json:"id,omitempty,string"`
// Instance: Name of the database instance.
Instance string `json:"instance,omitempty"`
// Kind: This is always sql#backupRun.
Kind string `json:"kind,omitempty"`
// SelfLink: The URI of this resource.
SelfLink string `json:"selfLink,omitempty"`
// StartTime: The time the backup operation actually started in UTC
// timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
StartTime string `json:"startTime,omitempty"`
// Status: The status of this run.
Status string `json:"status,omitempty"`
// Type: The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
Type string `json:"type,omitempty"`
// WindowStartTime: The start time of the backup window during which
// this the backup was attempted in RFC 3339 format, for example
// 2012-11-15T16:19:00.094Z.
WindowStartTime string `json:"windowStartTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BackupRun) MarshalJSON() ([]byte, error) {
type NoMethod BackupRun
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BackupRunsListResponse: Backup run list results.
type BackupRunsListResponse struct {
// Items: A list of backup runs in reverse chronological order of the
// enqueued time.
Items []*BackupRun `json:"items,omitempty"`
// Kind: This is always sql#backupRunsList.
Kind string `json:"kind,omitempty"`
// NextPageToken: The continuation token, used to page through large
// result sets. Provide this value in a subsequent request to return the
// next page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod BackupRunsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BinLogCoordinates: Binary log coordinates.
type BinLogCoordinates struct {
// BinLogFileName: Name of the binary log file for a Cloud SQL instance.
BinLogFileName string `json:"binLogFileName,omitempty"`
// BinLogPosition: Position (offset) within the binary log file.
BinLogPosition int64 `json:"binLogPosition,omitempty,string"`
// Kind: This is always sql#binLogCoordinates.
Kind string `json:"kind,omitempty"`
// ForceSendFields is a list of field names (e.g. "BinLogFileName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BinLogFileName") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *BinLogCoordinates) MarshalJSON() ([]byte, error) {
type NoMethod BinLogCoordinates
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloneContext: Database instance clone context.
type CloneContext struct {
// BinLogCoordinates: Binary log coordinates, if specified, identify the
// position up to which the source instance should be cloned. If not
// specified, the source instance is cloned up to the most recent binary
// log coordinates.
BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"`
// DestinationInstanceName: Name of the Cloud SQL instance to be created
// as a clone.
DestinationInstanceName string `json:"destinationInstanceName,omitempty"`
// Kind: This is always sql#cloneContext.
Kind string `json:"kind,omitempty"`
// PitrTimestampMs: Reserved for future use.
PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "BinLogCoordinates")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BinLogCoordinates") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CloneContext) MarshalJSON() ([]byte, error) {
type NoMethod CloneContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Database: Represents a SQL database on the Cloud SQL instance.
type Database struct {
// Charset: The MySQL charset value.
Charset string `json:"charset,omitempty"`
// Collation: The MySQL collation value.
Collation string `json:"collation,omitempty"`
// Etag: This field is deprecated and will be removed from a future
// version of the API.
Etag string `json:"etag,omitempty"`
// Instance: The name of the Cloud SQL instance. This does not include
// the project ID.
Instance string `json:"instance,omitempty"`
// Kind: This is always sql#database.
Kind string `json:"kind,omitempty"`
// Name: The name of the database in the Cloud SQL instance. This does
// not include the project ID or instance name.
Name string `json:"name,omitempty"`
// Project: The project ID of the project containing the Cloud SQL
// database. The Google apps domain is prefixed if applicable.
Project string `json:"project,omitempty"`
// SelfLink: The URI of this resource.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Charset") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Charset") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Database) MarshalJSON() ([]byte, error) {
type NoMethod Database
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DatabaseFlags: Database flags for Cloud SQL instances.
type DatabaseFlags struct {
// Name: The name of the flag. These flags are passed at instance
// startup, so include both server options and system variables for
// MySQL. Flags should be specified with underscores, not hyphens. For
// more information, see Configuring Database Flags in the Cloud SQL
// documentation.
Name string `json:"name,omitempty"`
// Value: The value of the flag. Booleans should be set to on for true
// and off for false. This field must be omitted if the flag doesn't
// take a value.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DatabaseFlags) MarshalJSON() ([]byte, error) {
type NoMethod DatabaseFlags
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DatabaseInstance: A Cloud SQL instance resource.
type DatabaseInstance struct {
// BackendType: FIRST_GEN: First Generation instance. MySQL
// only.
// SECOND_GEN: Second Generation instance or PostgreSQL
// instance.
// EXTERNAL: A database server that is not managed by Google.
// This property is read-only; use the tier property in the settings
// object to determine the database type and Second or First Generation.
BackendType string `json:"backendType,omitempty"`
// ConnectionName: Connection name of the Cloud SQL instance used in
// connection strings.
ConnectionName string `json:"connectionName,omitempty"`
// CurrentDiskSize: The current disk usage of the instance in bytes.
// This property has been deprecated. Users should use the
// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
// Monitoring API instead. Please see this announcement for details.
CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"`
// DatabaseVersion: The database engine type and version. The
// databaseVersion field can not be changed after instance creation.
// MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6.
// PostgreSQL instances: POSTGRES_9_6 MySQL First Generation instances:
// MYSQL_5_6 (default) or MYSQL_5_5
DatabaseVersion string `json:"databaseVersion,omitempty"`
// Etag: This field is deprecated and will be removed from a future
// version of the API. Use the settings.settingsVersion field instead.
Etag string `json:"etag,omitempty"`
// FailoverReplica: The name and status of the failover replica. This
// property is applicable only to Second Generation instances.
FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"`
// GceZone: The Compute Engine zone that the instance is currently
// serving from. This value could be different from the zone that was
// specified when the instance was created if the instance has failed
// over to its secondary zone.
GceZone string `json:"gceZone,omitempty"`
// InstanceType: The instance type. This can be one of the
// following.
// CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from
// a master.
// ON_PREMISES_INSTANCE: An instance running on the customer's
// premises.
// READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a
// read-replica.
InstanceType string `json:"instanceType,omitempty"`
// IpAddresses: The assigned IP addresses for the instance.
IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
// Ipv6Address: The IPv6 address assigned to the instance. This property
// is applicable only to First Generation instances.
Ipv6Address string `json:"ipv6Address,omitempty"`
// Kind: This is always sql#instance.
Kind string `json:"kind,omitempty"`
// MasterInstanceName: The name of the instance which will act as master
// in the replication setup.
MasterInstanceName string `json:"masterInstanceName,omitempty"`
// MaxDiskSize: The maximum disk size of the instance in bytes.
MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"`
// Name: Name of the Cloud SQL instance. This does not include the
// project ID.
Name string `json:"name,omitempty"`
// OnPremisesConfiguration: Configuration specific to on-premises
// instances.
OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"`
// Project: The project ID of the project containing the Cloud SQL
// instance. The Google apps domain is prefixed if applicable.
Project string `json:"project,omitempty"`
// Region: The geographical region. Can be us-central (FIRST_GEN
// instances only), us-central1 (SECOND_GEN instances only), asia-east1
// or europe-west1. Defaults to us-central or us-central1 depending on
// the instance type (First Generation or Second Generation). The region
// can not be changed after instance creation.
Region string `json:"region,omitempty"`
// ReplicaConfiguration: Configuration specific to failover replicas and
// read replicas.
ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"`
// ReplicaNames: The replicas of the instance.
ReplicaNames []string `json:"replicaNames,omitempty"`
// SelfLink: The URI of this resource.
SelfLink string `json:"selfLink,omitempty"`
// ServerCaCert: SSL configuration.
ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
// ServiceAccountEmailAddress: The service account email address
// assigned to the instance. This property is applicable only to Second
// Generation instances.
ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`
// Settings: The user settings.
Settings *Settings `json:"settings,omitempty"`
// State: The current serving state of the Cloud SQL instance. This can
// be one of the following.
// RUNNABLE: The instance is running, or is ready to run when
// accessed.
// SUSPENDED: The instance is not available, for example due to problems
// with billing.
// PENDING_CREATE: The instance is being created.
// MAINTENANCE: The instance is down for maintenance.
// FAILED: The instance creation failed.
// UNKNOWN_STATE: The state of the instance is unknown.
State string `json:"state,omitempty"`
// SuspensionReason: If the instance state is SUSPENDED, the reason for
// the suspension.
SuspensionReason []string `json:"suspensionReason,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "BackendType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BackendType") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DatabaseInstance) MarshalJSON() ([]byte, error) {
type NoMethod DatabaseInstance
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DatabaseInstanceFailoverReplica: The name and status of the failover
// replica. This property is applicable only to Second Generation
// instances.
type DatabaseInstanceFailoverReplica struct {
// Available: The availability status of the failover replica. A false
// status indicates that the failover replica is out of sync. The master
// can only failover to the falover replica when the status is true.
Available bool `json:"available,omitempty"`
// Name: The name of the failover replica. If specified at instance
// creation, a failover replica is created for the instance. The name
// doesn't include the project ID. This property is applicable only to
// Second Generation instances.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Available") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Available") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) {
type NoMethod DatabaseInstanceFailoverReplica
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DatabasesListResponse: Database list response.
type DatabasesListResponse struct {
// Items: List of database resources in the instance.
Items []*Database `json:"items,omitempty"`
// Kind: This is always sql#databasesList.
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DatabasesListResponse) MarshalJSON() ([]byte, error) {
type NoMethod DatabasesListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DemoteMasterConfiguration: Read-replica configuration for connecting
// to the on-premises master.
type DemoteMasterConfiguration struct {
// Kind: This is always sql#demoteMasterConfiguration.
Kind string `json:"kind,omitempty"`
// MysqlReplicaConfiguration: MySQL specific configuration when
// replicating from a MySQL on-premises master. Replication
// configuration information such as the username, password,
// certificates, and keys are not stored in the instance metadata. The
// configuration information is used only to set up the replication
// connection and is stored by MySQL in a file named master.info in the
// data directory.
MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod DemoteMasterConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DemoteMasterContext: Database instance demote master context.
type DemoteMasterContext struct {
// Kind: This is always sql#demoteMasterContext.
Kind string `json:"kind,omitempty"`
// MasterInstanceName: The name of the instance which will act as
// on-premises master in the replication setup.
MasterInstanceName string `json:"masterInstanceName,omitempty"`
// ReplicaConfiguration: Configuration specific to read-replicas
// replicating from the on-premises master.
ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"`
// VerifyGtidConsistency: Verify GTID consistency for demote operation.
// Default value: True. Second Generation instances only. Setting this
// flag to false enables you to bypass GTID consistency check between
// on-premises master and Cloud SQL instance during the demotion
// operation but also exposes you to the risk of future replication
// failures. Change the value only if you know the reason for the GTID
// divergence and are confident that doing so will not cause any
// replication issues.
VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DemoteMasterContext) MarshalJSON() ([]byte, error) {
type NoMethod DemoteMasterContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DemoteMasterMySqlReplicaConfiguration: Read-replica configuration
// specific to MySQL databases.
type DemoteMasterMySqlReplicaConfiguration struct {
// CaCertificate: PEM representation of the trusted CA's x509
// certificate.
CaCertificate string `json:"caCertificate,omitempty"`
// ClientCertificate: PEM representation of the slave's x509
// certificate.
ClientCertificate string `json:"clientCertificate,omitempty"`
// ClientKey: PEM representation of the slave's private key. The
// corresponsing public key is encoded in the client's certificate. The
// format of the slave's private key can be either PKCS #1 or PKCS #8.
ClientKey string `json:"clientKey,omitempty"`
// Kind: This is always sql#demoteMasterMysqlReplicaConfiguration.
Kind string `json:"kind,omitempty"`
// Password: The password for the replication connection.
Password string `json:"password,omitempty"`
// Username: The username for the replication connection.
Username string `json:"username,omitempty"`
// ForceSendFields is a list of field names (e.g. "CaCertificate") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CaCertificate") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod DemoteMasterMySqlReplicaConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ExportContext: Database instance export context.
type ExportContext struct {
// CsvExportOptions: Options for exporting data as CSV.
// Exporting in CSV format using the Cloud SQL Admin API is not
// supported for PostgreSQL instances.
CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"`
// Databases: Databases to be exported.
// MySQL instances: If fileType is SQL and no database is specified, all
// databases are exported, except for the mysql system database. If
// fileType is CSV, you can specify one database, either by using this
// property or by using the csvExportOptions.selectQuery property, which
// takes precedence over this property.
// PostgreSQL instances: If fileType is SQL, you must specify one
// database to be exported. A fileType of CSV is not supported for
// PostgreSQL instances.
Databases []string `json:"databases,omitempty"`
// FileType: The file type for the specified uri.
// SQL: The file contains SQL statements.
// CSV: The file contains CSV data.
// CSV is not supported for PostgreSQL instances.
FileType string `json:"fileType,omitempty"`
// Kind: This is always sql#exportContext.
Kind string `json:"kind,omitempty"`
// SqlExportOptions: Options for exporting data as SQL statements.
SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"`
// Uri: The path to the file in Google Cloud Storage where the export
// will be stored. The URI is in the form gs://bucketName/fileName. If
// the file already exists, the requests succeeds, but the operation
// fails. If fileType is SQL and the filename ends with .gz, the
// contents are compressed.
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "CsvExportOptions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CsvExportOptions") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ExportContext) MarshalJSON() ([]byte, error) {
type NoMethod ExportContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ExportContextCsvExportOptions: Options for exporting data as
// CSV.
// Exporting in CSV format using the Cloud SQL Admin API is not
// supported for PostgreSQL instances.
type ExportContextCsvExportOptions struct {
// SelectQuery: The select query used to extract the data.
SelectQuery string `json:"selectQuery,omitempty"`
// ForceSendFields is a list of field names (e.g. "SelectQuery") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SelectQuery") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) {
type NoMethod ExportContextCsvExportOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ExportContextSqlExportOptions: Options for exporting data as SQL
// statements.
type ExportContextSqlExportOptions struct {
// MysqlExportOptions: Options for exporting from MySQL.
MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"`
// SchemaOnly: Export only schemas.
SchemaOnly bool `json:"schemaOnly,omitempty"`
// Tables: Tables to export, or that were exported, from the specified
// database. If you specify tables, specify one and only one database.
// For PostgreSQL instances, you can specify only one table.
Tables []string `json:"tables,omitempty"`
// ForceSendFields is a list of field names (e.g. "MysqlExportOptions")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "MysqlExportOptions") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) {
type NoMethod ExportContextSqlExportOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ExportContextSqlExportOptionsMysqlExportOptions: Options for
// exporting from MySQL.
type ExportContextSqlExportOptionsMysqlExportOptions struct {
// MasterData: Option to include SQL statement required to set up
// replication. If set to 1, the dump file includes a CHANGE MASTER TO
// statement with the binary log coordinates. If set to 2, the CHANGE
// MASTER TO statement is written as a SQL comment, and has no effect.
// All other values are ignored.
MasterData int64 `json:"masterData,omitempty"`
// ForceSendFields is a list of field names (e.g. "MasterData") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "MasterData") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error) {
type NoMethod ExportContextSqlExportOptionsMysqlExportOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FailoverContext: Database instance failover context.
type FailoverContext struct {
// Kind: This is always sql#failoverContext.
Kind string `json:"kind,omitempty"`
// SettingsVersion: The current settings version of this instance.
// Request will be rejected if this version doesn't match the current
// settings version.
SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FailoverContext) MarshalJSON() ([]byte, error) {
type NoMethod FailoverContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Flag: A flag resource.
type Flag struct {
// AllowedStringValues: For STRING flags, a list of strings that the
// value can be set to.
AllowedStringValues []string `json:"allowedStringValues,omitempty"`
// AppliesTo: The database version this flag applies to. Can be
// MYSQL_5_5, MYSQL_5_6, or MYSQL_5_7. MYSQL_5_7 is applicable only to
// Second Generation instances.
AppliesTo []string `json:"appliesTo,omitempty"`
// Kind: This is always sql#flag.
Kind string `json:"kind,omitempty"`
// MaxValue: For INTEGER flags, the maximum allowed value.
MaxValue int64 `json:"maxValue,omitempty,string"`
// MinValue: For INTEGER flags, the minimum allowed value.
MinValue int64 `json:"minValue,omitempty,string"`
// Name: This is the name of the flag. Flag names always use
// underscores, not hyphens, e.g. max_allowed_packet
Name string `json:"name,omitempty"`
// RequiresRestart: Indicates whether changing this flag will trigger a
// database restart. Only applicable to Second Generation instances.
RequiresRestart bool `json:"requiresRestart,omitempty"`
// Type: The type of the flag. Flags are typed to being BOOLEAN, STRING,
// INTEGER or NONE. NONE is used for flags which do not take a value,
// such as skip_grant_tables.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "AllowedStringValues")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AllowedStringValues") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Flag) MarshalJSON() ([]byte, error) {
type NoMethod Flag
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FlagsListResponse: Flags list response.
type FlagsListResponse struct {
// Items: List of flags.
Items []*Flag `json:"items,omitempty"`
// Kind: This is always sql#flagsList.
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FlagsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod FlagsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ImportContext: Database instance import context.
type ImportContext struct {
// CsvImportOptions: Options for importing data as CSV.
// Importing CSV data using the Cloud SQL Admin API is not supported for
// PostgreSQL instances.
CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"`
// Database: The target database for the import. If fileType is SQL,
// this field is required only if the import file does not specify a
// database, and is overridden by any database specification in the
// import file. If fileType is CSV, one database must be specified.
Database string `json:"database,omitempty"`
// FileType: The file type for the specified uri.
// SQL: The file contains SQL statements.
// CSV: The file contains CSV data.
// Importing CSV data using the Cloud SQL Admin API is not supported for
// PostgreSQL instances.
FileType string `json:"fileType,omitempty"`
// ImportUser: The PostgreSQL user for this import operation. Defaults
// to cloudsqlsuperuser. PostgreSQL instances only.
ImportUser string `json:"importUser,omitempty"`
// Kind: This is always sql#importContext.
Kind string `json:"kind,omitempty"`
// Uri: Path to the import file in Cloud Storage, in the form
// gs://bucketName/fileName. Compressed gzip files (.gz) are supported
// when fileType is SQL. The instance must have write permissions to the
// bucket and read access to the file.
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "CsvImportOptions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CsvImportOptions") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ImportContext) MarshalJSON() ([]byte, error) {
type NoMethod ImportContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ImportContextCsvImportOptions: Options for importing data as
// CSV.
// Importing CSV data using the Cloud SQL Admin API is not supported for
// PostgreSQL instances.
type ImportContextCsvImportOptions struct {
// Columns: The columns to which CSV data is imported. If not specified,
// all columns of the database table are loaded with CSV data.
Columns []string `json:"columns,omitempty"`
// Table: The table to which CSV data is imported.
Table string `json:"table,omitempty"`
// ForceSendFields is a list of field names (e.g. "Columns") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Columns") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) {
type NoMethod ImportContextCsvImportOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesCloneRequest: Database instance clone request.
type InstancesCloneRequest struct {
// CloneContext: Contains details about the clone operation.
CloneContext *CloneContext `json:"cloneContext,omitempty"`
// ForceSendFields is a list of field names (e.g. "CloneContext") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CloneContext") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesCloneRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesDemoteMasterRequest: Database demote master request.
type InstancesDemoteMasterRequest struct {
// DemoteMasterContext: Contains details about the demoteMaster
// operation.
DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"`
// ForceSendFields is a list of field names (e.g. "DemoteMasterContext")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DemoteMasterContext") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesDemoteMasterRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesExportRequest: Database instance export request.
type InstancesExportRequest struct {
// ExportContext: Contains details about the export operation.
ExportContext *ExportContext `json:"exportContext,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExportContext") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExportContext") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstancesExportRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesExportRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesFailoverRequest: Instance failover request.
type InstancesFailoverRequest struct {
// FailoverContext: Failover Context.
FailoverContext *FailoverContext `json:"failoverContext,omitempty"`
// ForceSendFields is a list of field names (e.g. "FailoverContext") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FailoverContext") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesFailoverRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesImportRequest: Database instance import request.
type InstancesImportRequest struct {
// ImportContext: Contains details about the import operation.
ImportContext *ImportContext `json:"importContext,omitempty"`
// ForceSendFields is a list of field names (e.g. "ImportContext") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ImportContext") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstancesImportRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesImportRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesListResponse: Database instances list response.
type InstancesListResponse struct {
// Items: List of database instance resources.
Items []*DatabaseInstance `json:"items,omitempty"`
// Kind: This is always sql#instancesList.
Kind string `json:"kind,omitempty"`
// NextPageToken: The continuation token, used to page through large
// result sets. Provide this value in a subsequent request to return the
// next page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// Warnings: List of warnings that ocurred while handling the request.
Warnings []*ApiWarning `json:"warnings,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstancesListResponse) MarshalJSON() ([]byte, error) {
type NoMethod InstancesListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesListServerCasResponse: Instances ListServerCas response.
type InstancesListServerCasResponse struct {
ActiveVersion string `json:"activeVersion,omitempty"`
// Certs: List of server CA certificates for the instance.
Certs []*SslCert `json:"certs,omitempty"`
// Kind: This is always sql#instancesListServerCas.
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ActiveVersion") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ActiveVersion") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error) {
type NoMethod InstancesListServerCasResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesRestoreBackupRequest: Database instance restore backup
// request.
type InstancesRestoreBackupRequest struct {
// RestoreBackupContext: Parameters required to perform the restore
// backup operation.
RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "RestoreBackupContext") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "RestoreBackupContext") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesRestoreBackupRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesRotateServerCaRequest: Rotate Server CA request.
type InstancesRotateServerCaRequest struct {
// RotateServerCaContext: Contains details about the rotate server CA
// operation.
RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "RotateServerCaContext") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "RotateServerCaContext") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesRotateServerCaRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstancesTruncateLogRequest: Instance truncate log request.
type InstancesTruncateLogRequest struct {
// TruncateLogContext: Contains details about the truncate log
// operation.
TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"`
// ForceSendFields is a list of field names (e.g. "TruncateLogContext")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "TruncateLogContext") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error) {
type NoMethod InstancesTruncateLogRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// IpConfiguration: IP Management configuration.
type IpConfiguration struct {
// AuthorizedNetworks: The list of external networks that are allowed to
// connect to the instance using the IP. In CIDR notation, also known as
// 'slash' notation (e.g. 192.168.100.0/24).
AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"`
// Ipv4Enabled: Whether the instance should be assigned an IP address or
// not.
Ipv4Enabled bool `json:"ipv4Enabled,omitempty"`
// PrivateNetwork: The resource link for the VPC network from which the
// Cloud SQL instance is accessible for private IP. For example,
// /projects/myProject/global/networks/default. This setting can be
// updated, but it cannot be removed after it is set.
PrivateNetwork string `json:"privateNetwork,omitempty"`
// RequireSsl: Whether SSL connections over IP should be enforced or
// not.
RequireSsl bool `json:"requireSsl,omitempty"`
// ForceSendFields is a list of field names (e.g. "AuthorizedNetworks")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AuthorizedNetworks") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *IpConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod IpConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// IpMapping: Database instance IP Mapping.
type IpMapping struct {
// IpAddress: The IP address assigned.
IpAddress string `json:"ipAddress,omitempty"`
// TimeToRetire: The due time for this IP to be retired in RFC 3339
// format, for example 2012-11-15T16:19:00.094Z. This field is only
// available when the IP is scheduled to be retired.
TimeToRetire string `json:"timeToRetire,omitempty"`
// Type: The type of this IP address. A PRIMARY address is an address
// that can accept incoming connections. An OUTGOING address is the
// source address of connections originating from the instance, if
// supported.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "IpAddress") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IpAddress") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *IpMapping) MarshalJSON() ([]byte, error) {
type NoMethod IpMapping
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// LocationPreference: Preferred location. This specifies where a Cloud
// SQL instance should preferably be located, either in a specific
// Compute Engine zone, or co-located with an App Engine application.
// Note that if the preferred location is not available, the instance
// will be located as close as possible within the region. Only one
// location may be specified.
type LocationPreference struct {
// FollowGaeApplication: The AppEngine application to follow, it must be
// in the same region as the Cloud SQL instance.
FollowGaeApplication string `json:"followGaeApplication,omitempty"`
// Kind: This is always sql#locationPreference.
Kind string `json:"kind,omitempty"`
// Zone: The preferred Compute Engine zone (e.g. us-central1-a,
// us-central1-b, etc.).
Zone string `json:"zone,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "FollowGaeApplication") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FollowGaeApplication") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *LocationPreference) MarshalJSON() ([]byte, error) {
type NoMethod LocationPreference
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MaintenanceWindow: Maintenance window. This specifies when a v2 Cloud
// SQL instance should preferably be restarted for system maintenance
// purposes.
type MaintenanceWindow struct {
// Day: day of week (1-7), starting on Monday.
Day int64 `json:"day,omitempty"`
// Hour: hour of day - 0 to 23.
Hour int64 `json:"hour,omitempty"`
// Kind: This is always sql#maintenanceWindow.
Kind string `json:"kind,omitempty"`
// UpdateTrack: Maintenance timing setting: canary (Earlier) or stable
// (Later).
// Learn more.
UpdateTrack string `json:"updateTrack,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Day") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
type NoMethod MaintenanceWindow
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MySqlReplicaConfiguration: Read-replica configuration specific to
// MySQL databases.
type MySqlReplicaConfiguration struct {
// CaCertificate: PEM representation of the trusted CA's x509
// certificate.
CaCertificate string `json:"caCertificate,omitempty"`
// ClientCertificate: PEM representation of the slave's x509
// certificate.
ClientCertificate string `json:"clientCertificate,omitempty"`
// ClientKey: PEM representation of the slave's private key. The
// corresponsing public key is encoded in the client's certificate.
ClientKey string `json:"clientKey,omitempty"`
// ConnectRetryInterval: Seconds to wait between connect retries.
// MySQL's default is 60 seconds.
ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"`
// DumpFilePath: Path to a SQL dump file in Google Cloud Storage from
// which the slave instance is to be created. The URI is in the form
// gs://bucketName/fileName. Compressed gzip files (.gz) are also
// supported. Dumps should have the binlog co-ordinates from which
// replication should begin. This can be accomplished by setting
// --master-data to 1 when using mysqldump.
DumpFilePath string `json:"dumpFilePath,omitempty"`
// Kind: This is always sql#mysqlReplicaConfiguration.
Kind string `json:"kind,omitempty"`
// MasterHeartbeatPeriod: Interval in milliseconds between replication
// heartbeats.
MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"`
// Password: The password for the replication connection.
Password string `json:"password,omitempty"`
// SslCipher: A list of permissible ciphers to use for SSL encryption.
SslCipher string `json:"sslCipher,omitempty"`
// Username: The username for the replication connection.
Username string `json:"username,omitempty"`
// VerifyServerCertificate: Whether or not to check the master's Common
// Name value in the certificate that it sends during the SSL handshake.
VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"`
// ForceSendFields is a list of field names (e.g. "CaCertificate") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CaCertificate") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod MySqlReplicaConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// OnPremisesConfiguration: On-premises instance configuration.
type OnPremisesConfiguration struct {
// HostPort: The host and port of the on-premises instance in host:port
// format
HostPort string `json:"hostPort,omitempty"`
// Kind: This is always sql#onPremisesConfiguration.
Kind string `json:"kind,omitempty"`
// ForceSendFields is a list of field names (e.g. "HostPort") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HostPort") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod OnPremisesConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Operation: An Operation resource. For successful operations that
// return an Operation resource, only the fields relevant to the
// operation are populated in the resource.
type Operation struct {
// EndTime: The time this operation finished in UTC timezone in RFC 3339
// format, for example 2012-11-15T16:19:00.094Z.
EndTime string `json:"endTime,omitempty"`
// Error: If errors occurred during processing of this operation, this
// field will be populated.
Error *OperationErrors `json:"error,omitempty"`
// ExportContext: The context for export operation, if applicable.
ExportContext *ExportContext `json:"exportContext,omitempty"`
// ImportContext: The context for import operation, if applicable.
ImportContext *ImportContext `json:"importContext,omitempty"`
// InsertTime: The time this operation was enqueued in UTC timezone in
// RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
InsertTime string `json:"insertTime,omitempty"`
// Kind: This is always sql#operation.
Kind string `json:"kind,omitempty"`
// Name: An identifier that uniquely identifies the operation. You can
// use this identifier to retrieve the Operations resource that has
// information about the operation.
Name string `json:"name,omitempty"`
// OperationType: The type of the operation. Valid values are CREATE,
// DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME,
// RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE,
// DELETE_DATABASE .
OperationType string `json:"operationType,omitempty"`
// SelfLink: The URI of this resource.
SelfLink string `json:"selfLink,omitempty"`
// StartTime: The time this operation actually started in UTC timezone
// in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
StartTime string `json:"startTime,omitempty"`
// Status: The status of an operation. Valid values are PENDING,
// RUNNING, DONE, UNKNOWN.
Status string `json:"status,omitempty"`
// TargetId: Name of the database instance related to this operation.
TargetId string `json:"targetId,omitempty"`
TargetLink string `json:"targetLink,omitempty"`
// TargetProject: The project ID of the target instance related to this
// operation.
TargetProject string `json:"targetProject,omitempty"`
// User: The email address of the user who initiated this operation.
User string `json:"user,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "EndTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EndTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Operation) MarshalJSON() ([]byte, error) {
type NoMethod Operation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// OperationError: Database instance operation error.
type OperationError struct {
// Code: Identifies the specific error that occurred.
Code string `json:"code,omitempty"`
// Kind: This is always sql#operationError.
Kind string `json:"kind,omitempty"`
// Message: Additional information about the error encountered.
Message string `json:"message,omitempty"`
// ForceSendFields is a list of field names (e.g. "Code") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Code") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OperationError) MarshalJSON() ([]byte, error) {
type NoMethod OperationError
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// OperationErrors: Database instance operation errors list wrapper.
type OperationErrors struct {
// Errors: The list of errors encountered while processing this
// operation.
Errors []*OperationError `json:"errors,omitempty"`
// Kind: This is always sql#operationErrors.
Kind string `json:"kind,omitempty"`
// ForceSendFields is a list of field names (e.g. "Errors") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Errors") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OperationErrors) MarshalJSON() ([]byte, error) {
type NoMethod OperationErrors
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// OperationsListResponse: Database instance list operations response.
type OperationsListResponse struct {
// Items: List of operation resources.
Items []*Operation `json:"items,omitempty"`
// Kind: This is always sql#operationsList.
Kind string `json:"kind,omitempty"`
// NextPageToken: The continuation token, used to page through large
// result sets. Provide this value in a subsequent request to return the
// next page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod OperationsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ReplicaConfiguration: Read-replica configuration for connecting to
// the master.
type ReplicaConfiguration struct {
// FailoverTarget: Specifies if the replica is the failover target. If
// the field is set to true the replica will be designated as a failover
// replica. In case the master instance fails, the replica instance will
// be promoted as the new master instance.
// Only one replica can be specified as failover target, and the replica
// has to be in different zone with the master instance.
FailoverTarget bool `json:"failoverTarget,omitempty"`
// Kind: This is always sql#replicaConfiguration.
Kind string `json:"kind,omitempty"`
// MysqlReplicaConfiguration: MySQL specific configuration when
// replicating from a MySQL on-premises master. Replication
// configuration information such as the username, password,
// certificates, and keys are not stored in the instance metadata. The
// configuration information is used only to set up the replication
// connection and is stored by MySQL in a file named master.info in the
// data directory.
MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
// ForceSendFields is a list of field names (e.g. "FailoverTarget") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FailoverTarget") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod ReplicaConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RestoreBackupContext: Database instance restore from backup context.
type RestoreBackupContext struct {
// BackupRunId: The ID of the backup run to restore from.
BackupRunId int64 `json:"backupRunId,omitempty,string"`
// InstanceId: The ID of the instance that the backup was taken from.
InstanceId string `json:"instanceId,omitempty"`
// Kind: This is always sql#restoreBackupContext.
Kind string `json:"kind,omitempty"`
// ForceSendFields is a list of field names (e.g. "BackupRunId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BackupRunId") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *RestoreBackupContext) MarshalJSON() ([]byte, error) {
type NoMethod RestoreBackupContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RotateServerCaContext: Instance rotate server CA context.
type RotateServerCaContext struct {
// Kind: This is always sql#rotateServerCaContext.
Kind string `json:"kind,omitempty"`
// NextVersion: The fingerprint of the next version to be rotated to. If
// left unspecified, will be rotated to the most recently added server
// CA version.
NextVersion string `json:"nextVersion,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *RotateServerCaContext) MarshalJSON() ([]byte, error) {
type NoMethod RotateServerCaContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Settings: Database instance settings.
type Settings struct {
// ActivationPolicy: The activation policy specifies when the instance
// is activated; it is applicable only when the instance state is
// RUNNABLE. Valid values:
// ALWAYS: The instance is on, and remains so even in the absence of
// connection requests.
// NEVER: The instance is off; it is not activated, even if a connection
// request arrives.
// ON_DEMAND: First Generation instances only. The instance responds to
// incoming requests, and turns itself off when not in use. Instances
// with PER_USE pricing turn off after 15 minutes of inactivity.
// Instances with PER_PACKAGE pricing turn off after 12 hours of
// inactivity.
ActivationPolicy string `json:"activationPolicy,omitempty"`
// AuthorizedGaeApplications: The App Engine app IDs that can access
// this instance. First Generation instances only.
AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"`
// AvailabilityType: Availability type (PostgreSQL instances only).
// Potential values:
// ZONAL: The instance serves data from only one zone. Outages in that
// zone affect data accessibility.
// REGIONAL: The instance can serve data from more than one zone in a
// region (it is highly available).
// For more information, see Overview of the High Availability
// Configuration.
AvailabilityType string `json:"availabilityType,omitempty"`
// BackupConfiguration: The daily backup configuration for the instance.
BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
// CrashSafeReplicationEnabled: Configuration specific to read replica
// instances. Indicates whether database flags for crash-safe
// replication are enabled. This property is only applicable to First
// Generation instances.
CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"`
// DataDiskSizeGb: The size of data disk, in GB. The data disk size
// minimum is 10GB. Not used for First Generation instances.
DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
// DataDiskType: The type of data disk: PD_SSD (default) or PD_HDD. Not
// used for First Generation instances.
DataDiskType string `json:"dataDiskType,omitempty"`
// DatabaseFlags: The database flags passed to the instance at startup.
DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"`
// DatabaseReplicationEnabled: Configuration specific to read replica
// instances. Indicates whether replication is enabled or not.
DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"`
// IpConfiguration: The settings for IP Management. This allows to
// enable or disable the instance IP and manage which external networks
// can connect to the instance. The IPv4 address cannot be disabled for
// Second Generation instances.
IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"`
// Kind: This is always sql#settings.
Kind string `json:"kind,omitempty"`
// LocationPreference: The location preference settings. This allows the
// instance to be located as near as possible to either an App Engine
// app or Compute Engine zone for better performance. App Engine
// co-location is only applicable to First Generation instances.
LocationPreference *LocationPreference `json:"locationPreference,omitempty"`
// MaintenanceWindow: The maintenance window for this instance. This
// specifies when the instance can be restarted for maintenance
// purposes. Not used for First Generation instances.
MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
// PricingPlan: The pricing plan for this instance. This can be either
// PER_USE or PACKAGE. Only PER_USE is supported for Second Generation
// instances.
PricingPlan string `json:"pricingPlan,omitempty"`
// ReplicationType: The type of replication this instance uses. This can
// be either ASYNCHRONOUS or SYNCHRONOUS. This property is only
// applicable to First Generation instances.
ReplicationType string `json:"replicationType,omitempty"`
// SettingsVersion: The version of instance settings. This is a required
// field for update method to make sure concurrent updates are handled
// properly. During update, use the most recent settingsVersion value
// for this instance and do not try to update this value.
SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
// StorageAutoResize: Configuration to increase storage size
// automatically. The default value is true. Not used for First
// Generation instances.
StorageAutoResize *bool `json:"storageAutoResize,omitempty"`
// StorageAutoResizeLimit: The maximum size to which storage capacity
// can be automatically increased. The default value is 0, which
// specifies that there is no limit. Not used for First Generation
// instances.
StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`
// Tier: The tier (or machine type) for this instance, for example
// db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL
// instances). For MySQL instances, this property determines whether the
// instance is First or Second Generation. For more information, see
// Instance Settings.
Tier string `json:"tier,omitempty"`
// UserLabels: User-provided labels, represented as a dictionary where
// each label is a single key value pair.
UserLabels map[string]string `json:"userLabels,omitempty"`
// ForceSendFields is a list of field names (e.g. "ActivationPolicy") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ActivationPolicy") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Settings) MarshalJSON() ([]byte, error) {
type NoMethod Settings
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SslCert: SslCerts Resource
type SslCert struct {
// Cert: PEM representation.
Cert string `json:"cert,omitempty"`
// CertSerialNumber: Serial number, as extracted from the certificate.
CertSerialNumber string `json:"certSerialNumber,omitempty"`
// CommonName: User supplied name. Constrained to [a-zA-Z.-_ ]+.
CommonName string `json:"commonName,omitempty"`
// CreateTime: The time when the certificate was created in RFC 3339
// format, for example 2012-11-15T16:19:00.094Z
CreateTime string `json:"createTime,omitempty"`
// ExpirationTime: The time when the certificate expires in RFC 3339
// format, for example 2012-11-15T16:19:00.094Z.
ExpirationTime string `json:"expirationTime,omitempty"`
// Instance: Name of the database instance.
Instance string `json:"instance,omitempty"`
// Kind: This is always sql#sslCert.
Kind string `json:"kind,omitempty"`
// SelfLink: The URI of this resource.
SelfLink string `json:"selfLink,omitempty"`
// Sha1Fingerprint: Sha1 Fingerprint.
Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Cert") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Cert") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SslCert) MarshalJSON() ([]byte, error) {
type NoMethod SslCert
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SslCertDetail: SslCertDetail.
type SslCertDetail struct {
// CertInfo: The public information about the cert.
CertInfo *SslCert `json:"certInfo,omitempty"`
// CertPrivateKey: The private key for the client cert, in pem format.
// Keep private in order to protect your security.
CertPrivateKey string `json:"certPrivateKey,omitempty"`
// ForceSendFields is a list of field names (e.g. "CertInfo") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CertInfo") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SslCertDetail) MarshalJSON() ([]byte, error) {
type NoMethod SslCertDetail
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate
// request.
type SslCertsCreateEphemeralRequest struct {
// PublicKey: PEM encoded public key to include in the signed
// certificate.
PublicKey string `json:"public_key,omitempty"`
// ForceSendFields is a list of field names (e.g. "PublicKey") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PublicKey") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) {
type NoMethod SslCertsCreateEphemeralRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SslCertsInsertRequest: SslCerts insert request.
type SslCertsInsertRequest struct {
// CommonName: User supplied name. Must be a distinct name from the
// other certificates for this instance.
CommonName string `json:"commonName,omitempty"`
// ForceSendFields is a list of field names (e.g. "CommonName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CommonName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error) {
type NoMethod SslCertsInsertRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SslCertsInsertResponse: SslCert insert response.
type SslCertsInsertResponse struct {
// ClientCert: The new client certificate and private key. For First
// Generation instances, the new certificate does not take effect until
// the instance is restarted.
ClientCert *SslCertDetail `json:"clientCert,omitempty"`
// Kind: This is always sql#sslCertsInsert.
Kind string `json:"kind,omitempty"`
// Operation: The operation to track the ssl certs insert request.
Operation *Operation `json:"operation,omitempty"`
// ServerCaCert: The server Certificate Authority's certificate. If this
// is missing you can force a new one to be generated by calling
// resetSslConfig method on instances resource.
ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ClientCert") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ClientCert") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error) {
type NoMethod SslCertsInsertResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SslCertsListResponse: SslCerts list response.
type SslCertsListResponse struct {
// Items: List of client certificates for the instance.
Items []*SslCert `json:"items,omitempty"`
// Kind: This is always sql#sslCertsList.
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SslCertsListResponse) MarshalJSON() ([]byte, error) {
type NoMethod SslCertsListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Tier: A Google Cloud SQL service tier resource.
type Tier struct {
// DiskQuota: The maximum disk size of this tier in bytes.
DiskQuota int64 `json:"DiskQuota,omitempty,string"`
// RAM: The maximum RAM usage of this tier in bytes.
RAM int64 `json:"RAM,omitempty,string"`
// Kind: This is always sql#tier.
Kind string `json:"kind,omitempty"`
// Region: The applicable regions for this tier.
Region []string `json:"region,omitempty"`
// Tier: An identifier for the machine type, for example,
// db-n1-standard-1. For related information, see Pricing.
Tier string `json:"tier,omitempty"`
// ForceSendFields is a list of field names (e.g. "DiskQuota") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DiskQuota") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Tier) MarshalJSON() ([]byte, error) {
type NoMethod Tier
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TiersListResponse: Tiers list response.
type TiersListResponse struct {
// Items: List of tiers.
Items []*Tier `json:"items,omitempty"`
// Kind: This is always sql#tiersList.
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TiersListResponse) MarshalJSON() ([]byte, error) {
type NoMethod TiersListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TruncateLogContext: Database Instance truncate log context.
type TruncateLogContext struct {
// Kind: This is always sql#truncateLogContext.
Kind string `json:"kind,omitempty"`
// LogType: The type of log to truncate. Valid values are
// MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE.
LogType string `json:"logType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TruncateLogContext) MarshalJSON() ([]byte, error) {
type NoMethod TruncateLogContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// User: A Cloud SQL user resource.
type User struct {
// Etag: This field is deprecated and will be removed from a future
// version of the API.
Etag string `json:"etag,omitempty"`
// Host: The host name from which the user can connect. For insert
// operations, host defaults to an empty string. For update operations,
// host is specified as part of the request URL. The host name cannot be
// updated after insertion.
Host string `json:"host,omitempty"`
// Instance: The name of the Cloud SQL instance. This does not include
// the project ID. Can be omitted for update since it is already
// specified on the URL.
Instance string `json:"instance,omitempty"`
// Kind: This is always sql#user.
Kind string `json:"kind,omitempty"`
// Name: The name of the user in the Cloud SQL instance. Can be omitted
// for update since it is already specified in the URL.
Name string `json:"name,omitempty"`
// Password: The password for the user.
Password string `json:"password,omitempty"`
// Project: The project ID of the project containing the Cloud SQL
// database. The Google apps domain is prefixed if applicable. Can be
// omitted for update since it is already specified on the URL.
Project string `json:"project,omitempty"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *User) MarshalJSON() ([]byte, error) {
type NoMethod User
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UsersListResponse: User list response.
type UsersListResponse struct {
// Items: List of user resources in the instance.
Items []*User `json:"items,omitempty"`
// Kind: This is always sql#usersList.
Kind string `json:"kind,omitempty"`
// NextPageToken: An identifier that uniquely identifies the operation.
// You can use this identifier to retrieve the Operations resource that
// has information about the operation.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
type NoMethod UsersListResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "sql.backupRuns.delete":
type BackupRunsDeleteCall struct {
s *Service
project string
instance string
id int64
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes the backup taken by a backup run.
func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall {
c := &BackupRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.instance = instance
c.id = id
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *BackupRunsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns/{id}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"instance": c.instance,
"id": strconv.FormatInt(c.id, 10),
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sql.backupRuns.delete" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Deletes the backup taken by a backup run.",
// "httpMethod": "DELETE",
// "id": "sql.backupRuns.delete",
// "parameterOrder": [
// "project",
// "instance",
// "id"
// ],
// "parameters": {
// "id": {
// "description": "The ID of the Backup Run to delete. To find a Backup Run ID, use the list method.",
// "format": "int64",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "instance": {
// "description": "Cloud SQL instance ID. This does not include the project ID.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "project": {
// "description": "Project ID of the project that contains the instance.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "projects/{project}/instances/{instance}/backupRuns/{id}",
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/sqlservice.admin"
// ]
// }
}
// method id "sql.backupRuns.get":
type BackupRunsGetCall struct {
s *Service
project string
instance string
id int64
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Retrieves a resource containing information about a backup run.
func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall {
c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.instance = instance
c.id = id
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *BackupRunsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns/{id}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"instance": c.instance,
"id": strconv.FormatInt(c.id, 10),
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sql.backupRuns.get" call.
// Exactly one of *BackupRun or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *BackupRun.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &BackupRun{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Retrieves a resource containing information about a backup run.",
// "httpMethod": "GET",
// "id": "sql.backupRuns.get",
// "parameterOrder": [
// "project",
// "instance",
// "id"
// ],
// "parameters": {
// "id": {
// "description": "The ID of this Backup Run.",
// "format": "int64",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "instance": {
// "description": "Cloud SQL instance ID. This does not include the project ID.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "project": {
// "description": "Project ID of the project that contains the instance.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "projects/{project}/instances/{instance}/backupRuns/{id}",
// "response": {
// "$ref": "BackupRun"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/sqlservice.admin"
// ]
// }
}
// method id "sql.backupRuns.insert":
type BackupRunsInsertCall struct {
s *Service
project string
instance string
backuprun *BackupRun
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Insert: Creates a new backup run on demand. This method is applicable
// only to Second Generation instances.
func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall {
c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.instance = instance
c.backuprun = backuprun
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *BackupRunsInsertCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuprun)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"instance": c.instance,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sql.backupRuns.insert" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Creates a new backup run on demand. This method is applicable only to Second Generation instances.",
// "httpMethod": "POST",
// "id": "sql.backupRuns.insert",
// "parameterOrder": [
// "project",
// "instance"
// ],
// "parameters": {
// "instance": {
// "description": "Cloud SQL instance ID. This does not include the project ID.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "project": {
// "description": "Project ID of the project that contains the instance.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "projects/{project}/instances/{instance}/backupRuns",
// "request": {
// "$ref": "BackupRun"
// },
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/sqlservice.admin"
// ]
// }
}
// method id "sql.backupRuns.list":
type BackupRunsListCall struct {
s *Service
project string
instance string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Lists all backup runs associated with a given instance and
// configuration in the reverse chronological order of the backup
// initiation time.
func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall {
c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.instance = instance
return c
}
// MaxResults sets the optional parameter "maxResults": Maximum number
// of backup runs per response.
func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall {
c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
return c
}
// PageToken sets the optional parameter "pageToken": A
// previously-returned page token representing part of the larger set of
// results to view.
func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *BackupRunsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"instance": c.instance,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "sql.backupRuns.list" call.
// Exactly one of *BackupRunsListResponse or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *BackupRunsListResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &BackupRunsListResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.",
// "httpMethod": "GET",
// "id": "sql.backupRuns.list",
// "parameterOrder": [
// "project",
// "instance"
// ],
// "parameters": {
// "instance": {
// "description": "Cloud SQL instance ID. This does not include the project ID.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "maxResults": {
// "description": "Maximum number of backup runs per response.",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "A previously-returned page token representing part of the larger set of results to view.",
// "location": "query",
// "type": "string"
// },
// "project": {
// "description": "Project ID of the project that contains the instance.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "projects/{project}/instances/{instance}/backupRuns",
// "response": {
// "$ref": "BackupRunsListResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/sqlservice.admin"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "sql.databases.delete":
type DatabasesDeleteCall struct {
s *Service
project string
instance string
database string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes a database from a Cloud SQL instance.
func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall {
c := &DatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.instance = instance
c.database = database
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *DatabasesDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}