...

Source file src/google.golang.org/api/biglake/v1/biglake-gen.go

Documentation: google.golang.org/api/biglake/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package biglake provides access to the BigLake API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/bigquery/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/biglake/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	biglakeService, err := biglake.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	biglakeService, err := biglake.NewService(ctx, option.WithScopes(biglake.CloudPlatformScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	biglakeService, err := biglake.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	biglakeService, err := biglake.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package biglake // import "google.golang.org/api/biglake/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "biglake:v1"
    95  const apiName = "biglake"
    96  const apiVersion = "v1"
    97  const basePath = "https://biglake.googleapis.com/"
    98  const basePathTemplate = "https://biglake.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://biglake.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// View and manage your data in Google BigQuery and see the email address for
   104  	// your Google Account
   105  	BigqueryScope = "https://www.googleapis.com/auth/bigquery"
   106  
   107  	// See, edit, configure, and delete your Google Cloud data and see the email
   108  	// address for your Google Account.
   109  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   110  )
   111  
   112  // NewService creates a new Service.
   113  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   114  	scopesOption := internaloption.WithDefaultScopes(
   115  		"https://www.googleapis.com/auth/bigquery",
   116  		"https://www.googleapis.com/auth/cloud-platform",
   117  	)
   118  	// NOTE: prepend, so we don't override user-specified scopes.
   119  	opts = append([]option.ClientOption{scopesOption}, opts...)
   120  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   121  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   122  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   123  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   124  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	s, err := New(client)
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	if endpoint != "" {
   133  		s.BasePath = endpoint
   134  	}
   135  	return s, nil
   136  }
   137  
   138  // New creates a new Service. It uses the provided http.Client for requests.
   139  //
   140  // Deprecated: please use NewService instead.
   141  // To provide a custom HTTP client, use option.WithHTTPClient.
   142  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   143  func New(client *http.Client) (*Service, error) {
   144  	if client == nil {
   145  		return nil, errors.New("client is nil")
   146  	}
   147  	s := &Service{client: client, BasePath: basePath}
   148  	s.Projects = NewProjectsService(s)
   149  	return s, nil
   150  }
   151  
   152  type Service struct {
   153  	client    *http.Client
   154  	BasePath  string // API endpoint base URL
   155  	UserAgent string // optional additional User-Agent fragment
   156  
   157  	Projects *ProjectsService
   158  }
   159  
   160  func (s *Service) userAgent() string {
   161  	if s.UserAgent == "" {
   162  		return googleapi.UserAgent
   163  	}
   164  	return googleapi.UserAgent + " " + s.UserAgent
   165  }
   166  
   167  func NewProjectsService(s *Service) *ProjectsService {
   168  	rs := &ProjectsService{s: s}
   169  	rs.Locations = NewProjectsLocationsService(s)
   170  	return rs
   171  }
   172  
   173  type ProjectsService struct {
   174  	s *Service
   175  
   176  	Locations *ProjectsLocationsService
   177  }
   178  
   179  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   180  	rs := &ProjectsLocationsService{s: s}
   181  	rs.Catalogs = NewProjectsLocationsCatalogsService(s)
   182  	return rs
   183  }
   184  
   185  type ProjectsLocationsService struct {
   186  	s *Service
   187  
   188  	Catalogs *ProjectsLocationsCatalogsService
   189  }
   190  
   191  func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsService {
   192  	rs := &ProjectsLocationsCatalogsService{s: s}
   193  	rs.Databases = NewProjectsLocationsCatalogsDatabasesService(s)
   194  	return rs
   195  }
   196  
   197  type ProjectsLocationsCatalogsService struct {
   198  	s *Service
   199  
   200  	Databases *ProjectsLocationsCatalogsDatabasesService
   201  }
   202  
   203  func NewProjectsLocationsCatalogsDatabasesService(s *Service) *ProjectsLocationsCatalogsDatabasesService {
   204  	rs := &ProjectsLocationsCatalogsDatabasesService{s: s}
   205  	rs.Tables = NewProjectsLocationsCatalogsDatabasesTablesService(s)
   206  	return rs
   207  }
   208  
   209  type ProjectsLocationsCatalogsDatabasesService struct {
   210  	s *Service
   211  
   212  	Tables *ProjectsLocationsCatalogsDatabasesTablesService
   213  }
   214  
   215  func NewProjectsLocationsCatalogsDatabasesTablesService(s *Service) *ProjectsLocationsCatalogsDatabasesTablesService {
   216  	rs := &ProjectsLocationsCatalogsDatabasesTablesService{s: s}
   217  	return rs
   218  }
   219  
   220  type ProjectsLocationsCatalogsDatabasesTablesService struct {
   221  	s *Service
   222  }
   223  
   224  // Catalog: Catalog is the container of databases.
   225  type Catalog struct {
   226  	// CreateTime: Output only. The creation time of the catalog.
   227  	CreateTime string `json:"createTime,omitempty"`
   228  	// DeleteTime: Output only. The deletion time of the catalog. Only set after
   229  	// the catalog is deleted.
   230  	DeleteTime string `json:"deleteTime,omitempty"`
   231  	// ExpireTime: Output only. The time when this catalog is considered expired.
   232  	// Only set after the catalog is deleted.
   233  	ExpireTime string `json:"expireTime,omitempty"`
   234  	// Name: Output only. The resource name. Format:
   235  	// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
   236  	Name string `json:"name,omitempty"`
   237  	// UpdateTime: Output only. The last modification time of the catalog.
   238  	UpdateTime string `json:"updateTime,omitempty"`
   239  
   240  	// ServerResponse contains the HTTP response code and headers from the server.
   241  	googleapi.ServerResponse `json:"-"`
   242  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   243  	// unconditionally include in API requests. By default, fields with empty or
   244  	// default values are omitted from API requests. See
   245  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   246  	// details.
   247  	ForceSendFields []string `json:"-"`
   248  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   249  	// requests with the JSON null value. By default, fields with empty values are
   250  	// omitted from API requests. See
   251  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   252  	NullFields []string `json:"-"`
   253  }
   254  
   255  func (s *Catalog) MarshalJSON() ([]byte, error) {
   256  	type NoMethod Catalog
   257  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   258  }
   259  
   260  // Database: Database is the container of tables.
   261  type Database struct {
   262  	// CreateTime: Output only. The creation time of the database.
   263  	CreateTime string `json:"createTime,omitempty"`
   264  	// DeleteTime: Output only. The deletion time of the database. Only set after
   265  	// the database is deleted.
   266  	DeleteTime string `json:"deleteTime,omitempty"`
   267  	// ExpireTime: Output only. The time when this database is considered expired.
   268  	// Only set after the database is deleted.
   269  	ExpireTime string `json:"expireTime,omitempty"`
   270  	// HiveOptions: Options of a Hive database.
   271  	HiveOptions *HiveDatabaseOptions `json:"hiveOptions,omitempty"`
   272  	// Name: Output only. The resource name. Format:
   273  	// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
   274  	// /databases/{database_id}
   275  	Name string `json:"name,omitempty"`
   276  	// Type: The database type.
   277  	//
   278  	// Possible values:
   279  	//   "TYPE_UNSPECIFIED" - The type is not specified.
   280  	//   "HIVE" - Represents a database storing tables compatible with Hive
   281  	// Metastore tables.
   282  	Type string `json:"type,omitempty"`
   283  	// UpdateTime: Output only. The last modification time of the database.
   284  	UpdateTime string `json:"updateTime,omitempty"`
   285  
   286  	// ServerResponse contains the HTTP response code and headers from the server.
   287  	googleapi.ServerResponse `json:"-"`
   288  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   289  	// unconditionally include in API requests. By default, fields with empty or
   290  	// default values are omitted from API requests. See
   291  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   292  	// details.
   293  	ForceSendFields []string `json:"-"`
   294  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   295  	// requests with the JSON null value. By default, fields with empty values are
   296  	// omitted from API requests. See
   297  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   298  	NullFields []string `json:"-"`
   299  }
   300  
   301  func (s *Database) MarshalJSON() ([]byte, error) {
   302  	type NoMethod Database
   303  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   304  }
   305  
   306  // HiveDatabaseOptions: Options of a Hive database.
   307  type HiveDatabaseOptions struct {
   308  	// LocationUri: Cloud Storage folder URI where the database data is stored,
   309  	// starting with "gs://".
   310  	LocationUri string `json:"locationUri,omitempty"`
   311  	// Parameters: Stores user supplied Hive database parameters.
   312  	Parameters map[string]string `json:"parameters,omitempty"`
   313  	// ForceSendFields is a list of field names (e.g. "LocationUri") to
   314  	// unconditionally include in API requests. By default, fields with empty or
   315  	// default values are omitted from API requests. See
   316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   317  	// details.
   318  	ForceSendFields []string `json:"-"`
   319  	// NullFields is a list of field names (e.g. "LocationUri") to include in API
   320  	// requests with the JSON null value. By default, fields with empty values are
   321  	// omitted from API requests. See
   322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   323  	NullFields []string `json:"-"`
   324  }
   325  
   326  func (s *HiveDatabaseOptions) MarshalJSON() ([]byte, error) {
   327  	type NoMethod HiveDatabaseOptions
   328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   329  }
   330  
   331  // HiveTableOptions: Options of a Hive table.
   332  type HiveTableOptions struct {
   333  	// Parameters: Stores user supplied Hive table parameters.
   334  	Parameters map[string]string `json:"parameters,omitempty"`
   335  	// StorageDescriptor: Stores physical storage information of the data.
   336  	StorageDescriptor *StorageDescriptor `json:"storageDescriptor,omitempty"`
   337  	// TableType: Hive table type. For example, MANAGED_TABLE, EXTERNAL_TABLE.
   338  	TableType string `json:"tableType,omitempty"`
   339  	// ForceSendFields is a list of field names (e.g. "Parameters") to
   340  	// unconditionally include in API requests. By default, fields with empty or
   341  	// default values are omitted from API requests. See
   342  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   343  	// details.
   344  	ForceSendFields []string `json:"-"`
   345  	// NullFields is a list of field names (e.g. "Parameters") to include in API
   346  	// requests with the JSON null value. By default, fields with empty values are
   347  	// omitted from API requests. See
   348  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   349  	NullFields []string `json:"-"`
   350  }
   351  
   352  func (s *HiveTableOptions) MarshalJSON() ([]byte, error) {
   353  	type NoMethod HiveTableOptions
   354  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   355  }
   356  
   357  // ListCatalogsResponse: Response message for the ListCatalogs method.
   358  type ListCatalogsResponse struct {
   359  	// Catalogs: The catalogs from the specified project.
   360  	Catalogs []*Catalog `json:"catalogs,omitempty"`
   361  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   362  	// next page. If this field is omitted, there are no subsequent pages.
   363  	NextPageToken string `json:"nextPageToken,omitempty"`
   364  
   365  	// ServerResponse contains the HTTP response code and headers from the server.
   366  	googleapi.ServerResponse `json:"-"`
   367  	// ForceSendFields is a list of field names (e.g. "Catalogs") to
   368  	// unconditionally include in API requests. By default, fields with empty or
   369  	// default values are omitted from API requests. See
   370  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   371  	// details.
   372  	ForceSendFields []string `json:"-"`
   373  	// NullFields is a list of field names (e.g. "Catalogs") to include in API
   374  	// requests with the JSON null value. By default, fields with empty values are
   375  	// omitted from API requests. See
   376  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   377  	NullFields []string `json:"-"`
   378  }
   379  
   380  func (s *ListCatalogsResponse) MarshalJSON() ([]byte, error) {
   381  	type NoMethod ListCatalogsResponse
   382  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   383  }
   384  
   385  // ListDatabasesResponse: Response message for the ListDatabases method.
   386  type ListDatabasesResponse struct {
   387  	// Databases: The databases from the specified catalog.
   388  	Databases []*Database `json:"databases,omitempty"`
   389  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   390  	// next page. If this field is omitted, there are no subsequent pages.
   391  	NextPageToken string `json:"nextPageToken,omitempty"`
   392  
   393  	// ServerResponse contains the HTTP response code and headers from the server.
   394  	googleapi.ServerResponse `json:"-"`
   395  	// ForceSendFields is a list of field names (e.g. "Databases") to
   396  	// unconditionally include in API requests. By default, fields with empty or
   397  	// default values are omitted from API requests. See
   398  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   399  	// details.
   400  	ForceSendFields []string `json:"-"`
   401  	// NullFields is a list of field names (e.g. "Databases") to include in API
   402  	// requests with the JSON null value. By default, fields with empty values are
   403  	// omitted from API requests. See
   404  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   405  	NullFields []string `json:"-"`
   406  }
   407  
   408  func (s *ListDatabasesResponse) MarshalJSON() ([]byte, error) {
   409  	type NoMethod ListDatabasesResponse
   410  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   411  }
   412  
   413  // ListTablesResponse: Response message for the ListTables method.
   414  type ListTablesResponse struct {
   415  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   416  	// next page. If this field is omitted, there are no subsequent pages.
   417  	NextPageToken string `json:"nextPageToken,omitempty"`
   418  	// Tables: The tables from the specified database.
   419  	Tables []*Table `json:"tables,omitempty"`
   420  
   421  	// ServerResponse contains the HTTP response code and headers from the server.
   422  	googleapi.ServerResponse `json:"-"`
   423  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   424  	// unconditionally include in API requests. By default, fields with empty or
   425  	// default values are omitted from API requests. See
   426  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   427  	// details.
   428  	ForceSendFields []string `json:"-"`
   429  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   430  	// requests with the JSON null value. By default, fields with empty values are
   431  	// omitted from API requests. See
   432  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   433  	NullFields []string `json:"-"`
   434  }
   435  
   436  func (s *ListTablesResponse) MarshalJSON() ([]byte, error) {
   437  	type NoMethod ListTablesResponse
   438  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   439  }
   440  
   441  // RenameTableRequest: Request message for the RenameTable method in
   442  // MetastoreService
   443  type RenameTableRequest struct {
   444  	// NewName: Required. The new `name` for the specified table, must be in the
   445  	// same database. Format:
   446  	// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
   447  	// /databases/{database_id}/tables/{table_id}
   448  	NewName string `json:"newName,omitempty"`
   449  	// ForceSendFields is a list of field names (e.g. "NewName") to unconditionally
   450  	// include in API requests. By default, fields with empty or default values are
   451  	// omitted from API requests. See
   452  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   453  	// details.
   454  	ForceSendFields []string `json:"-"`
   455  	// NullFields is a list of field names (e.g. "NewName") to include in API
   456  	// requests with the JSON null value. By default, fields with empty values are
   457  	// omitted from API requests. See
   458  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   459  	NullFields []string `json:"-"`
   460  }
   461  
   462  func (s *RenameTableRequest) MarshalJSON() ([]byte, error) {
   463  	type NoMethod RenameTableRequest
   464  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   465  }
   466  
   467  // SerDeInfo: Serializer and deserializer information.
   468  type SerDeInfo struct {
   469  	// SerializationLib: The fully qualified Java class name of the serialization
   470  	// library.
   471  	SerializationLib string `json:"serializationLib,omitempty"`
   472  	// ForceSendFields is a list of field names (e.g. "SerializationLib") to
   473  	// unconditionally include in API requests. By default, fields with empty or
   474  	// default values are omitted from API requests. See
   475  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   476  	// details.
   477  	ForceSendFields []string `json:"-"`
   478  	// NullFields is a list of field names (e.g. "SerializationLib") to include in
   479  	// API requests with the JSON null value. By default, fields with empty values
   480  	// are omitted from API requests. See
   481  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   482  	NullFields []string `json:"-"`
   483  }
   484  
   485  func (s *SerDeInfo) MarshalJSON() ([]byte, error) {
   486  	type NoMethod SerDeInfo
   487  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   488  }
   489  
   490  // StorageDescriptor: Stores physical storage information of the data.
   491  type StorageDescriptor struct {
   492  	// InputFormat: The fully qualified Java class name of the input format.
   493  	InputFormat string `json:"inputFormat,omitempty"`
   494  	// LocationUri: Cloud Storage folder URI where the table data is stored,
   495  	// starting with "gs://".
   496  	LocationUri string `json:"locationUri,omitempty"`
   497  	// OutputFormat: The fully qualified Java class name of the output format.
   498  	OutputFormat string `json:"outputFormat,omitempty"`
   499  	// SerdeInfo: Serializer and deserializer information.
   500  	SerdeInfo *SerDeInfo `json:"serdeInfo,omitempty"`
   501  	// ForceSendFields is a list of field names (e.g. "InputFormat") to
   502  	// unconditionally include in API requests. By default, fields with empty or
   503  	// default values are omitted from API requests. See
   504  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   505  	// details.
   506  	ForceSendFields []string `json:"-"`
   507  	// NullFields is a list of field names (e.g. "InputFormat") to include in API
   508  	// requests with the JSON null value. By default, fields with empty values are
   509  	// omitted from API requests. See
   510  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   511  	NullFields []string `json:"-"`
   512  }
   513  
   514  func (s *StorageDescriptor) MarshalJSON() ([]byte, error) {
   515  	type NoMethod StorageDescriptor
   516  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   517  }
   518  
   519  // Table: Represents a table.
   520  type Table struct {
   521  	// CreateTime: Output only. The creation time of the table.
   522  	CreateTime string `json:"createTime,omitempty"`
   523  	// DeleteTime: Output only. The deletion time of the table. Only set after the
   524  	// table is deleted.
   525  	DeleteTime string `json:"deleteTime,omitempty"`
   526  	// Etag: The checksum of a table object computed by the server based on the
   527  	// value of other fields. It may be sent on update requests to ensure the
   528  	// client has an up-to-date value before proceeding. It is only checked for
   529  	// update table operations.
   530  	Etag string `json:"etag,omitempty"`
   531  	// ExpireTime: Output only. The time when this table is considered expired.
   532  	// Only set after the table is deleted.
   533  	ExpireTime string `json:"expireTime,omitempty"`
   534  	// HiveOptions: Options of a Hive table.
   535  	HiveOptions *HiveTableOptions `json:"hiveOptions,omitempty"`
   536  	// Name: Output only. The resource name. Format:
   537  	// projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}
   538  	// /databases/{database_id}/tables/{table_id}
   539  	Name string `json:"name,omitempty"`
   540  	// Type: The table type.
   541  	//
   542  	// Possible values:
   543  	//   "TYPE_UNSPECIFIED" - The type is not specified.
   544  	//   "HIVE" - Represents a table compatible with Hive Metastore tables.
   545  	Type string `json:"type,omitempty"`
   546  	// UpdateTime: Output only. The last modification time of the table.
   547  	UpdateTime string `json:"updateTime,omitempty"`
   548  
   549  	// ServerResponse contains the HTTP response code and headers from the server.
   550  	googleapi.ServerResponse `json:"-"`
   551  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   552  	// unconditionally include in API requests. By default, fields with empty or
   553  	// default values are omitted from API requests. See
   554  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   555  	// details.
   556  	ForceSendFields []string `json:"-"`
   557  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   558  	// requests with the JSON null value. By default, fields with empty values are
   559  	// omitted from API requests. See
   560  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   561  	NullFields []string `json:"-"`
   562  }
   563  
   564  func (s *Table) MarshalJSON() ([]byte, error) {
   565  	type NoMethod Table
   566  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   567  }
   568  
   569  type ProjectsLocationsCatalogsCreateCall struct {
   570  	s          *Service
   571  	parent     string
   572  	catalog    *Catalog
   573  	urlParams_ gensupport.URLParams
   574  	ctx_       context.Context
   575  	header_    http.Header
   576  }
   577  
   578  // Create: Creates a new catalog.
   579  //
   580  //   - parent: The parent resource where this catalog will be created. Format:
   581  //     projects/{project_id_or_number}/locations/{location_id}.
   582  func (r *ProjectsLocationsCatalogsService) Create(parent string, catalog *Catalog) *ProjectsLocationsCatalogsCreateCall {
   583  	c := &ProjectsLocationsCatalogsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   584  	c.parent = parent
   585  	c.catalog = catalog
   586  	return c
   587  }
   588  
   589  // CatalogId sets the optional parameter "catalogId": Required. The ID to use
   590  // for the catalog, which will become the final component of the catalog's
   591  // resource name.
   592  func (c *ProjectsLocationsCatalogsCreateCall) CatalogId(catalogId string) *ProjectsLocationsCatalogsCreateCall {
   593  	c.urlParams_.Set("catalogId", catalogId)
   594  	return c
   595  }
   596  
   597  // Fields allows partial responses to be retrieved. See
   598  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   599  // details.
   600  func (c *ProjectsLocationsCatalogsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCreateCall {
   601  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   602  	return c
   603  }
   604  
   605  // Context sets the context to be used in this call's Do method.
   606  func (c *ProjectsLocationsCatalogsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCreateCall {
   607  	c.ctx_ = ctx
   608  	return c
   609  }
   610  
   611  // Header returns a http.Header that can be modified by the caller to add
   612  // headers to the request.
   613  func (c *ProjectsLocationsCatalogsCreateCall) Header() http.Header {
   614  	if c.header_ == nil {
   615  		c.header_ = make(http.Header)
   616  	}
   617  	return c.header_
   618  }
   619  
   620  func (c *ProjectsLocationsCatalogsCreateCall) doRequest(alt string) (*http.Response, error) {
   621  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
   622  	var body io.Reader = nil
   623  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.catalog)
   624  	if err != nil {
   625  		return nil, err
   626  	}
   627  	c.urlParams_.Set("alt", alt)
   628  	c.urlParams_.Set("prettyPrint", "false")
   629  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/catalogs")
   630  	urls += "?" + c.urlParams_.Encode()
   631  	req, err := http.NewRequest("POST", urls, body)
   632  	if err != nil {
   633  		return nil, err
   634  	}
   635  	req.Header = reqHeaders
   636  	googleapi.Expand(req.URL, map[string]string{
   637  		"parent": c.parent,
   638  	})
   639  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   640  }
   641  
   642  // Do executes the "biglake.projects.locations.catalogs.create" call.
   643  // Any non-2xx status code is an error. Response headers are in either
   644  // *Catalog.ServerResponse.Header or (if a response was returned at all) in
   645  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
   646  // whether the returned error was because http.StatusNotModified was returned.
   647  func (c *ProjectsLocationsCatalogsCreateCall) Do(opts ...googleapi.CallOption) (*Catalog, error) {
   648  	gensupport.SetOptions(c.urlParams_, opts...)
   649  	res, err := c.doRequest("json")
   650  	if res != nil && res.StatusCode == http.StatusNotModified {
   651  		if res.Body != nil {
   652  			res.Body.Close()
   653  		}
   654  		return nil, gensupport.WrapError(&googleapi.Error{
   655  			Code:   res.StatusCode,
   656  			Header: res.Header,
   657  		})
   658  	}
   659  	if err != nil {
   660  		return nil, err
   661  	}
   662  	defer googleapi.CloseBody(res)
   663  	if err := googleapi.CheckResponse(res); err != nil {
   664  		return nil, gensupport.WrapError(err)
   665  	}
   666  	ret := &Catalog{
   667  		ServerResponse: googleapi.ServerResponse{
   668  			Header:         res.Header,
   669  			HTTPStatusCode: res.StatusCode,
   670  		},
   671  	}
   672  	target := &ret
   673  	if err := gensupport.DecodeResponse(target, res); err != nil {
   674  		return nil, err
   675  	}
   676  	return ret, nil
   677  }
   678  
   679  type ProjectsLocationsCatalogsDeleteCall struct {
   680  	s          *Service
   681  	name       string
   682  	urlParams_ gensupport.URLParams
   683  	ctx_       context.Context
   684  	header_    http.Header
   685  }
   686  
   687  // Delete: Deletes an existing catalog specified by the catalog ID.
   688  //
   689  //   - name: The name of the catalog to delete. Format:
   690  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
   691  //     d}.
   692  func (r *ProjectsLocationsCatalogsService) Delete(name string) *ProjectsLocationsCatalogsDeleteCall {
   693  	c := &ProjectsLocationsCatalogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   694  	c.name = name
   695  	return c
   696  }
   697  
   698  // Fields allows partial responses to be retrieved. See
   699  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   700  // details.
   701  func (c *ProjectsLocationsCatalogsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDeleteCall {
   702  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   703  	return c
   704  }
   705  
   706  // Context sets the context to be used in this call's Do method.
   707  func (c *ProjectsLocationsCatalogsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDeleteCall {
   708  	c.ctx_ = ctx
   709  	return c
   710  }
   711  
   712  // Header returns a http.Header that can be modified by the caller to add
   713  // headers to the request.
   714  func (c *ProjectsLocationsCatalogsDeleteCall) Header() http.Header {
   715  	if c.header_ == nil {
   716  		c.header_ = make(http.Header)
   717  	}
   718  	return c.header_
   719  }
   720  
   721  func (c *ProjectsLocationsCatalogsDeleteCall) doRequest(alt string) (*http.Response, error) {
   722  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   723  	var body io.Reader = nil
   724  	c.urlParams_.Set("alt", alt)
   725  	c.urlParams_.Set("prettyPrint", "false")
   726  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
   727  	urls += "?" + c.urlParams_.Encode()
   728  	req, err := http.NewRequest("DELETE", urls, body)
   729  	if err != nil {
   730  		return nil, err
   731  	}
   732  	req.Header = reqHeaders
   733  	googleapi.Expand(req.URL, map[string]string{
   734  		"name": c.name,
   735  	})
   736  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   737  }
   738  
   739  // Do executes the "biglake.projects.locations.catalogs.delete" call.
   740  // Any non-2xx status code is an error. Response headers are in either
   741  // *Catalog.ServerResponse.Header or (if a response was returned at all) in
   742  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
   743  // whether the returned error was because http.StatusNotModified was returned.
   744  func (c *ProjectsLocationsCatalogsDeleteCall) Do(opts ...googleapi.CallOption) (*Catalog, error) {
   745  	gensupport.SetOptions(c.urlParams_, opts...)
   746  	res, err := c.doRequest("json")
   747  	if res != nil && res.StatusCode == http.StatusNotModified {
   748  		if res.Body != nil {
   749  			res.Body.Close()
   750  		}
   751  		return nil, gensupport.WrapError(&googleapi.Error{
   752  			Code:   res.StatusCode,
   753  			Header: res.Header,
   754  		})
   755  	}
   756  	if err != nil {
   757  		return nil, err
   758  	}
   759  	defer googleapi.CloseBody(res)
   760  	if err := googleapi.CheckResponse(res); err != nil {
   761  		return nil, gensupport.WrapError(err)
   762  	}
   763  	ret := &Catalog{
   764  		ServerResponse: googleapi.ServerResponse{
   765  			Header:         res.Header,
   766  			HTTPStatusCode: res.StatusCode,
   767  		},
   768  	}
   769  	target := &ret
   770  	if err := gensupport.DecodeResponse(target, res); err != nil {
   771  		return nil, err
   772  	}
   773  	return ret, nil
   774  }
   775  
   776  type ProjectsLocationsCatalogsGetCall struct {
   777  	s            *Service
   778  	name         string
   779  	urlParams_   gensupport.URLParams
   780  	ifNoneMatch_ string
   781  	ctx_         context.Context
   782  	header_      http.Header
   783  }
   784  
   785  // Get: Gets the catalog specified by the resource name.
   786  //
   787  //   - name: The name of the catalog to retrieve. Format:
   788  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
   789  //     d}.
   790  func (r *ProjectsLocationsCatalogsService) Get(name string) *ProjectsLocationsCatalogsGetCall {
   791  	c := &ProjectsLocationsCatalogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   792  	c.name = name
   793  	return c
   794  }
   795  
   796  // Fields allows partial responses to be retrieved. See
   797  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   798  // details.
   799  func (c *ProjectsLocationsCatalogsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCall {
   800  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   801  	return c
   802  }
   803  
   804  // IfNoneMatch sets an optional parameter which makes the operation fail if the
   805  // object's ETag matches the given value. This is useful for getting updates
   806  // only after the object has changed since the last request.
   807  func (c *ProjectsLocationsCatalogsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCall {
   808  	c.ifNoneMatch_ = entityTag
   809  	return c
   810  }
   811  
   812  // Context sets the context to be used in this call's Do method.
   813  func (c *ProjectsLocationsCatalogsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCall {
   814  	c.ctx_ = ctx
   815  	return c
   816  }
   817  
   818  // Header returns a http.Header that can be modified by the caller to add
   819  // headers to the request.
   820  func (c *ProjectsLocationsCatalogsGetCall) Header() http.Header {
   821  	if c.header_ == nil {
   822  		c.header_ = make(http.Header)
   823  	}
   824  	return c.header_
   825  }
   826  
   827  func (c *ProjectsLocationsCatalogsGetCall) doRequest(alt string) (*http.Response, error) {
   828  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   829  	if c.ifNoneMatch_ != "" {
   830  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   831  	}
   832  	var body io.Reader = nil
   833  	c.urlParams_.Set("alt", alt)
   834  	c.urlParams_.Set("prettyPrint", "false")
   835  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
   836  	urls += "?" + c.urlParams_.Encode()
   837  	req, err := http.NewRequest("GET", urls, body)
   838  	if err != nil {
   839  		return nil, err
   840  	}
   841  	req.Header = reqHeaders
   842  	googleapi.Expand(req.URL, map[string]string{
   843  		"name": c.name,
   844  	})
   845  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   846  }
   847  
   848  // Do executes the "biglake.projects.locations.catalogs.get" call.
   849  // Any non-2xx status code is an error. Response headers are in either
   850  // *Catalog.ServerResponse.Header or (if a response was returned at all) in
   851  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
   852  // whether the returned error was because http.StatusNotModified was returned.
   853  func (c *ProjectsLocationsCatalogsGetCall) Do(opts ...googleapi.CallOption) (*Catalog, error) {
   854  	gensupport.SetOptions(c.urlParams_, opts...)
   855  	res, err := c.doRequest("json")
   856  	if res != nil && res.StatusCode == http.StatusNotModified {
   857  		if res.Body != nil {
   858  			res.Body.Close()
   859  		}
   860  		return nil, gensupport.WrapError(&googleapi.Error{
   861  			Code:   res.StatusCode,
   862  			Header: res.Header,
   863  		})
   864  	}
   865  	if err != nil {
   866  		return nil, err
   867  	}
   868  	defer googleapi.CloseBody(res)
   869  	if err := googleapi.CheckResponse(res); err != nil {
   870  		return nil, gensupport.WrapError(err)
   871  	}
   872  	ret := &Catalog{
   873  		ServerResponse: googleapi.ServerResponse{
   874  			Header:         res.Header,
   875  			HTTPStatusCode: res.StatusCode,
   876  		},
   877  	}
   878  	target := &ret
   879  	if err := gensupport.DecodeResponse(target, res); err != nil {
   880  		return nil, err
   881  	}
   882  	return ret, nil
   883  }
   884  
   885  type ProjectsLocationsCatalogsListCall struct {
   886  	s            *Service
   887  	parent       string
   888  	urlParams_   gensupport.URLParams
   889  	ifNoneMatch_ string
   890  	ctx_         context.Context
   891  	header_      http.Header
   892  }
   893  
   894  // List: List all catalogs in a specified project.
   895  //
   896  //   - parent: The parent, which owns this collection of catalogs. Format:
   897  //     projects/{project_id_or_number}/locations/{location_id}.
   898  func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall {
   899  	c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   900  	c.parent = parent
   901  	return c
   902  }
   903  
   904  // PageSize sets the optional parameter "pageSize": The maximum number of
   905  // catalogs to return. The service may return fewer than this value. If
   906  // unspecified, at most 50 catalogs will be returned. The maximum value is
   907  // 1000; values above 1000 will be coerced to 1000.
   908  func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall {
   909  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
   910  	return c
   911  }
   912  
   913  // PageToken sets the optional parameter "pageToken": A page token, received
   914  // from a previous `ListCatalogs` call. Provide this to retrieve the subsequent
   915  // page. When paginating, all other parameters provided to `ListCatalogs` must
   916  // match the call that provided the page token.
   917  func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall {
   918  	c.urlParams_.Set("pageToken", pageToken)
   919  	return c
   920  }
   921  
   922  // Fields allows partial responses to be retrieved. See
   923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   924  // details.
   925  func (c *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall {
   926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   927  	return c
   928  }
   929  
   930  // IfNoneMatch sets an optional parameter which makes the operation fail if the
   931  // object's ETag matches the given value. This is useful for getting updates
   932  // only after the object has changed since the last request.
   933  func (c *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall {
   934  	c.ifNoneMatch_ = entityTag
   935  	return c
   936  }
   937  
   938  // Context sets the context to be used in this call's Do method.
   939  func (c *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall {
   940  	c.ctx_ = ctx
   941  	return c
   942  }
   943  
   944  // Header returns a http.Header that can be modified by the caller to add
   945  // headers to the request.
   946  func (c *ProjectsLocationsCatalogsListCall) Header() http.Header {
   947  	if c.header_ == nil {
   948  		c.header_ = make(http.Header)
   949  	}
   950  	return c.header_
   951  }
   952  
   953  func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Response, error) {
   954  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   955  	if c.ifNoneMatch_ != "" {
   956  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   957  	}
   958  	var body io.Reader = nil
   959  	c.urlParams_.Set("alt", alt)
   960  	c.urlParams_.Set("prettyPrint", "false")
   961  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/catalogs")
   962  	urls += "?" + c.urlParams_.Encode()
   963  	req, err := http.NewRequest("GET", urls, body)
   964  	if err != nil {
   965  		return nil, err
   966  	}
   967  	req.Header = reqHeaders
   968  	googleapi.Expand(req.URL, map[string]string{
   969  		"parent": c.parent,
   970  	})
   971  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   972  }
   973  
   974  // Do executes the "biglake.projects.locations.catalogs.list" call.
   975  // Any non-2xx status code is an error. Response headers are in either
   976  // *ListCatalogsResponse.ServerResponse.Header or (if a response was returned
   977  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
   978  // check whether the returned error was because http.StatusNotModified was
   979  // returned.
   980  func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*ListCatalogsResponse, error) {
   981  	gensupport.SetOptions(c.urlParams_, opts...)
   982  	res, err := c.doRequest("json")
   983  	if res != nil && res.StatusCode == http.StatusNotModified {
   984  		if res.Body != nil {
   985  			res.Body.Close()
   986  		}
   987  		return nil, gensupport.WrapError(&googleapi.Error{
   988  			Code:   res.StatusCode,
   989  			Header: res.Header,
   990  		})
   991  	}
   992  	if err != nil {
   993  		return nil, err
   994  	}
   995  	defer googleapi.CloseBody(res)
   996  	if err := googleapi.CheckResponse(res); err != nil {
   997  		return nil, gensupport.WrapError(err)
   998  	}
   999  	ret := &ListCatalogsResponse{
  1000  		ServerResponse: googleapi.ServerResponse{
  1001  			Header:         res.Header,
  1002  			HTTPStatusCode: res.StatusCode,
  1003  		},
  1004  	}
  1005  	target := &ret
  1006  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1007  		return nil, err
  1008  	}
  1009  	return ret, nil
  1010  }
  1011  
  1012  // Pages invokes f for each page of results.
  1013  // A non-nil error returned from f will halt the iteration.
  1014  // The provided context supersedes any context provided to the Context method.
  1015  func (c *ProjectsLocationsCatalogsListCall) Pages(ctx context.Context, f func(*ListCatalogsResponse) error) error {
  1016  	c.ctx_ = ctx
  1017  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1018  	for {
  1019  		x, err := c.Do()
  1020  		if err != nil {
  1021  			return err
  1022  		}
  1023  		if err := f(x); err != nil {
  1024  			return err
  1025  		}
  1026  		if x.NextPageToken == "" {
  1027  			return nil
  1028  		}
  1029  		c.PageToken(x.NextPageToken)
  1030  	}
  1031  }
  1032  
  1033  type ProjectsLocationsCatalogsDatabasesCreateCall struct {
  1034  	s          *Service
  1035  	parent     string
  1036  	database   *Database
  1037  	urlParams_ gensupport.URLParams
  1038  	ctx_       context.Context
  1039  	header_    http.Header
  1040  }
  1041  
  1042  // Create: Creates a new database.
  1043  //
  1044  //   - parent: The parent resource where this database will be created. Format:
  1045  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1046  //     d}.
  1047  func (r *ProjectsLocationsCatalogsDatabasesService) Create(parent string, database *Database) *ProjectsLocationsCatalogsDatabasesCreateCall {
  1048  	c := &ProjectsLocationsCatalogsDatabasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1049  	c.parent = parent
  1050  	c.database = database
  1051  	return c
  1052  }
  1053  
  1054  // DatabaseId sets the optional parameter "databaseId": Required. The ID to use
  1055  // for the database, which will become the final component of the database's
  1056  // resource name.
  1057  func (c *ProjectsLocationsCatalogsDatabasesCreateCall) DatabaseId(databaseId string) *ProjectsLocationsCatalogsDatabasesCreateCall {
  1058  	c.urlParams_.Set("databaseId", databaseId)
  1059  	return c
  1060  }
  1061  
  1062  // Fields allows partial responses to be retrieved. See
  1063  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1064  // details.
  1065  func (c *ProjectsLocationsCatalogsDatabasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesCreateCall {
  1066  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1067  	return c
  1068  }
  1069  
  1070  // Context sets the context to be used in this call's Do method.
  1071  func (c *ProjectsLocationsCatalogsDatabasesCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesCreateCall {
  1072  	c.ctx_ = ctx
  1073  	return c
  1074  }
  1075  
  1076  // Header returns a http.Header that can be modified by the caller to add
  1077  // headers to the request.
  1078  func (c *ProjectsLocationsCatalogsDatabasesCreateCall) Header() http.Header {
  1079  	if c.header_ == nil {
  1080  		c.header_ = make(http.Header)
  1081  	}
  1082  	return c.header_
  1083  }
  1084  
  1085  func (c *ProjectsLocationsCatalogsDatabasesCreateCall) doRequest(alt string) (*http.Response, error) {
  1086  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1087  	var body io.Reader = nil
  1088  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
  1089  	if err != nil {
  1090  		return nil, err
  1091  	}
  1092  	c.urlParams_.Set("alt", alt)
  1093  	c.urlParams_.Set("prettyPrint", "false")
  1094  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
  1095  	urls += "?" + c.urlParams_.Encode()
  1096  	req, err := http.NewRequest("POST", urls, body)
  1097  	if err != nil {
  1098  		return nil, err
  1099  	}
  1100  	req.Header = reqHeaders
  1101  	googleapi.Expand(req.URL, map[string]string{
  1102  		"parent": c.parent,
  1103  	})
  1104  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1105  }
  1106  
  1107  // Do executes the "biglake.projects.locations.catalogs.databases.create" call.
  1108  // Any non-2xx status code is an error. Response headers are in either
  1109  // *Database.ServerResponse.Header or (if a response was returned at all) in
  1110  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1111  // whether the returned error was because http.StatusNotModified was returned.
  1112  func (c *ProjectsLocationsCatalogsDatabasesCreateCall) Do(opts ...googleapi.CallOption) (*Database, error) {
  1113  	gensupport.SetOptions(c.urlParams_, opts...)
  1114  	res, err := c.doRequest("json")
  1115  	if res != nil && res.StatusCode == http.StatusNotModified {
  1116  		if res.Body != nil {
  1117  			res.Body.Close()
  1118  		}
  1119  		return nil, gensupport.WrapError(&googleapi.Error{
  1120  			Code:   res.StatusCode,
  1121  			Header: res.Header,
  1122  		})
  1123  	}
  1124  	if err != nil {
  1125  		return nil, err
  1126  	}
  1127  	defer googleapi.CloseBody(res)
  1128  	if err := googleapi.CheckResponse(res); err != nil {
  1129  		return nil, gensupport.WrapError(err)
  1130  	}
  1131  	ret := &Database{
  1132  		ServerResponse: googleapi.ServerResponse{
  1133  			Header:         res.Header,
  1134  			HTTPStatusCode: res.StatusCode,
  1135  		},
  1136  	}
  1137  	target := &ret
  1138  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1139  		return nil, err
  1140  	}
  1141  	return ret, nil
  1142  }
  1143  
  1144  type ProjectsLocationsCatalogsDatabasesDeleteCall struct {
  1145  	s          *Service
  1146  	name       string
  1147  	urlParams_ gensupport.URLParams
  1148  	ctx_       context.Context
  1149  	header_    http.Header
  1150  }
  1151  
  1152  // Delete: Deletes an existing database specified by the database ID.
  1153  //
  1154  //   - name: The name of the database to delete. Format:
  1155  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1156  //     d}/databases/{database_id}.
  1157  func (r *ProjectsLocationsCatalogsDatabasesService) Delete(name string) *ProjectsLocationsCatalogsDatabasesDeleteCall {
  1158  	c := &ProjectsLocationsCatalogsDatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1159  	c.name = name
  1160  	return c
  1161  }
  1162  
  1163  // Fields allows partial responses to be retrieved. See
  1164  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1165  // details.
  1166  func (c *ProjectsLocationsCatalogsDatabasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesDeleteCall {
  1167  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1168  	return c
  1169  }
  1170  
  1171  // Context sets the context to be used in this call's Do method.
  1172  func (c *ProjectsLocationsCatalogsDatabasesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesDeleteCall {
  1173  	c.ctx_ = ctx
  1174  	return c
  1175  }
  1176  
  1177  // Header returns a http.Header that can be modified by the caller to add
  1178  // headers to the request.
  1179  func (c *ProjectsLocationsCatalogsDatabasesDeleteCall) Header() http.Header {
  1180  	if c.header_ == nil {
  1181  		c.header_ = make(http.Header)
  1182  	}
  1183  	return c.header_
  1184  }
  1185  
  1186  func (c *ProjectsLocationsCatalogsDatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1187  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1188  	var body io.Reader = nil
  1189  	c.urlParams_.Set("alt", alt)
  1190  	c.urlParams_.Set("prettyPrint", "false")
  1191  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1192  	urls += "?" + c.urlParams_.Encode()
  1193  	req, err := http.NewRequest("DELETE", urls, body)
  1194  	if err != nil {
  1195  		return nil, err
  1196  	}
  1197  	req.Header = reqHeaders
  1198  	googleapi.Expand(req.URL, map[string]string{
  1199  		"name": c.name,
  1200  	})
  1201  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1202  }
  1203  
  1204  // Do executes the "biglake.projects.locations.catalogs.databases.delete" call.
  1205  // Any non-2xx status code is an error. Response headers are in either
  1206  // *Database.ServerResponse.Header or (if a response was returned at all) in
  1207  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1208  // whether the returned error was because http.StatusNotModified was returned.
  1209  func (c *ProjectsLocationsCatalogsDatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Database, error) {
  1210  	gensupport.SetOptions(c.urlParams_, opts...)
  1211  	res, err := c.doRequest("json")
  1212  	if res != nil && res.StatusCode == http.StatusNotModified {
  1213  		if res.Body != nil {
  1214  			res.Body.Close()
  1215  		}
  1216  		return nil, gensupport.WrapError(&googleapi.Error{
  1217  			Code:   res.StatusCode,
  1218  			Header: res.Header,
  1219  		})
  1220  	}
  1221  	if err != nil {
  1222  		return nil, err
  1223  	}
  1224  	defer googleapi.CloseBody(res)
  1225  	if err := googleapi.CheckResponse(res); err != nil {
  1226  		return nil, gensupport.WrapError(err)
  1227  	}
  1228  	ret := &Database{
  1229  		ServerResponse: googleapi.ServerResponse{
  1230  			Header:         res.Header,
  1231  			HTTPStatusCode: res.StatusCode,
  1232  		},
  1233  	}
  1234  	target := &ret
  1235  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1236  		return nil, err
  1237  	}
  1238  	return ret, nil
  1239  }
  1240  
  1241  type ProjectsLocationsCatalogsDatabasesGetCall struct {
  1242  	s            *Service
  1243  	name         string
  1244  	urlParams_   gensupport.URLParams
  1245  	ifNoneMatch_ string
  1246  	ctx_         context.Context
  1247  	header_      http.Header
  1248  }
  1249  
  1250  // Get: Gets the database specified by the resource name.
  1251  //
  1252  //   - name: The name of the database to retrieve. Format:
  1253  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1254  //     d}/databases/{database_id}.
  1255  func (r *ProjectsLocationsCatalogsDatabasesService) Get(name string) *ProjectsLocationsCatalogsDatabasesGetCall {
  1256  	c := &ProjectsLocationsCatalogsDatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1257  	c.name = name
  1258  	return c
  1259  }
  1260  
  1261  // Fields allows partial responses to be retrieved. See
  1262  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1263  // details.
  1264  func (c *ProjectsLocationsCatalogsDatabasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesGetCall {
  1265  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1266  	return c
  1267  }
  1268  
  1269  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1270  // object's ETag matches the given value. This is useful for getting updates
  1271  // only after the object has changed since the last request.
  1272  func (c *ProjectsLocationsCatalogsDatabasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsDatabasesGetCall {
  1273  	c.ifNoneMatch_ = entityTag
  1274  	return c
  1275  }
  1276  
  1277  // Context sets the context to be used in this call's Do method.
  1278  func (c *ProjectsLocationsCatalogsDatabasesGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesGetCall {
  1279  	c.ctx_ = ctx
  1280  	return c
  1281  }
  1282  
  1283  // Header returns a http.Header that can be modified by the caller to add
  1284  // headers to the request.
  1285  func (c *ProjectsLocationsCatalogsDatabasesGetCall) Header() http.Header {
  1286  	if c.header_ == nil {
  1287  		c.header_ = make(http.Header)
  1288  	}
  1289  	return c.header_
  1290  }
  1291  
  1292  func (c *ProjectsLocationsCatalogsDatabasesGetCall) doRequest(alt string) (*http.Response, error) {
  1293  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1294  	if c.ifNoneMatch_ != "" {
  1295  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1296  	}
  1297  	var body io.Reader = nil
  1298  	c.urlParams_.Set("alt", alt)
  1299  	c.urlParams_.Set("prettyPrint", "false")
  1300  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1301  	urls += "?" + c.urlParams_.Encode()
  1302  	req, err := http.NewRequest("GET", urls, body)
  1303  	if err != nil {
  1304  		return nil, err
  1305  	}
  1306  	req.Header = reqHeaders
  1307  	googleapi.Expand(req.URL, map[string]string{
  1308  		"name": c.name,
  1309  	})
  1310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1311  }
  1312  
  1313  // Do executes the "biglake.projects.locations.catalogs.databases.get" call.
  1314  // Any non-2xx status code is an error. Response headers are in either
  1315  // *Database.ServerResponse.Header or (if a response was returned at all) in
  1316  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1317  // whether the returned error was because http.StatusNotModified was returned.
  1318  func (c *ProjectsLocationsCatalogsDatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
  1319  	gensupport.SetOptions(c.urlParams_, opts...)
  1320  	res, err := c.doRequest("json")
  1321  	if res != nil && res.StatusCode == http.StatusNotModified {
  1322  		if res.Body != nil {
  1323  			res.Body.Close()
  1324  		}
  1325  		return nil, gensupport.WrapError(&googleapi.Error{
  1326  			Code:   res.StatusCode,
  1327  			Header: res.Header,
  1328  		})
  1329  	}
  1330  	if err != nil {
  1331  		return nil, err
  1332  	}
  1333  	defer googleapi.CloseBody(res)
  1334  	if err := googleapi.CheckResponse(res); err != nil {
  1335  		return nil, gensupport.WrapError(err)
  1336  	}
  1337  	ret := &Database{
  1338  		ServerResponse: googleapi.ServerResponse{
  1339  			Header:         res.Header,
  1340  			HTTPStatusCode: res.StatusCode,
  1341  		},
  1342  	}
  1343  	target := &ret
  1344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1345  		return nil, err
  1346  	}
  1347  	return ret, nil
  1348  }
  1349  
  1350  type ProjectsLocationsCatalogsDatabasesListCall struct {
  1351  	s            *Service
  1352  	parent       string
  1353  	urlParams_   gensupport.URLParams
  1354  	ifNoneMatch_ string
  1355  	ctx_         context.Context
  1356  	header_      http.Header
  1357  }
  1358  
  1359  // List: List all databases in a specified catalog.
  1360  //
  1361  //   - parent: The parent, which owns this collection of databases. Format:
  1362  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1363  //     d}.
  1364  func (r *ProjectsLocationsCatalogsDatabasesService) List(parent string) *ProjectsLocationsCatalogsDatabasesListCall {
  1365  	c := &ProjectsLocationsCatalogsDatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1366  	c.parent = parent
  1367  	return c
  1368  }
  1369  
  1370  // PageSize sets the optional parameter "pageSize": The maximum number of
  1371  // databases to return. The service may return fewer than this value. If
  1372  // unspecified, at most 50 databases will be returned. The maximum value is
  1373  // 1000; values above 1000 will be coerced to 1000.
  1374  func (c *ProjectsLocationsCatalogsDatabasesListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsDatabasesListCall {
  1375  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1376  	return c
  1377  }
  1378  
  1379  // PageToken sets the optional parameter "pageToken": A page token, received
  1380  // from a previous `ListDatabases` call. Provide this to retrieve the
  1381  // subsequent page. When paginating, all other parameters provided to
  1382  // `ListDatabases` must match the call that provided the page token.
  1383  func (c *ProjectsLocationsCatalogsDatabasesListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsDatabasesListCall {
  1384  	c.urlParams_.Set("pageToken", pageToken)
  1385  	return c
  1386  }
  1387  
  1388  // Fields allows partial responses to be retrieved. See
  1389  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1390  // details.
  1391  func (c *ProjectsLocationsCatalogsDatabasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesListCall {
  1392  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1393  	return c
  1394  }
  1395  
  1396  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1397  // object's ETag matches the given value. This is useful for getting updates
  1398  // only after the object has changed since the last request.
  1399  func (c *ProjectsLocationsCatalogsDatabasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsDatabasesListCall {
  1400  	c.ifNoneMatch_ = entityTag
  1401  	return c
  1402  }
  1403  
  1404  // Context sets the context to be used in this call's Do method.
  1405  func (c *ProjectsLocationsCatalogsDatabasesListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesListCall {
  1406  	c.ctx_ = ctx
  1407  	return c
  1408  }
  1409  
  1410  // Header returns a http.Header that can be modified by the caller to add
  1411  // headers to the request.
  1412  func (c *ProjectsLocationsCatalogsDatabasesListCall) Header() http.Header {
  1413  	if c.header_ == nil {
  1414  		c.header_ = make(http.Header)
  1415  	}
  1416  	return c.header_
  1417  }
  1418  
  1419  func (c *ProjectsLocationsCatalogsDatabasesListCall) doRequest(alt string) (*http.Response, error) {
  1420  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1421  	if c.ifNoneMatch_ != "" {
  1422  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1423  	}
  1424  	var body io.Reader = nil
  1425  	c.urlParams_.Set("alt", alt)
  1426  	c.urlParams_.Set("prettyPrint", "false")
  1427  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
  1428  	urls += "?" + c.urlParams_.Encode()
  1429  	req, err := http.NewRequest("GET", urls, body)
  1430  	if err != nil {
  1431  		return nil, err
  1432  	}
  1433  	req.Header = reqHeaders
  1434  	googleapi.Expand(req.URL, map[string]string{
  1435  		"parent": c.parent,
  1436  	})
  1437  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1438  }
  1439  
  1440  // Do executes the "biglake.projects.locations.catalogs.databases.list" call.
  1441  // Any non-2xx status code is an error. Response headers are in either
  1442  // *ListDatabasesResponse.ServerResponse.Header or (if a response was returned
  1443  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1444  // check whether the returned error was because http.StatusNotModified was
  1445  // returned.
  1446  func (c *ProjectsLocationsCatalogsDatabasesListCall) Do(opts ...googleapi.CallOption) (*ListDatabasesResponse, error) {
  1447  	gensupport.SetOptions(c.urlParams_, opts...)
  1448  	res, err := c.doRequest("json")
  1449  	if res != nil && res.StatusCode == http.StatusNotModified {
  1450  		if res.Body != nil {
  1451  			res.Body.Close()
  1452  		}
  1453  		return nil, gensupport.WrapError(&googleapi.Error{
  1454  			Code:   res.StatusCode,
  1455  			Header: res.Header,
  1456  		})
  1457  	}
  1458  	if err != nil {
  1459  		return nil, err
  1460  	}
  1461  	defer googleapi.CloseBody(res)
  1462  	if err := googleapi.CheckResponse(res); err != nil {
  1463  		return nil, gensupport.WrapError(err)
  1464  	}
  1465  	ret := &ListDatabasesResponse{
  1466  		ServerResponse: googleapi.ServerResponse{
  1467  			Header:         res.Header,
  1468  			HTTPStatusCode: res.StatusCode,
  1469  		},
  1470  	}
  1471  	target := &ret
  1472  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1473  		return nil, err
  1474  	}
  1475  	return ret, nil
  1476  }
  1477  
  1478  // Pages invokes f for each page of results.
  1479  // A non-nil error returned from f will halt the iteration.
  1480  // The provided context supersedes any context provided to the Context method.
  1481  func (c *ProjectsLocationsCatalogsDatabasesListCall) Pages(ctx context.Context, f func(*ListDatabasesResponse) error) error {
  1482  	c.ctx_ = ctx
  1483  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1484  	for {
  1485  		x, err := c.Do()
  1486  		if err != nil {
  1487  			return err
  1488  		}
  1489  		if err := f(x); err != nil {
  1490  			return err
  1491  		}
  1492  		if x.NextPageToken == "" {
  1493  			return nil
  1494  		}
  1495  		c.PageToken(x.NextPageToken)
  1496  	}
  1497  }
  1498  
  1499  type ProjectsLocationsCatalogsDatabasesPatchCall struct {
  1500  	s          *Service
  1501  	name       string
  1502  	database   *Database
  1503  	urlParams_ gensupport.URLParams
  1504  	ctx_       context.Context
  1505  	header_    http.Header
  1506  }
  1507  
  1508  // Patch: Updates an existing database specified by the database ID.
  1509  //
  1510  //   - name: Output only. The resource name. Format:
  1511  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1512  //     d}/databases/{database_id}.
  1513  func (r *ProjectsLocationsCatalogsDatabasesService) Patch(name string, database *Database) *ProjectsLocationsCatalogsDatabasesPatchCall {
  1514  	c := &ProjectsLocationsCatalogsDatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1515  	c.name = name
  1516  	c.database = database
  1517  	return c
  1518  }
  1519  
  1520  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  1521  // update. For the `FieldMask` definition, see
  1522  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  1523  // If not set, defaults to all of the fields that are allowed to update.
  1524  func (c *ProjectsLocationsCatalogsDatabasesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsDatabasesPatchCall {
  1525  	c.urlParams_.Set("updateMask", updateMask)
  1526  	return c
  1527  }
  1528  
  1529  // Fields allows partial responses to be retrieved. See
  1530  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1531  // details.
  1532  func (c *ProjectsLocationsCatalogsDatabasesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesPatchCall {
  1533  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1534  	return c
  1535  }
  1536  
  1537  // Context sets the context to be used in this call's Do method.
  1538  func (c *ProjectsLocationsCatalogsDatabasesPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesPatchCall {
  1539  	c.ctx_ = ctx
  1540  	return c
  1541  }
  1542  
  1543  // Header returns a http.Header that can be modified by the caller to add
  1544  // headers to the request.
  1545  func (c *ProjectsLocationsCatalogsDatabasesPatchCall) Header() http.Header {
  1546  	if c.header_ == nil {
  1547  		c.header_ = make(http.Header)
  1548  	}
  1549  	return c.header_
  1550  }
  1551  
  1552  func (c *ProjectsLocationsCatalogsDatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
  1553  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1554  	var body io.Reader = nil
  1555  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
  1556  	if err != nil {
  1557  		return nil, err
  1558  	}
  1559  	c.urlParams_.Set("alt", alt)
  1560  	c.urlParams_.Set("prettyPrint", "false")
  1561  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1562  	urls += "?" + c.urlParams_.Encode()
  1563  	req, err := http.NewRequest("PATCH", urls, body)
  1564  	if err != nil {
  1565  		return nil, err
  1566  	}
  1567  	req.Header = reqHeaders
  1568  	googleapi.Expand(req.URL, map[string]string{
  1569  		"name": c.name,
  1570  	})
  1571  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1572  }
  1573  
  1574  // Do executes the "biglake.projects.locations.catalogs.databases.patch" call.
  1575  // Any non-2xx status code is an error. Response headers are in either
  1576  // *Database.ServerResponse.Header or (if a response was returned at all) in
  1577  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1578  // whether the returned error was because http.StatusNotModified was returned.
  1579  func (c *ProjectsLocationsCatalogsDatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Database, error) {
  1580  	gensupport.SetOptions(c.urlParams_, opts...)
  1581  	res, err := c.doRequest("json")
  1582  	if res != nil && res.StatusCode == http.StatusNotModified {
  1583  		if res.Body != nil {
  1584  			res.Body.Close()
  1585  		}
  1586  		return nil, gensupport.WrapError(&googleapi.Error{
  1587  			Code:   res.StatusCode,
  1588  			Header: res.Header,
  1589  		})
  1590  	}
  1591  	if err != nil {
  1592  		return nil, err
  1593  	}
  1594  	defer googleapi.CloseBody(res)
  1595  	if err := googleapi.CheckResponse(res); err != nil {
  1596  		return nil, gensupport.WrapError(err)
  1597  	}
  1598  	ret := &Database{
  1599  		ServerResponse: googleapi.ServerResponse{
  1600  			Header:         res.Header,
  1601  			HTTPStatusCode: res.StatusCode,
  1602  		},
  1603  	}
  1604  	target := &ret
  1605  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1606  		return nil, err
  1607  	}
  1608  	return ret, nil
  1609  }
  1610  
  1611  type ProjectsLocationsCatalogsDatabasesTablesCreateCall struct {
  1612  	s          *Service
  1613  	parent     string
  1614  	table      *Table
  1615  	urlParams_ gensupport.URLParams
  1616  	ctx_       context.Context
  1617  	header_    http.Header
  1618  }
  1619  
  1620  // Create: Creates a new table.
  1621  //
  1622  //   - parent: The parent resource where this table will be created. Format:
  1623  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1624  //     d}/databases/{database_id}.
  1625  func (r *ProjectsLocationsCatalogsDatabasesTablesService) Create(parent string, table *Table) *ProjectsLocationsCatalogsDatabasesTablesCreateCall {
  1626  	c := &ProjectsLocationsCatalogsDatabasesTablesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1627  	c.parent = parent
  1628  	c.table = table
  1629  	return c
  1630  }
  1631  
  1632  // TableId sets the optional parameter "tableId": Required. The ID to use for
  1633  // the table, which will become the final component of the table's resource
  1634  // name.
  1635  func (c *ProjectsLocationsCatalogsDatabasesTablesCreateCall) TableId(tableId string) *ProjectsLocationsCatalogsDatabasesTablesCreateCall {
  1636  	c.urlParams_.Set("tableId", tableId)
  1637  	return c
  1638  }
  1639  
  1640  // Fields allows partial responses to be retrieved. See
  1641  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1642  // details.
  1643  func (c *ProjectsLocationsCatalogsDatabasesTablesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesTablesCreateCall {
  1644  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1645  	return c
  1646  }
  1647  
  1648  // Context sets the context to be used in this call's Do method.
  1649  func (c *ProjectsLocationsCatalogsDatabasesTablesCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesTablesCreateCall {
  1650  	c.ctx_ = ctx
  1651  	return c
  1652  }
  1653  
  1654  // Header returns a http.Header that can be modified by the caller to add
  1655  // headers to the request.
  1656  func (c *ProjectsLocationsCatalogsDatabasesTablesCreateCall) Header() http.Header {
  1657  	if c.header_ == nil {
  1658  		c.header_ = make(http.Header)
  1659  	}
  1660  	return c.header_
  1661  }
  1662  
  1663  func (c *ProjectsLocationsCatalogsDatabasesTablesCreateCall) doRequest(alt string) (*http.Response, error) {
  1664  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1665  	var body io.Reader = nil
  1666  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
  1667  	if err != nil {
  1668  		return nil, err
  1669  	}
  1670  	c.urlParams_.Set("alt", alt)
  1671  	c.urlParams_.Set("prettyPrint", "false")
  1672  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tables")
  1673  	urls += "?" + c.urlParams_.Encode()
  1674  	req, err := http.NewRequest("POST", urls, body)
  1675  	if err != nil {
  1676  		return nil, err
  1677  	}
  1678  	req.Header = reqHeaders
  1679  	googleapi.Expand(req.URL, map[string]string{
  1680  		"parent": c.parent,
  1681  	})
  1682  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1683  }
  1684  
  1685  // Do executes the "biglake.projects.locations.catalogs.databases.tables.create" call.
  1686  // Any non-2xx status code is an error. Response headers are in either
  1687  // *Table.ServerResponse.Header or (if a response was returned at all) in
  1688  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1689  // whether the returned error was because http.StatusNotModified was returned.
  1690  func (c *ProjectsLocationsCatalogsDatabasesTablesCreateCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  1691  	gensupport.SetOptions(c.urlParams_, opts...)
  1692  	res, err := c.doRequest("json")
  1693  	if res != nil && res.StatusCode == http.StatusNotModified {
  1694  		if res.Body != nil {
  1695  			res.Body.Close()
  1696  		}
  1697  		return nil, gensupport.WrapError(&googleapi.Error{
  1698  			Code:   res.StatusCode,
  1699  			Header: res.Header,
  1700  		})
  1701  	}
  1702  	if err != nil {
  1703  		return nil, err
  1704  	}
  1705  	defer googleapi.CloseBody(res)
  1706  	if err := googleapi.CheckResponse(res); err != nil {
  1707  		return nil, gensupport.WrapError(err)
  1708  	}
  1709  	ret := &Table{
  1710  		ServerResponse: googleapi.ServerResponse{
  1711  			Header:         res.Header,
  1712  			HTTPStatusCode: res.StatusCode,
  1713  		},
  1714  	}
  1715  	target := &ret
  1716  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1717  		return nil, err
  1718  	}
  1719  	return ret, nil
  1720  }
  1721  
  1722  type ProjectsLocationsCatalogsDatabasesTablesDeleteCall struct {
  1723  	s          *Service
  1724  	name       string
  1725  	urlParams_ gensupport.URLParams
  1726  	ctx_       context.Context
  1727  	header_    http.Header
  1728  }
  1729  
  1730  // Delete: Deletes an existing table specified by the table ID.
  1731  //
  1732  //   - name: The name of the table to delete. Format:
  1733  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1734  //     d}/databases/{database_id}/tables/{table_id}.
  1735  func (r *ProjectsLocationsCatalogsDatabasesTablesService) Delete(name string) *ProjectsLocationsCatalogsDatabasesTablesDeleteCall {
  1736  	c := &ProjectsLocationsCatalogsDatabasesTablesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1737  	c.name = name
  1738  	return c
  1739  }
  1740  
  1741  // Fields allows partial responses to be retrieved. See
  1742  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1743  // details.
  1744  func (c *ProjectsLocationsCatalogsDatabasesTablesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesTablesDeleteCall {
  1745  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1746  	return c
  1747  }
  1748  
  1749  // Context sets the context to be used in this call's Do method.
  1750  func (c *ProjectsLocationsCatalogsDatabasesTablesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesTablesDeleteCall {
  1751  	c.ctx_ = ctx
  1752  	return c
  1753  }
  1754  
  1755  // Header returns a http.Header that can be modified by the caller to add
  1756  // headers to the request.
  1757  func (c *ProjectsLocationsCatalogsDatabasesTablesDeleteCall) Header() http.Header {
  1758  	if c.header_ == nil {
  1759  		c.header_ = make(http.Header)
  1760  	}
  1761  	return c.header_
  1762  }
  1763  
  1764  func (c *ProjectsLocationsCatalogsDatabasesTablesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1765  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1766  	var body io.Reader = nil
  1767  	c.urlParams_.Set("alt", alt)
  1768  	c.urlParams_.Set("prettyPrint", "false")
  1769  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1770  	urls += "?" + c.urlParams_.Encode()
  1771  	req, err := http.NewRequest("DELETE", urls, body)
  1772  	if err != nil {
  1773  		return nil, err
  1774  	}
  1775  	req.Header = reqHeaders
  1776  	googleapi.Expand(req.URL, map[string]string{
  1777  		"name": c.name,
  1778  	})
  1779  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1780  }
  1781  
  1782  // Do executes the "biglake.projects.locations.catalogs.databases.tables.delete" call.
  1783  // Any non-2xx status code is an error. Response headers are in either
  1784  // *Table.ServerResponse.Header or (if a response was returned at all) in
  1785  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1786  // whether the returned error was because http.StatusNotModified was returned.
  1787  func (c *ProjectsLocationsCatalogsDatabasesTablesDeleteCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  1788  	gensupport.SetOptions(c.urlParams_, opts...)
  1789  	res, err := c.doRequest("json")
  1790  	if res != nil && res.StatusCode == http.StatusNotModified {
  1791  		if res.Body != nil {
  1792  			res.Body.Close()
  1793  		}
  1794  		return nil, gensupport.WrapError(&googleapi.Error{
  1795  			Code:   res.StatusCode,
  1796  			Header: res.Header,
  1797  		})
  1798  	}
  1799  	if err != nil {
  1800  		return nil, err
  1801  	}
  1802  	defer googleapi.CloseBody(res)
  1803  	if err := googleapi.CheckResponse(res); err != nil {
  1804  		return nil, gensupport.WrapError(err)
  1805  	}
  1806  	ret := &Table{
  1807  		ServerResponse: googleapi.ServerResponse{
  1808  			Header:         res.Header,
  1809  			HTTPStatusCode: res.StatusCode,
  1810  		},
  1811  	}
  1812  	target := &ret
  1813  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1814  		return nil, err
  1815  	}
  1816  	return ret, nil
  1817  }
  1818  
  1819  type ProjectsLocationsCatalogsDatabasesTablesGetCall struct {
  1820  	s            *Service
  1821  	name         string
  1822  	urlParams_   gensupport.URLParams
  1823  	ifNoneMatch_ string
  1824  	ctx_         context.Context
  1825  	header_      http.Header
  1826  }
  1827  
  1828  // Get: Gets the table specified by the resource name.
  1829  //
  1830  //   - name: The name of the table to retrieve. Format:
  1831  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1832  //     d}/databases/{database_id}/tables/{table_id}.
  1833  func (r *ProjectsLocationsCatalogsDatabasesTablesService) Get(name string) *ProjectsLocationsCatalogsDatabasesTablesGetCall {
  1834  	c := &ProjectsLocationsCatalogsDatabasesTablesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1835  	c.name = name
  1836  	return c
  1837  }
  1838  
  1839  // Fields allows partial responses to be retrieved. See
  1840  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1841  // details.
  1842  func (c *ProjectsLocationsCatalogsDatabasesTablesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesTablesGetCall {
  1843  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1844  	return c
  1845  }
  1846  
  1847  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1848  // object's ETag matches the given value. This is useful for getting updates
  1849  // only after the object has changed since the last request.
  1850  func (c *ProjectsLocationsCatalogsDatabasesTablesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsDatabasesTablesGetCall {
  1851  	c.ifNoneMatch_ = entityTag
  1852  	return c
  1853  }
  1854  
  1855  // Context sets the context to be used in this call's Do method.
  1856  func (c *ProjectsLocationsCatalogsDatabasesTablesGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesTablesGetCall {
  1857  	c.ctx_ = ctx
  1858  	return c
  1859  }
  1860  
  1861  // Header returns a http.Header that can be modified by the caller to add
  1862  // headers to the request.
  1863  func (c *ProjectsLocationsCatalogsDatabasesTablesGetCall) Header() http.Header {
  1864  	if c.header_ == nil {
  1865  		c.header_ = make(http.Header)
  1866  	}
  1867  	return c.header_
  1868  }
  1869  
  1870  func (c *ProjectsLocationsCatalogsDatabasesTablesGetCall) doRequest(alt string) (*http.Response, error) {
  1871  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1872  	if c.ifNoneMatch_ != "" {
  1873  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1874  	}
  1875  	var body io.Reader = nil
  1876  	c.urlParams_.Set("alt", alt)
  1877  	c.urlParams_.Set("prettyPrint", "false")
  1878  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1879  	urls += "?" + c.urlParams_.Encode()
  1880  	req, err := http.NewRequest("GET", urls, body)
  1881  	if err != nil {
  1882  		return nil, err
  1883  	}
  1884  	req.Header = reqHeaders
  1885  	googleapi.Expand(req.URL, map[string]string{
  1886  		"name": c.name,
  1887  	})
  1888  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1889  }
  1890  
  1891  // Do executes the "biglake.projects.locations.catalogs.databases.tables.get" call.
  1892  // Any non-2xx status code is an error. Response headers are in either
  1893  // *Table.ServerResponse.Header or (if a response was returned at all) in
  1894  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1895  // whether the returned error was because http.StatusNotModified was returned.
  1896  func (c *ProjectsLocationsCatalogsDatabasesTablesGetCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  1897  	gensupport.SetOptions(c.urlParams_, opts...)
  1898  	res, err := c.doRequest("json")
  1899  	if res != nil && res.StatusCode == http.StatusNotModified {
  1900  		if res.Body != nil {
  1901  			res.Body.Close()
  1902  		}
  1903  		return nil, gensupport.WrapError(&googleapi.Error{
  1904  			Code:   res.StatusCode,
  1905  			Header: res.Header,
  1906  		})
  1907  	}
  1908  	if err != nil {
  1909  		return nil, err
  1910  	}
  1911  	defer googleapi.CloseBody(res)
  1912  	if err := googleapi.CheckResponse(res); err != nil {
  1913  		return nil, gensupport.WrapError(err)
  1914  	}
  1915  	ret := &Table{
  1916  		ServerResponse: googleapi.ServerResponse{
  1917  			Header:         res.Header,
  1918  			HTTPStatusCode: res.StatusCode,
  1919  		},
  1920  	}
  1921  	target := &ret
  1922  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1923  		return nil, err
  1924  	}
  1925  	return ret, nil
  1926  }
  1927  
  1928  type ProjectsLocationsCatalogsDatabasesTablesListCall struct {
  1929  	s            *Service
  1930  	parent       string
  1931  	urlParams_   gensupport.URLParams
  1932  	ifNoneMatch_ string
  1933  	ctx_         context.Context
  1934  	header_      http.Header
  1935  }
  1936  
  1937  // List: List all tables in a specified database.
  1938  //
  1939  //   - parent: The parent, which owns this collection of tables. Format:
  1940  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  1941  //     d}/databases/{database_id}.
  1942  func (r *ProjectsLocationsCatalogsDatabasesTablesService) List(parent string) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1943  	c := &ProjectsLocationsCatalogsDatabasesTablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1944  	c.parent = parent
  1945  	return c
  1946  }
  1947  
  1948  // PageSize sets the optional parameter "pageSize": The maximum number of
  1949  // tables to return. The service may return fewer than this value. If
  1950  // unspecified, at most 50 tables will be returned. The maximum value is 1000;
  1951  // values above 1000 will be coerced to 1000.
  1952  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1953  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1954  	return c
  1955  }
  1956  
  1957  // PageToken sets the optional parameter "pageToken": A page token, received
  1958  // from a previous `ListTables` call. Provide this to retrieve the subsequent
  1959  // page. When paginating, all other parameters provided to `ListTables` must
  1960  // match the call that provided the page token.
  1961  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1962  	c.urlParams_.Set("pageToken", pageToken)
  1963  	return c
  1964  }
  1965  
  1966  // View sets the optional parameter "view": The view for the returned tables.
  1967  //
  1968  // Possible values:
  1969  //
  1970  //	"TABLE_VIEW_UNSPECIFIED" - Default value. The API will default to the
  1971  //
  1972  // BASIC view.
  1973  //
  1974  //	"BASIC" - Include only table names. This is the default value.
  1975  //	"FULL" - Include everything.
  1976  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) View(view string) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1977  	c.urlParams_.Set("view", view)
  1978  	return c
  1979  }
  1980  
  1981  // Fields allows partial responses to be retrieved. See
  1982  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1983  // details.
  1984  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1985  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1986  	return c
  1987  }
  1988  
  1989  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1990  // object's ETag matches the given value. This is useful for getting updates
  1991  // only after the object has changed since the last request.
  1992  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1993  	c.ifNoneMatch_ = entityTag
  1994  	return c
  1995  }
  1996  
  1997  // Context sets the context to be used in this call's Do method.
  1998  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesTablesListCall {
  1999  	c.ctx_ = ctx
  2000  	return c
  2001  }
  2002  
  2003  // Header returns a http.Header that can be modified by the caller to add
  2004  // headers to the request.
  2005  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) Header() http.Header {
  2006  	if c.header_ == nil {
  2007  		c.header_ = make(http.Header)
  2008  	}
  2009  	return c.header_
  2010  }
  2011  
  2012  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) doRequest(alt string) (*http.Response, error) {
  2013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2014  	if c.ifNoneMatch_ != "" {
  2015  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2016  	}
  2017  	var body io.Reader = nil
  2018  	c.urlParams_.Set("alt", alt)
  2019  	c.urlParams_.Set("prettyPrint", "false")
  2020  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tables")
  2021  	urls += "?" + c.urlParams_.Encode()
  2022  	req, err := http.NewRequest("GET", urls, body)
  2023  	if err != nil {
  2024  		return nil, err
  2025  	}
  2026  	req.Header = reqHeaders
  2027  	googleapi.Expand(req.URL, map[string]string{
  2028  		"parent": c.parent,
  2029  	})
  2030  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2031  }
  2032  
  2033  // Do executes the "biglake.projects.locations.catalogs.databases.tables.list" call.
  2034  // Any non-2xx status code is an error. Response headers are in either
  2035  // *ListTablesResponse.ServerResponse.Header or (if a response was returned at
  2036  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2037  // check whether the returned error was because http.StatusNotModified was
  2038  // returned.
  2039  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) Do(opts ...googleapi.CallOption) (*ListTablesResponse, error) {
  2040  	gensupport.SetOptions(c.urlParams_, opts...)
  2041  	res, err := c.doRequest("json")
  2042  	if res != nil && res.StatusCode == http.StatusNotModified {
  2043  		if res.Body != nil {
  2044  			res.Body.Close()
  2045  		}
  2046  		return nil, gensupport.WrapError(&googleapi.Error{
  2047  			Code:   res.StatusCode,
  2048  			Header: res.Header,
  2049  		})
  2050  	}
  2051  	if err != nil {
  2052  		return nil, err
  2053  	}
  2054  	defer googleapi.CloseBody(res)
  2055  	if err := googleapi.CheckResponse(res); err != nil {
  2056  		return nil, gensupport.WrapError(err)
  2057  	}
  2058  	ret := &ListTablesResponse{
  2059  		ServerResponse: googleapi.ServerResponse{
  2060  			Header:         res.Header,
  2061  			HTTPStatusCode: res.StatusCode,
  2062  		},
  2063  	}
  2064  	target := &ret
  2065  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2066  		return nil, err
  2067  	}
  2068  	return ret, nil
  2069  }
  2070  
  2071  // Pages invokes f for each page of results.
  2072  // A non-nil error returned from f will halt the iteration.
  2073  // The provided context supersedes any context provided to the Context method.
  2074  func (c *ProjectsLocationsCatalogsDatabasesTablesListCall) Pages(ctx context.Context, f func(*ListTablesResponse) error) error {
  2075  	c.ctx_ = ctx
  2076  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2077  	for {
  2078  		x, err := c.Do()
  2079  		if err != nil {
  2080  			return err
  2081  		}
  2082  		if err := f(x); err != nil {
  2083  			return err
  2084  		}
  2085  		if x.NextPageToken == "" {
  2086  			return nil
  2087  		}
  2088  		c.PageToken(x.NextPageToken)
  2089  	}
  2090  }
  2091  
  2092  type ProjectsLocationsCatalogsDatabasesTablesPatchCall struct {
  2093  	s          *Service
  2094  	name       string
  2095  	table      *Table
  2096  	urlParams_ gensupport.URLParams
  2097  	ctx_       context.Context
  2098  	header_    http.Header
  2099  }
  2100  
  2101  // Patch: Updates an existing table specified by the table ID.
  2102  //
  2103  //   - name: Output only. The resource name. Format:
  2104  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  2105  //     d}/databases/{database_id}/tables/{table_id}.
  2106  func (r *ProjectsLocationsCatalogsDatabasesTablesService) Patch(name string, table *Table) *ProjectsLocationsCatalogsDatabasesTablesPatchCall {
  2107  	c := &ProjectsLocationsCatalogsDatabasesTablesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2108  	c.name = name
  2109  	c.table = table
  2110  	return c
  2111  }
  2112  
  2113  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  2114  // update. For the `FieldMask` definition, see
  2115  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  2116  // If not set, defaults to all of the fields that are allowed to update.
  2117  func (c *ProjectsLocationsCatalogsDatabasesTablesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsDatabasesTablesPatchCall {
  2118  	c.urlParams_.Set("updateMask", updateMask)
  2119  	return c
  2120  }
  2121  
  2122  // Fields allows partial responses to be retrieved. See
  2123  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2124  // details.
  2125  func (c *ProjectsLocationsCatalogsDatabasesTablesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesTablesPatchCall {
  2126  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2127  	return c
  2128  }
  2129  
  2130  // Context sets the context to be used in this call's Do method.
  2131  func (c *ProjectsLocationsCatalogsDatabasesTablesPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesTablesPatchCall {
  2132  	c.ctx_ = ctx
  2133  	return c
  2134  }
  2135  
  2136  // Header returns a http.Header that can be modified by the caller to add
  2137  // headers to the request.
  2138  func (c *ProjectsLocationsCatalogsDatabasesTablesPatchCall) Header() http.Header {
  2139  	if c.header_ == nil {
  2140  		c.header_ = make(http.Header)
  2141  	}
  2142  	return c.header_
  2143  }
  2144  
  2145  func (c *ProjectsLocationsCatalogsDatabasesTablesPatchCall) doRequest(alt string) (*http.Response, error) {
  2146  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2147  	var body io.Reader = nil
  2148  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
  2149  	if err != nil {
  2150  		return nil, err
  2151  	}
  2152  	c.urlParams_.Set("alt", alt)
  2153  	c.urlParams_.Set("prettyPrint", "false")
  2154  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2155  	urls += "?" + c.urlParams_.Encode()
  2156  	req, err := http.NewRequest("PATCH", urls, body)
  2157  	if err != nil {
  2158  		return nil, err
  2159  	}
  2160  	req.Header = reqHeaders
  2161  	googleapi.Expand(req.URL, map[string]string{
  2162  		"name": c.name,
  2163  	})
  2164  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2165  }
  2166  
  2167  // Do executes the "biglake.projects.locations.catalogs.databases.tables.patch" call.
  2168  // Any non-2xx status code is an error. Response headers are in either
  2169  // *Table.ServerResponse.Header or (if a response was returned at all) in
  2170  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2171  // whether the returned error was because http.StatusNotModified was returned.
  2172  func (c *ProjectsLocationsCatalogsDatabasesTablesPatchCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  2173  	gensupport.SetOptions(c.urlParams_, opts...)
  2174  	res, err := c.doRequest("json")
  2175  	if res != nil && res.StatusCode == http.StatusNotModified {
  2176  		if res.Body != nil {
  2177  			res.Body.Close()
  2178  		}
  2179  		return nil, gensupport.WrapError(&googleapi.Error{
  2180  			Code:   res.StatusCode,
  2181  			Header: res.Header,
  2182  		})
  2183  	}
  2184  	if err != nil {
  2185  		return nil, err
  2186  	}
  2187  	defer googleapi.CloseBody(res)
  2188  	if err := googleapi.CheckResponse(res); err != nil {
  2189  		return nil, gensupport.WrapError(err)
  2190  	}
  2191  	ret := &Table{
  2192  		ServerResponse: googleapi.ServerResponse{
  2193  			Header:         res.Header,
  2194  			HTTPStatusCode: res.StatusCode,
  2195  		},
  2196  	}
  2197  	target := &ret
  2198  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2199  		return nil, err
  2200  	}
  2201  	return ret, nil
  2202  }
  2203  
  2204  type ProjectsLocationsCatalogsDatabasesTablesRenameCall struct {
  2205  	s                  *Service
  2206  	name               string
  2207  	renametablerequest *RenameTableRequest
  2208  	urlParams_         gensupport.URLParams
  2209  	ctx_               context.Context
  2210  	header_            http.Header
  2211  }
  2212  
  2213  // Rename: Renames an existing table specified by the table ID.
  2214  //
  2215  //   - name: The table's `name` field is used to identify the table to rename.
  2216  //     Format:
  2217  //     projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_i
  2218  //     d}/databases/{database_id}/tables/{table_id}.
  2219  func (r *ProjectsLocationsCatalogsDatabasesTablesService) Rename(name string, renametablerequest *RenameTableRequest) *ProjectsLocationsCatalogsDatabasesTablesRenameCall {
  2220  	c := &ProjectsLocationsCatalogsDatabasesTablesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2221  	c.name = name
  2222  	c.renametablerequest = renametablerequest
  2223  	return c
  2224  }
  2225  
  2226  // Fields allows partial responses to be retrieved. See
  2227  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2228  // details.
  2229  func (c *ProjectsLocationsCatalogsDatabasesTablesRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsDatabasesTablesRenameCall {
  2230  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2231  	return c
  2232  }
  2233  
  2234  // Context sets the context to be used in this call's Do method.
  2235  func (c *ProjectsLocationsCatalogsDatabasesTablesRenameCall) Context(ctx context.Context) *ProjectsLocationsCatalogsDatabasesTablesRenameCall {
  2236  	c.ctx_ = ctx
  2237  	return c
  2238  }
  2239  
  2240  // Header returns a http.Header that can be modified by the caller to add
  2241  // headers to the request.
  2242  func (c *ProjectsLocationsCatalogsDatabasesTablesRenameCall) Header() http.Header {
  2243  	if c.header_ == nil {
  2244  		c.header_ = make(http.Header)
  2245  	}
  2246  	return c.header_
  2247  }
  2248  
  2249  func (c *ProjectsLocationsCatalogsDatabasesTablesRenameCall) doRequest(alt string) (*http.Response, error) {
  2250  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2251  	var body io.Reader = nil
  2252  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.renametablerequest)
  2253  	if err != nil {
  2254  		return nil, err
  2255  	}
  2256  	c.urlParams_.Set("alt", alt)
  2257  	c.urlParams_.Set("prettyPrint", "false")
  2258  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rename")
  2259  	urls += "?" + c.urlParams_.Encode()
  2260  	req, err := http.NewRequest("POST", urls, body)
  2261  	if err != nil {
  2262  		return nil, err
  2263  	}
  2264  	req.Header = reqHeaders
  2265  	googleapi.Expand(req.URL, map[string]string{
  2266  		"name": c.name,
  2267  	})
  2268  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2269  }
  2270  
  2271  // Do executes the "biglake.projects.locations.catalogs.databases.tables.rename" call.
  2272  // Any non-2xx status code is an error. Response headers are in either
  2273  // *Table.ServerResponse.Header or (if a response was returned at all) in
  2274  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2275  // whether the returned error was because http.StatusNotModified was returned.
  2276  func (c *ProjectsLocationsCatalogsDatabasesTablesRenameCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  2277  	gensupport.SetOptions(c.urlParams_, opts...)
  2278  	res, err := c.doRequest("json")
  2279  	if res != nil && res.StatusCode == http.StatusNotModified {
  2280  		if res.Body != nil {
  2281  			res.Body.Close()
  2282  		}
  2283  		return nil, gensupport.WrapError(&googleapi.Error{
  2284  			Code:   res.StatusCode,
  2285  			Header: res.Header,
  2286  		})
  2287  	}
  2288  	if err != nil {
  2289  		return nil, err
  2290  	}
  2291  	defer googleapi.CloseBody(res)
  2292  	if err := googleapi.CheckResponse(res); err != nil {
  2293  		return nil, gensupport.WrapError(err)
  2294  	}
  2295  	ret := &Table{
  2296  		ServerResponse: googleapi.ServerResponse{
  2297  			Header:         res.Header,
  2298  			HTTPStatusCode: res.StatusCode,
  2299  		},
  2300  	}
  2301  	target := &ret
  2302  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2303  		return nil, err
  2304  	}
  2305  	return ret, nil
  2306  }
  2307  

View as plain text