...

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

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

     1  // Copyright 2020 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package fusiontables provides access to the Fusion Tables API.
     8  //
     9  // For product documentation, see: https://developers.google.com/fusiontables
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/fusiontables/v1"
    16  //	...
    17  //	ctx := context.Background()
    18  //	fusiontablesService, err := fusiontables.NewService(ctx)
    19  //
    20  // In this example, Google Application Default Credentials are used for authentication.
    21  //
    22  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    23  //
    24  // # Other authentication options
    25  //
    26  // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
    27  //
    28  //	fusiontablesService, err := fusiontables.NewService(ctx, option.WithScopes(fusiontables.FusiontablesReadonlyScope))
    29  //
    30  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    31  //
    32  //	fusiontablesService, err := fusiontables.NewService(ctx, option.WithAPIKey("AIza..."))
    33  //
    34  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    35  //
    36  //	config := &oauth2.Config{...}
    37  //	// ...
    38  //	token, err := config.Exchange(ctx, ...)
    39  //	fusiontablesService, err := fusiontables.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    40  //
    41  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    42  package fusiontables // import "google.golang.org/api/fusiontables/v1"
    43  
    44  import (
    45  	"bytes"
    46  	"context"
    47  	"encoding/json"
    48  	"errors"
    49  	"fmt"
    50  	"io"
    51  	"net/http"
    52  	"net/url"
    53  	"strconv"
    54  	"strings"
    55  
    56  	googleapi "google.golang.org/api/googleapi"
    57  	gensupport "google.golang.org/api/internal/gensupport"
    58  	option "google.golang.org/api/option"
    59  	htransport "google.golang.org/api/transport/http"
    60  )
    61  
    62  // Always reference these packages, just in case the auto-generated code
    63  // below doesn't.
    64  var _ = bytes.NewBuffer
    65  var _ = strconv.Itoa
    66  var _ = fmt.Sprintf
    67  var _ = json.NewDecoder
    68  var _ = io.Copy
    69  var _ = url.Parse
    70  var _ = gensupport.MarshalJSON
    71  var _ = googleapi.Version
    72  var _ = errors.New
    73  var _ = strings.Replace
    74  var _ = context.Canceled
    75  
    76  const apiId = "fusiontables:v1"
    77  const apiName = "fusiontables"
    78  const apiVersion = "v1"
    79  const basePath = "https://www.googleapis.com/fusiontables/v1/"
    80  
    81  // OAuth2 scopes used by this API.
    82  const (
    83  	// Manage your Fusion Tables
    84  	FusiontablesScope = "https://www.googleapis.com/auth/fusiontables"
    85  
    86  	// View your Fusion Tables
    87  	FusiontablesReadonlyScope = "https://www.googleapis.com/auth/fusiontables.readonly"
    88  )
    89  
    90  // NewService creates a new Service.
    91  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    92  	scopesOption := option.WithScopes(
    93  		"https://www.googleapis.com/auth/fusiontables",
    94  		"https://www.googleapis.com/auth/fusiontables.readonly",
    95  	)
    96  	// NOTE: prepend, so we don't override user-specified scopes.
    97  	opts = append([]option.ClientOption{scopesOption}, opts...)
    98  	client, endpoint, err := htransport.NewClient(ctx, opts...)
    99  	if err != nil {
   100  		return nil, err
   101  	}
   102  	s, err := New(client)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	if endpoint != "" {
   107  		s.BasePath = endpoint
   108  	}
   109  	return s, nil
   110  }
   111  
   112  // New creates a new Service. It uses the provided http.Client for requests.
   113  //
   114  // Deprecated: please use NewService instead.
   115  // To provide a custom HTTP client, use option.WithHTTPClient.
   116  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   117  func New(client *http.Client) (*Service, error) {
   118  	if client == nil {
   119  		return nil, errors.New("client is nil")
   120  	}
   121  	s := &Service{client: client, BasePath: basePath}
   122  	s.Column = NewColumnService(s)
   123  	s.Query = NewQueryService(s)
   124  	s.Style = NewStyleService(s)
   125  	s.Table = NewTableService(s)
   126  	s.Task = NewTaskService(s)
   127  	s.Template = NewTemplateService(s)
   128  	return s, nil
   129  }
   130  
   131  type Service struct {
   132  	client    *http.Client
   133  	BasePath  string // API endpoint base URL
   134  	UserAgent string // optional additional User-Agent fragment
   135  
   136  	Column *ColumnService
   137  
   138  	Query *QueryService
   139  
   140  	Style *StyleService
   141  
   142  	Table *TableService
   143  
   144  	Task *TaskService
   145  
   146  	Template *TemplateService
   147  }
   148  
   149  func (s *Service) userAgent() string {
   150  	if s.UserAgent == "" {
   151  		return googleapi.UserAgent
   152  	}
   153  	return googleapi.UserAgent + " " + s.UserAgent
   154  }
   155  
   156  func NewColumnService(s *Service) *ColumnService {
   157  	rs := &ColumnService{s: s}
   158  	return rs
   159  }
   160  
   161  type ColumnService struct {
   162  	s *Service
   163  }
   164  
   165  func NewQueryService(s *Service) *QueryService {
   166  	rs := &QueryService{s: s}
   167  	return rs
   168  }
   169  
   170  type QueryService struct {
   171  	s *Service
   172  }
   173  
   174  func NewStyleService(s *Service) *StyleService {
   175  	rs := &StyleService{s: s}
   176  	return rs
   177  }
   178  
   179  type StyleService struct {
   180  	s *Service
   181  }
   182  
   183  func NewTableService(s *Service) *TableService {
   184  	rs := &TableService{s: s}
   185  	return rs
   186  }
   187  
   188  type TableService struct {
   189  	s *Service
   190  }
   191  
   192  func NewTaskService(s *Service) *TaskService {
   193  	rs := &TaskService{s: s}
   194  	return rs
   195  }
   196  
   197  type TaskService struct {
   198  	s *Service
   199  }
   200  
   201  func NewTemplateService(s *Service) *TemplateService {
   202  	rs := &TemplateService{s: s}
   203  	return rs
   204  }
   205  
   206  type TemplateService struct {
   207  	s *Service
   208  }
   209  
   210  // Bucket: Specifies the minimum and maximum values, the color, opacity,
   211  // icon and weight of a bucket within a StyleSetting.
   212  type Bucket struct {
   213  	// Color: Color of line or the interior of a polygon in #RRGGBB format.
   214  	Color string `json:"color,omitempty"`
   215  
   216  	// Icon: Icon name used for a point.
   217  	Icon string `json:"icon,omitempty"`
   218  
   219  	// Max: Maximum value in the selected column for a row to be styled
   220  	// according to the bucket color, opacity, icon, or weight.
   221  	Max float64 `json:"max,omitempty"`
   222  
   223  	// Min: Minimum value in the selected column for a row to be styled
   224  	// according to the bucket color, opacity, icon, or weight.
   225  	Min float64 `json:"min,omitempty"`
   226  
   227  	// Opacity: Opacity of the color: 0.0 (transparent) to 1.0 (opaque).
   228  	Opacity float64 `json:"opacity,omitempty"`
   229  
   230  	// Weight: Width of a line (in pixels).
   231  	Weight int64 `json:"weight,omitempty"`
   232  
   233  	// ForceSendFields is a list of field names (e.g. "Color") to
   234  	// unconditionally include in API requests. By default, fields with
   235  	// empty values are omitted from API requests. However, any non-pointer,
   236  	// non-interface field appearing in ForceSendFields will be sent to the
   237  	// server regardless of whether the field is empty or not. This may be
   238  	// used to include empty fields in Patch requests.
   239  	ForceSendFields []string `json:"-"`
   240  
   241  	// NullFields is a list of field names (e.g. "Color") to include in API
   242  	// requests with the JSON null value. By default, fields with empty
   243  	// values are omitted from API requests. However, any field with an
   244  	// empty value appearing in NullFields will be sent to the server as
   245  	// null. It is an error if a field in this list has a non-empty value.
   246  	// This may be used to include null fields in Patch requests.
   247  	NullFields []string `json:"-"`
   248  }
   249  
   250  func (s *Bucket) MarshalJSON() ([]byte, error) {
   251  	type NoMethod Bucket
   252  	raw := NoMethod(*s)
   253  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   254  }
   255  
   256  func (s *Bucket) UnmarshalJSON(data []byte) error {
   257  	type NoMethod Bucket
   258  	var s1 struct {
   259  		Max     gensupport.JSONFloat64 `json:"max"`
   260  		Min     gensupport.JSONFloat64 `json:"min"`
   261  		Opacity gensupport.JSONFloat64 `json:"opacity"`
   262  		*NoMethod
   263  	}
   264  	s1.NoMethod = (*NoMethod)(s)
   265  	if err := json.Unmarshal(data, &s1); err != nil {
   266  		return err
   267  	}
   268  	s.Max = float64(s1.Max)
   269  	s.Min = float64(s1.Min)
   270  	s.Opacity = float64(s1.Opacity)
   271  	return nil
   272  }
   273  
   274  // Column: Specifies the id, name and type of a column in a table.
   275  type Column struct {
   276  	// BaseColumn: Optional identifier of the base column. If present, this
   277  	// column is derived from the specified base column.
   278  	BaseColumn *ColumnBaseColumn `json:"baseColumn,omitempty"`
   279  
   280  	// ColumnId: Identifier for the column.
   281  	ColumnId int64 `json:"columnId,omitempty"`
   282  
   283  	// Description: Optional column description.
   284  	Description string `json:"description,omitempty"`
   285  
   286  	// GraphPredicate: Optional column predicate. Used to map table to graph
   287  	// data model (subject,predicate,object) See
   288  	// http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#data-model
   289  	GraphPredicate string `json:"graph_predicate,omitempty"`
   290  
   291  	// Kind: Type name: a template for an individual column.
   292  	Kind string `json:"kind,omitempty"`
   293  
   294  	// Name: Required name of the column.
   295  	Name string `json:"name,omitempty"`
   296  
   297  	// Type: Required type of the column.
   298  	Type string `json:"type,omitempty"`
   299  
   300  	// ServerResponse contains the HTTP response code and headers from the
   301  	// server.
   302  	googleapi.ServerResponse `json:"-"`
   303  
   304  	// ForceSendFields is a list of field names (e.g. "BaseColumn") to
   305  	// unconditionally include in API requests. By default, fields with
   306  	// empty values are omitted from API requests. However, any non-pointer,
   307  	// non-interface field appearing in ForceSendFields will be sent to the
   308  	// server regardless of whether the field is empty or not. This may be
   309  	// used to include empty fields in Patch requests.
   310  	ForceSendFields []string `json:"-"`
   311  
   312  	// NullFields is a list of field names (e.g. "BaseColumn") to include in
   313  	// API requests with the JSON null value. By default, fields with empty
   314  	// values are omitted from API requests. However, any field with an
   315  	// empty value appearing in NullFields will be sent to the server as
   316  	// null. It is an error if a field in this list has a non-empty value.
   317  	// This may be used to include null fields in Patch requests.
   318  	NullFields []string `json:"-"`
   319  }
   320  
   321  func (s *Column) MarshalJSON() ([]byte, error) {
   322  	type NoMethod Column
   323  	raw := NoMethod(*s)
   324  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   325  }
   326  
   327  // ColumnBaseColumn: Optional identifier of the base column. If present,
   328  // this column is derived from the specified base column.
   329  type ColumnBaseColumn struct {
   330  	// ColumnId: The id of the column in the base table from which this
   331  	// column is derived.
   332  	ColumnId int64 `json:"columnId,omitempty"`
   333  
   334  	// TableIndex: Offset to the entry in the list of base tables in the
   335  	// table definition.
   336  	TableIndex int64 `json:"tableIndex,omitempty"`
   337  
   338  	// ForceSendFields is a list of field names (e.g. "ColumnId") to
   339  	// unconditionally include in API requests. By default, fields with
   340  	// empty values are omitted from API requests. However, any non-pointer,
   341  	// non-interface field appearing in ForceSendFields will be sent to the
   342  	// server regardless of whether the field is empty or not. This may be
   343  	// used to include empty fields in Patch requests.
   344  	ForceSendFields []string `json:"-"`
   345  
   346  	// NullFields is a list of field names (e.g. "ColumnId") to include in
   347  	// API requests with the JSON null value. By default, fields with empty
   348  	// values are omitted from API requests. However, any field with an
   349  	// empty value appearing in NullFields will be sent to the server as
   350  	// null. It is an error if a field in this list has a non-empty value.
   351  	// This may be used to include null fields in Patch requests.
   352  	NullFields []string `json:"-"`
   353  }
   354  
   355  func (s *ColumnBaseColumn) MarshalJSON() ([]byte, error) {
   356  	type NoMethod ColumnBaseColumn
   357  	raw := NoMethod(*s)
   358  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   359  }
   360  
   361  // ColumnList: Represents a list of columns in a table.
   362  type ColumnList struct {
   363  	// Items: List of all requested columns.
   364  	Items []*Column `json:"items,omitempty"`
   365  
   366  	// Kind: Type name: a list of all columns.
   367  	Kind string `json:"kind,omitempty"`
   368  
   369  	// NextPageToken: Token used to access the next page of this result. No
   370  	// token is displayed if there are no more pages left.
   371  	NextPageToken string `json:"nextPageToken,omitempty"`
   372  
   373  	// TotalItems: Total number of columns for the table.
   374  	TotalItems int64 `json:"totalItems,omitempty"`
   375  
   376  	// ServerResponse contains the HTTP response code and headers from the
   377  	// server.
   378  	googleapi.ServerResponse `json:"-"`
   379  
   380  	// ForceSendFields is a list of field names (e.g. "Items") to
   381  	// unconditionally include in API requests. By default, fields with
   382  	// empty values are omitted from API requests. However, any non-pointer,
   383  	// non-interface field appearing in ForceSendFields will be sent to the
   384  	// server regardless of whether the field is empty or not. This may be
   385  	// used to include empty fields in Patch requests.
   386  	ForceSendFields []string `json:"-"`
   387  
   388  	// NullFields is a list of field names (e.g. "Items") to include in API
   389  	// requests with the JSON null value. By default, fields with empty
   390  	// values are omitted from API requests. However, any field with an
   391  	// empty value appearing in NullFields will be sent to the server as
   392  	// null. It is an error if a field in this list has a non-empty value.
   393  	// This may be used to include null fields in Patch requests.
   394  	NullFields []string `json:"-"`
   395  }
   396  
   397  func (s *ColumnList) MarshalJSON() ([]byte, error) {
   398  	type NoMethod ColumnList
   399  	raw := NoMethod(*s)
   400  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   401  }
   402  
   403  // Geometry: Represents a Geometry object.
   404  type Geometry struct {
   405  	// Geometries: The list of geometries in this geometry collection.
   406  	Geometries []interface{} `json:"geometries,omitempty"`
   407  
   408  	Geometry interface{} `json:"geometry,omitempty"`
   409  
   410  	// Type: Type: A collection of geometries.
   411  	Type string `json:"type,omitempty"`
   412  
   413  	// ForceSendFields is a list of field names (e.g. "Geometries") to
   414  	// unconditionally include in API requests. By default, fields with
   415  	// empty values are omitted from API requests. However, any non-pointer,
   416  	// non-interface field appearing in ForceSendFields will be sent to the
   417  	// server regardless of whether the field is empty or not. This may be
   418  	// used to include empty fields in Patch requests.
   419  	ForceSendFields []string `json:"-"`
   420  
   421  	// NullFields is a list of field names (e.g. "Geometries") to include in
   422  	// API requests with the JSON null value. By default, fields with empty
   423  	// values are omitted from API requests. However, any field with an
   424  	// empty value appearing in NullFields will be sent to the server as
   425  	// null. It is an error if a field in this list has a non-empty value.
   426  	// This may be used to include null fields in Patch requests.
   427  	NullFields []string `json:"-"`
   428  }
   429  
   430  func (s *Geometry) MarshalJSON() ([]byte, error) {
   431  	type NoMethod Geometry
   432  	raw := NoMethod(*s)
   433  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   434  }
   435  
   436  // Import: Represents an import request.
   437  type Import struct {
   438  	// Kind: Type name: a template for an import request.
   439  	Kind string `json:"kind,omitempty"`
   440  
   441  	// NumRowsReceived: The number of rows received from the import request.
   442  	NumRowsReceived int64 `json:"numRowsReceived,omitempty,string"`
   443  
   444  	// ServerResponse contains the HTTP response code and headers from the
   445  	// server.
   446  	googleapi.ServerResponse `json:"-"`
   447  
   448  	// ForceSendFields is a list of field names (e.g. "Kind") to
   449  	// unconditionally include in API requests. By default, fields with
   450  	// empty values are omitted from API requests. However, any non-pointer,
   451  	// non-interface field appearing in ForceSendFields will be sent to the
   452  	// server regardless of whether the field is empty or not. This may be
   453  	// used to include empty fields in Patch requests.
   454  	ForceSendFields []string `json:"-"`
   455  
   456  	// NullFields is a list of field names (e.g. "Kind") to include in API
   457  	// requests with the JSON null value. By default, fields with empty
   458  	// values are omitted from API requests. However, any field with an
   459  	// empty value appearing in NullFields will be sent to the server as
   460  	// null. It is an error if a field in this list has a non-empty value.
   461  	// This may be used to include null fields in Patch requests.
   462  	NullFields []string `json:"-"`
   463  }
   464  
   465  func (s *Import) MarshalJSON() ([]byte, error) {
   466  	type NoMethod Import
   467  	raw := NoMethod(*s)
   468  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   469  }
   470  
   471  // Line: Represents a line geometry.
   472  type Line struct {
   473  	// Coordinates: The coordinates that define the line.
   474  	Coordinates [][]float64 `json:"coordinates,omitempty"`
   475  
   476  	// Type: Type: A line geometry.
   477  	Type string `json:"type,omitempty"`
   478  
   479  	// ForceSendFields is a list of field names (e.g. "Coordinates") to
   480  	// unconditionally include in API requests. By default, fields with
   481  	// empty values are omitted from API requests. However, any non-pointer,
   482  	// non-interface field appearing in ForceSendFields will be sent to the
   483  	// server regardless of whether the field is empty or not. This may be
   484  	// used to include empty fields in Patch requests.
   485  	ForceSendFields []string `json:"-"`
   486  
   487  	// NullFields is a list of field names (e.g. "Coordinates") to include
   488  	// in API requests with the JSON null value. By default, fields with
   489  	// empty values are omitted from API requests. However, any field with
   490  	// an empty value appearing in NullFields will be sent to the server as
   491  	// null. It is an error if a field in this list has a non-empty value.
   492  	// This may be used to include null fields in Patch requests.
   493  	NullFields []string `json:"-"`
   494  }
   495  
   496  func (s *Line) MarshalJSON() ([]byte, error) {
   497  	type NoMethod Line
   498  	raw := NoMethod(*s)
   499  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   500  }
   501  
   502  // LineStyle: Represents a LineStyle within a StyleSetting
   503  type LineStyle struct {
   504  	// StrokeColor: Color of the line in #RRGGBB format.
   505  	StrokeColor string `json:"strokeColor,omitempty"`
   506  
   507  	// StrokeColorStyler: Column-value, gradient or buckets styler that is
   508  	// used to determine the line color and opacity.
   509  	StrokeColorStyler *StyleFunction `json:"strokeColorStyler,omitempty"`
   510  
   511  	// StrokeOpacity: Opacity of the line : 0.0 (transparent) to 1.0
   512  	// (opaque).
   513  	StrokeOpacity float64 `json:"strokeOpacity,omitempty"`
   514  
   515  	// StrokeWeight: Width of the line in pixels.
   516  	StrokeWeight int64 `json:"strokeWeight,omitempty"`
   517  
   518  	// StrokeWeightStyler: Column-value or bucket styler that is used to
   519  	// determine the width of the line.
   520  	StrokeWeightStyler *StyleFunction `json:"strokeWeightStyler,omitempty"`
   521  
   522  	// ForceSendFields is a list of field names (e.g. "StrokeColor") to
   523  	// unconditionally include in API requests. By default, fields with
   524  	// empty values are omitted from API requests. However, any non-pointer,
   525  	// non-interface field appearing in ForceSendFields will be sent to the
   526  	// server regardless of whether the field is empty or not. This may be
   527  	// used to include empty fields in Patch requests.
   528  	ForceSendFields []string `json:"-"`
   529  
   530  	// NullFields is a list of field names (e.g. "StrokeColor") to include
   531  	// in API requests with the JSON null value. By default, fields with
   532  	// empty values are omitted from API requests. However, any field with
   533  	// an empty value appearing in NullFields will be sent to the server as
   534  	// null. It is an error if a field in this list has a non-empty value.
   535  	// This may be used to include null fields in Patch requests.
   536  	NullFields []string `json:"-"`
   537  }
   538  
   539  func (s *LineStyle) MarshalJSON() ([]byte, error) {
   540  	type NoMethod LineStyle
   541  	raw := NoMethod(*s)
   542  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   543  }
   544  
   545  func (s *LineStyle) UnmarshalJSON(data []byte) error {
   546  	type NoMethod LineStyle
   547  	var s1 struct {
   548  		StrokeOpacity gensupport.JSONFloat64 `json:"strokeOpacity"`
   549  		*NoMethod
   550  	}
   551  	s1.NoMethod = (*NoMethod)(s)
   552  	if err := json.Unmarshal(data, &s1); err != nil {
   553  		return err
   554  	}
   555  	s.StrokeOpacity = float64(s1.StrokeOpacity)
   556  	return nil
   557  }
   558  
   559  // Point: Represents a point object.
   560  type Point struct {
   561  	// Coordinates: The coordinates that define the point.
   562  	Coordinates []float64 `json:"coordinates,omitempty"`
   563  
   564  	// Type: Point: A point geometry.
   565  	Type string `json:"type,omitempty"`
   566  
   567  	// ForceSendFields is a list of field names (e.g. "Coordinates") to
   568  	// unconditionally include in API requests. By default, fields with
   569  	// empty values are omitted from API requests. However, any non-pointer,
   570  	// non-interface field appearing in ForceSendFields will be sent to the
   571  	// server regardless of whether the field is empty or not. This may be
   572  	// used to include empty fields in Patch requests.
   573  	ForceSendFields []string `json:"-"`
   574  
   575  	// NullFields is a list of field names (e.g. "Coordinates") to include
   576  	// in API requests with the JSON null value. By default, fields with
   577  	// empty values are omitted from API requests. However, any field with
   578  	// an empty value appearing in NullFields will be sent to the server as
   579  	// null. It is an error if a field in this list has a non-empty value.
   580  	// This may be used to include null fields in Patch requests.
   581  	NullFields []string `json:"-"`
   582  }
   583  
   584  func (s *Point) MarshalJSON() ([]byte, error) {
   585  	type NoMethod Point
   586  	raw := NoMethod(*s)
   587  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   588  }
   589  
   590  // PointStyle: Represents a PointStyle within a StyleSetting
   591  type PointStyle struct {
   592  	// IconName: Name of the icon. Use values defined in
   593  	// http://www.google.com/fusiontables/DataSource?dsrcid=308519
   594  	IconName string `json:"iconName,omitempty"`
   595  
   596  	// IconStyler: Column or a bucket value from which the icon name is to
   597  	// be determined.
   598  	IconStyler *StyleFunction `json:"iconStyler,omitempty"`
   599  
   600  	// ForceSendFields is a list of field names (e.g. "IconName") to
   601  	// unconditionally include in API requests. By default, fields with
   602  	// empty values are omitted from API requests. However, any non-pointer,
   603  	// non-interface field appearing in ForceSendFields will be sent to the
   604  	// server regardless of whether the field is empty or not. This may be
   605  	// used to include empty fields in Patch requests.
   606  	ForceSendFields []string `json:"-"`
   607  
   608  	// NullFields is a list of field names (e.g. "IconName") to include in
   609  	// API requests with the JSON null value. By default, fields with empty
   610  	// values are omitted from API requests. However, any field with an
   611  	// empty value appearing in NullFields will be sent to the server as
   612  	// null. It is an error if a field in this list has a non-empty value.
   613  	// This may be used to include null fields in Patch requests.
   614  	NullFields []string `json:"-"`
   615  }
   616  
   617  func (s *PointStyle) MarshalJSON() ([]byte, error) {
   618  	type NoMethod PointStyle
   619  	raw := NoMethod(*s)
   620  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   621  }
   622  
   623  // Polygon: Represents a polygon object.
   624  type Polygon struct {
   625  	// Coordinates: The coordinates that define the polygon.
   626  	Coordinates [][][]float64 `json:"coordinates,omitempty"`
   627  
   628  	// Type: Type: A polygon geometry.
   629  	Type string `json:"type,omitempty"`
   630  
   631  	// ForceSendFields is a list of field names (e.g. "Coordinates") to
   632  	// unconditionally include in API requests. By default, fields with
   633  	// empty values are omitted from API requests. However, any non-pointer,
   634  	// non-interface field appearing in ForceSendFields will be sent to the
   635  	// server regardless of whether the field is empty or not. This may be
   636  	// used to include empty fields in Patch requests.
   637  	ForceSendFields []string `json:"-"`
   638  
   639  	// NullFields is a list of field names (e.g. "Coordinates") to include
   640  	// in API requests with the JSON null value. By default, fields with
   641  	// empty values are omitted from API requests. However, any field with
   642  	// an empty value appearing in NullFields will be sent to the server as
   643  	// null. It is an error if a field in this list has a non-empty value.
   644  	// This may be used to include null fields in Patch requests.
   645  	NullFields []string `json:"-"`
   646  }
   647  
   648  func (s *Polygon) MarshalJSON() ([]byte, error) {
   649  	type NoMethod Polygon
   650  	raw := NoMethod(*s)
   651  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   652  }
   653  
   654  // PolygonStyle: Represents a PolygonStyle within a StyleSetting
   655  type PolygonStyle struct {
   656  	// FillColor: Color of the interior of the polygon in #RRGGBB format.
   657  	FillColor string `json:"fillColor,omitempty"`
   658  
   659  	// FillColorStyler: Column-value, gradient, or bucket styler that is
   660  	// used to determine the interior color and opacity of the polygon.
   661  	FillColorStyler *StyleFunction `json:"fillColorStyler,omitempty"`
   662  
   663  	// FillOpacity: Opacity of the interior of the polygon: 0.0
   664  	// (transparent) to 1.0 (opaque).
   665  	FillOpacity float64 `json:"fillOpacity,omitempty"`
   666  
   667  	// StrokeColor: Color of the polygon border in #RRGGBB format.
   668  	StrokeColor string `json:"strokeColor,omitempty"`
   669  
   670  	// StrokeColorStyler: Column-value, gradient or buckets styler that is
   671  	// used to determine the border color and opacity.
   672  	StrokeColorStyler *StyleFunction `json:"strokeColorStyler,omitempty"`
   673  
   674  	// StrokeOpacity: Opacity of the polygon border: 0.0 (transparent) to
   675  	// 1.0 (opaque).
   676  	StrokeOpacity float64 `json:"strokeOpacity,omitempty"`
   677  
   678  	// StrokeWeight: Width of the polyon border in pixels.
   679  	StrokeWeight int64 `json:"strokeWeight,omitempty"`
   680  
   681  	// StrokeWeightStyler: Column-value or bucket styler that is used to
   682  	// determine the width of the polygon border.
   683  	StrokeWeightStyler *StyleFunction `json:"strokeWeightStyler,omitempty"`
   684  
   685  	// ForceSendFields is a list of field names (e.g. "FillColor") to
   686  	// unconditionally include in API requests. By default, fields with
   687  	// empty values are omitted from API requests. However, any non-pointer,
   688  	// non-interface field appearing in ForceSendFields will be sent to the
   689  	// server regardless of whether the field is empty or not. This may be
   690  	// used to include empty fields in Patch requests.
   691  	ForceSendFields []string `json:"-"`
   692  
   693  	// NullFields is a list of field names (e.g. "FillColor") to include in
   694  	// API requests with the JSON null value. By default, fields with empty
   695  	// values are omitted from API requests. However, any field with an
   696  	// empty value appearing in NullFields will be sent to the server as
   697  	// null. It is an error if a field in this list has a non-empty value.
   698  	// This may be used to include null fields in Patch requests.
   699  	NullFields []string `json:"-"`
   700  }
   701  
   702  func (s *PolygonStyle) MarshalJSON() ([]byte, error) {
   703  	type NoMethod PolygonStyle
   704  	raw := NoMethod(*s)
   705  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   706  }
   707  
   708  func (s *PolygonStyle) UnmarshalJSON(data []byte) error {
   709  	type NoMethod PolygonStyle
   710  	var s1 struct {
   711  		FillOpacity   gensupport.JSONFloat64 `json:"fillOpacity"`
   712  		StrokeOpacity gensupport.JSONFloat64 `json:"strokeOpacity"`
   713  		*NoMethod
   714  	}
   715  	s1.NoMethod = (*NoMethod)(s)
   716  	if err := json.Unmarshal(data, &s1); err != nil {
   717  		return err
   718  	}
   719  	s.FillOpacity = float64(s1.FillOpacity)
   720  	s.StrokeOpacity = float64(s1.StrokeOpacity)
   721  	return nil
   722  }
   723  
   724  // Sqlresponse: Represents a response to an sql statement.
   725  type Sqlresponse struct {
   726  	// Columns: Columns in the table.
   727  	Columns []string `json:"columns,omitempty"`
   728  
   729  	// Kind: Type name: a template for an individual table.
   730  	Kind string `json:"kind,omitempty"`
   731  
   732  	// Rows: The rows in the table. For each cell we print out whatever cell
   733  	// value (e.g., numeric, string) exists. Thus it is important that each
   734  	// cell contains only one value.
   735  	Rows [][]interface{} `json:"rows,omitempty"`
   736  
   737  	// ServerResponse contains the HTTP response code and headers from the
   738  	// server.
   739  	googleapi.ServerResponse `json:"-"`
   740  
   741  	// ForceSendFields is a list of field names (e.g. "Columns") to
   742  	// unconditionally include in API requests. By default, fields with
   743  	// empty values are omitted from API requests. However, any non-pointer,
   744  	// non-interface field appearing in ForceSendFields will be sent to the
   745  	// server regardless of whether the field is empty or not. This may be
   746  	// used to include empty fields in Patch requests.
   747  	ForceSendFields []string `json:"-"`
   748  
   749  	// NullFields is a list of field names (e.g. "Columns") to include in
   750  	// API requests with the JSON null value. By default, fields with empty
   751  	// values are omitted from API requests. However, any field with an
   752  	// empty value appearing in NullFields will be sent to the server as
   753  	// null. It is an error if a field in this list has a non-empty value.
   754  	// This may be used to include null fields in Patch requests.
   755  	NullFields []string `json:"-"`
   756  }
   757  
   758  func (s *Sqlresponse) MarshalJSON() ([]byte, error) {
   759  	type NoMethod Sqlresponse
   760  	raw := NoMethod(*s)
   761  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   762  }
   763  
   764  // StyleFunction: Represents a StyleFunction within a StyleSetting
   765  type StyleFunction struct {
   766  	// Buckets: Bucket function that assigns a style based on the range a
   767  	// column value falls into.
   768  	Buckets []*Bucket `json:"buckets,omitempty"`
   769  
   770  	// ColumnName: Name of the column whose value is used in the style.
   771  	ColumnName string `json:"columnName,omitempty"`
   772  
   773  	// Gradient: Gradient function that interpolates a range of colors based
   774  	// on column value.
   775  	Gradient *StyleFunctionGradient `json:"gradient,omitempty"`
   776  
   777  	// Kind: Stylers can be one of three kinds: "fusiontables#fromColumn" if
   778  	// the column value is to be used as is, i.e., the column values can
   779  	// have colors in #RRGGBBAA format or integer line widths or icon names;
   780  	// "fusiontables#gradient" if the styling of the row is to be based on
   781  	// applying the gradient function on the column value; or
   782  	// "fusiontables#buckets" if the styling is to based on the bucket into
   783  	// which the the column value falls.
   784  	Kind string `json:"kind,omitempty"`
   785  
   786  	// ForceSendFields is a list of field names (e.g. "Buckets") to
   787  	// unconditionally include in API requests. By default, fields with
   788  	// empty values are omitted from API requests. However, any non-pointer,
   789  	// non-interface field appearing in ForceSendFields will be sent to the
   790  	// server regardless of whether the field is empty or not. This may be
   791  	// used to include empty fields in Patch requests.
   792  	ForceSendFields []string `json:"-"`
   793  
   794  	// NullFields is a list of field names (e.g. "Buckets") to include in
   795  	// API requests with the JSON null value. By default, fields with empty
   796  	// values are omitted from API requests. However, any field with an
   797  	// empty value appearing in NullFields will be sent to the server as
   798  	// null. It is an error if a field in this list has a non-empty value.
   799  	// This may be used to include null fields in Patch requests.
   800  	NullFields []string `json:"-"`
   801  }
   802  
   803  func (s *StyleFunction) MarshalJSON() ([]byte, error) {
   804  	type NoMethod StyleFunction
   805  	raw := NoMethod(*s)
   806  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   807  }
   808  
   809  // StyleFunctionGradient: Gradient function that interpolates a range of
   810  // colors based on column value.
   811  type StyleFunctionGradient struct {
   812  	// Colors: Array with two or more colors.
   813  	Colors []*StyleFunctionGradientColors `json:"colors,omitempty"`
   814  
   815  	// Max: Higher-end of the interpolation range: rows with this value will
   816  	// be assigned to colors[n-1].
   817  	Max float64 `json:"max,omitempty"`
   818  
   819  	// Min: Lower-end of the interpolation range: rows with this value will
   820  	// be assigned to colors[0].
   821  	Min float64 `json:"min,omitempty"`
   822  
   823  	// ForceSendFields is a list of field names (e.g. "Colors") to
   824  	// unconditionally include in API requests. By default, fields with
   825  	// empty values are omitted from API requests. However, any non-pointer,
   826  	// non-interface field appearing in ForceSendFields will be sent to the
   827  	// server regardless of whether the field is empty or not. This may be
   828  	// used to include empty fields in Patch requests.
   829  	ForceSendFields []string `json:"-"`
   830  
   831  	// NullFields is a list of field names (e.g. "Colors") to include in API
   832  	// requests with the JSON null value. By default, fields with empty
   833  	// values are omitted from API requests. However, any field with an
   834  	// empty value appearing in NullFields will be sent to the server as
   835  	// null. It is an error if a field in this list has a non-empty value.
   836  	// This may be used to include null fields in Patch requests.
   837  	NullFields []string `json:"-"`
   838  }
   839  
   840  func (s *StyleFunctionGradient) MarshalJSON() ([]byte, error) {
   841  	type NoMethod StyleFunctionGradient
   842  	raw := NoMethod(*s)
   843  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   844  }
   845  
   846  func (s *StyleFunctionGradient) UnmarshalJSON(data []byte) error {
   847  	type NoMethod StyleFunctionGradient
   848  	var s1 struct {
   849  		Max gensupport.JSONFloat64 `json:"max"`
   850  		Min gensupport.JSONFloat64 `json:"min"`
   851  		*NoMethod
   852  	}
   853  	s1.NoMethod = (*NoMethod)(s)
   854  	if err := json.Unmarshal(data, &s1); err != nil {
   855  		return err
   856  	}
   857  	s.Max = float64(s1.Max)
   858  	s.Min = float64(s1.Min)
   859  	return nil
   860  }
   861  
   862  type StyleFunctionGradientColors struct {
   863  	// Color: Color in #RRGGBB format.
   864  	Color string `json:"color,omitempty"`
   865  
   866  	// Opacity: Opacity of the color: 0.0 (transparent) to 1.0 (opaque).
   867  	Opacity float64 `json:"opacity,omitempty"`
   868  
   869  	// ForceSendFields is a list of field names (e.g. "Color") to
   870  	// unconditionally include in API requests. By default, fields with
   871  	// empty values are omitted from API requests. However, any non-pointer,
   872  	// non-interface field appearing in ForceSendFields will be sent to the
   873  	// server regardless of whether the field is empty or not. This may be
   874  	// used to include empty fields in Patch requests.
   875  	ForceSendFields []string `json:"-"`
   876  
   877  	// NullFields is a list of field names (e.g. "Color") to include in API
   878  	// requests with the JSON null value. By default, fields with empty
   879  	// values are omitted from API requests. However, any field with an
   880  	// empty value appearing in NullFields will be sent to the server as
   881  	// null. It is an error if a field in this list has a non-empty value.
   882  	// This may be used to include null fields in Patch requests.
   883  	NullFields []string `json:"-"`
   884  }
   885  
   886  func (s *StyleFunctionGradientColors) MarshalJSON() ([]byte, error) {
   887  	type NoMethod StyleFunctionGradientColors
   888  	raw := NoMethod(*s)
   889  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   890  }
   891  
   892  func (s *StyleFunctionGradientColors) UnmarshalJSON(data []byte) error {
   893  	type NoMethod StyleFunctionGradientColors
   894  	var s1 struct {
   895  		Opacity gensupport.JSONFloat64 `json:"opacity"`
   896  		*NoMethod
   897  	}
   898  	s1.NoMethod = (*NoMethod)(s)
   899  	if err := json.Unmarshal(data, &s1); err != nil {
   900  		return err
   901  	}
   902  	s.Opacity = float64(s1.Opacity)
   903  	return nil
   904  }
   905  
   906  // StyleSetting: Represents a complete StyleSettings object. The primary
   907  // key is a combination of the tableId and a styleId.
   908  type StyleSetting struct {
   909  	// Kind: Type name: an individual style setting. A StyleSetting contains
   910  	// the style defintions for points, lines, and polygons in a table.
   911  	// Since a table can have any one or all of them, a style definition can
   912  	// have point, line and polygon style definitions.
   913  	Kind string `json:"kind,omitempty"`
   914  
   915  	// MarkerOptions: Style definition for points in the table.
   916  	MarkerOptions *PointStyle `json:"markerOptions,omitempty"`
   917  
   918  	// Name: Optional name for the style setting.
   919  	Name string `json:"name,omitempty"`
   920  
   921  	// PolygonOptions: Style definition for polygons in the table.
   922  	PolygonOptions *PolygonStyle `json:"polygonOptions,omitempty"`
   923  
   924  	// PolylineOptions: Style definition for lines in the table.
   925  	PolylineOptions *LineStyle `json:"polylineOptions,omitempty"`
   926  
   927  	// StyleId: Identifier for the style setting (unique only within
   928  	// tables).
   929  	StyleId int64 `json:"styleId,omitempty"`
   930  
   931  	// TableId: Identifier for the table.
   932  	TableId string `json:"tableId,omitempty"`
   933  
   934  	// ServerResponse contains the HTTP response code and headers from the
   935  	// server.
   936  	googleapi.ServerResponse `json:"-"`
   937  
   938  	// ForceSendFields is a list of field names (e.g. "Kind") to
   939  	// unconditionally include in API requests. By default, fields with
   940  	// empty values are omitted from API requests. However, any non-pointer,
   941  	// non-interface field appearing in ForceSendFields will be sent to the
   942  	// server regardless of whether the field is empty or not. This may be
   943  	// used to include empty fields in Patch requests.
   944  	ForceSendFields []string `json:"-"`
   945  
   946  	// NullFields is a list of field names (e.g. "Kind") to include in API
   947  	// requests with the JSON null value. By default, fields with empty
   948  	// values are omitted from API requests. However, any field with an
   949  	// empty value appearing in NullFields will be sent to the server as
   950  	// null. It is an error if a field in this list has a non-empty value.
   951  	// This may be used to include null fields in Patch requests.
   952  	NullFields []string `json:"-"`
   953  }
   954  
   955  func (s *StyleSetting) MarshalJSON() ([]byte, error) {
   956  	type NoMethod StyleSetting
   957  	raw := NoMethod(*s)
   958  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   959  }
   960  
   961  // StyleSettingList: Represents a list of styles for a given table.
   962  type StyleSettingList struct {
   963  	// Items: All requested style settings.
   964  	Items []*StyleSetting `json:"items,omitempty"`
   965  
   966  	// Kind: Type name: in this case, a list of style settings.
   967  	Kind string `json:"kind,omitempty"`
   968  
   969  	// NextPageToken: Token used to access the next page of this result. No
   970  	// token is displayed if there are no more pages left.
   971  	NextPageToken string `json:"nextPageToken,omitempty"`
   972  
   973  	// TotalItems: Total number of styles for the table.
   974  	TotalItems int64 `json:"totalItems,omitempty"`
   975  
   976  	// ServerResponse contains the HTTP response code and headers from the
   977  	// server.
   978  	googleapi.ServerResponse `json:"-"`
   979  
   980  	// ForceSendFields is a list of field names (e.g. "Items") to
   981  	// unconditionally include in API requests. By default, fields with
   982  	// empty values are omitted from API requests. However, any non-pointer,
   983  	// non-interface field appearing in ForceSendFields will be sent to the
   984  	// server regardless of whether the field is empty or not. This may be
   985  	// used to include empty fields in Patch requests.
   986  	ForceSendFields []string `json:"-"`
   987  
   988  	// NullFields is a list of field names (e.g. "Items") to include in API
   989  	// requests with the JSON null value. By default, fields with empty
   990  	// values are omitted from API requests. However, any field with an
   991  	// empty value appearing in NullFields will be sent to the server as
   992  	// null. It is an error if a field in this list has a non-empty value.
   993  	// This may be used to include null fields in Patch requests.
   994  	NullFields []string `json:"-"`
   995  }
   996  
   997  func (s *StyleSettingList) MarshalJSON() ([]byte, error) {
   998  	type NoMethod StyleSettingList
   999  	raw := NoMethod(*s)
  1000  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1001  }
  1002  
  1003  // Table: Represents a table. Specifies the name, whether it is
  1004  // exportable, description, attribution, and attribution link.
  1005  type Table struct {
  1006  	// Attribution: Optional attribution assigned to the table.
  1007  	Attribution string `json:"attribution,omitempty"`
  1008  
  1009  	// AttributionLink: Optional link for attribution.
  1010  	AttributionLink string `json:"attributionLink,omitempty"`
  1011  
  1012  	// BaseTableIds: Optional base table identifier if this table is a view
  1013  	// or merged table.
  1014  	BaseTableIds []string `json:"baseTableIds,omitempty"`
  1015  
  1016  	// Columns: Columns in the table.
  1017  	Columns []*Column `json:"columns,omitempty"`
  1018  
  1019  	// Description: Optional description assigned to the table.
  1020  	Description string `json:"description,omitempty"`
  1021  
  1022  	// IsExportable: Variable for whether table is exportable.
  1023  	IsExportable bool `json:"isExportable,omitempty"`
  1024  
  1025  	// Kind: Type name: a template for an individual table.
  1026  	Kind string `json:"kind,omitempty"`
  1027  
  1028  	// Name: Name assigned to a table.
  1029  	Name string `json:"name,omitempty"`
  1030  
  1031  	// Sql: Optional sql that encodes the table definition for derived
  1032  	// tables.
  1033  	Sql string `json:"sql,omitempty"`
  1034  
  1035  	// TableId: Encrypted unique alphanumeric identifier for the table.
  1036  	TableId string `json:"tableId,omitempty"`
  1037  
  1038  	// ServerResponse contains the HTTP response code and headers from the
  1039  	// server.
  1040  	googleapi.ServerResponse `json:"-"`
  1041  
  1042  	// ForceSendFields is a list of field names (e.g. "Attribution") to
  1043  	// unconditionally include in API requests. By default, fields with
  1044  	// empty values are omitted from API requests. However, any non-pointer,
  1045  	// non-interface field appearing in ForceSendFields will be sent to the
  1046  	// server regardless of whether the field is empty or not. This may be
  1047  	// used to include empty fields in Patch requests.
  1048  	ForceSendFields []string `json:"-"`
  1049  
  1050  	// NullFields is a list of field names (e.g. "Attribution") to include
  1051  	// in API requests with the JSON null value. By default, fields with
  1052  	// empty values are omitted from API requests. However, any field with
  1053  	// an empty value appearing in NullFields will be sent to the server as
  1054  	// null. It is an error if a field in this list has a non-empty value.
  1055  	// This may be used to include null fields in Patch requests.
  1056  	NullFields []string `json:"-"`
  1057  }
  1058  
  1059  func (s *Table) MarshalJSON() ([]byte, error) {
  1060  	type NoMethod Table
  1061  	raw := NoMethod(*s)
  1062  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1063  }
  1064  
  1065  // TableList: Represents a list of tables.
  1066  type TableList struct {
  1067  	// Items: List of all requested tables.
  1068  	Items []*Table `json:"items,omitempty"`
  1069  
  1070  	// Kind: Type name: a list of all tables.
  1071  	Kind string `json:"kind,omitempty"`
  1072  
  1073  	// NextPageToken: Token used to access the next page of this result. No
  1074  	// token is displayed if there are no more pages left.
  1075  	NextPageToken string `json:"nextPageToken,omitempty"`
  1076  
  1077  	// ServerResponse contains the HTTP response code and headers from the
  1078  	// server.
  1079  	googleapi.ServerResponse `json:"-"`
  1080  
  1081  	// ForceSendFields is a list of field names (e.g. "Items") to
  1082  	// unconditionally include in API requests. By default, fields with
  1083  	// empty values are omitted from API requests. However, any non-pointer,
  1084  	// non-interface field appearing in ForceSendFields will be sent to the
  1085  	// server regardless of whether the field is empty or not. This may be
  1086  	// used to include empty fields in Patch requests.
  1087  	ForceSendFields []string `json:"-"`
  1088  
  1089  	// NullFields is a list of field names (e.g. "Items") to include in API
  1090  	// requests with the JSON null value. By default, fields with empty
  1091  	// values are omitted from API requests. However, any field with an
  1092  	// empty value appearing in NullFields will be sent to the server as
  1093  	// null. It is an error if a field in this list has a non-empty value.
  1094  	// This may be used to include null fields in Patch requests.
  1095  	NullFields []string `json:"-"`
  1096  }
  1097  
  1098  func (s *TableList) MarshalJSON() ([]byte, error) {
  1099  	type NoMethod TableList
  1100  	raw := NoMethod(*s)
  1101  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1102  }
  1103  
  1104  // Task: Specifies the identifier, name, and type of a task in a table.
  1105  type Task struct {
  1106  	// Kind: Type of the resource. This is always "fusiontables#task".
  1107  	Kind string `json:"kind,omitempty"`
  1108  
  1109  	// Progress: An indication of task progress.
  1110  	Progress string `json:"progress,omitempty"`
  1111  
  1112  	// Started: false while the table is busy with some other task. true if
  1113  	// this background task is currently running.
  1114  	Started bool `json:"started,omitempty"`
  1115  
  1116  	// TaskId: Identifier for the task.
  1117  	TaskId int64 `json:"taskId,omitempty,string"`
  1118  
  1119  	// Type: Type of background task. One of  DELETE_ROWS Deletes one or
  1120  	// more rows from the table. ADD_ROWS "Adds one or more rows to a table.
  1121  	// Includes importing data into a new table and importing more rows into
  1122  	// an existing table. ADD_COLUMN Adds a new column to the table.
  1123  	// CHANGE_TYPE Changes the type of a column.
  1124  	Type string `json:"type,omitempty"`
  1125  
  1126  	// ServerResponse contains the HTTP response code and headers from the
  1127  	// server.
  1128  	googleapi.ServerResponse `json:"-"`
  1129  
  1130  	// ForceSendFields is a list of field names (e.g. "Kind") to
  1131  	// unconditionally include in API requests. By default, fields with
  1132  	// empty values are omitted from API requests. However, any non-pointer,
  1133  	// non-interface field appearing in ForceSendFields will be sent to the
  1134  	// server regardless of whether the field is empty or not. This may be
  1135  	// used to include empty fields in Patch requests.
  1136  	ForceSendFields []string `json:"-"`
  1137  
  1138  	// NullFields is a list of field names (e.g. "Kind") to include in API
  1139  	// requests with the JSON null value. By default, fields with empty
  1140  	// values are omitted from API requests. However, any field with an
  1141  	// empty value appearing in NullFields will be sent to the server as
  1142  	// null. It is an error if a field in this list has a non-empty value.
  1143  	// This may be used to include null fields in Patch requests.
  1144  	NullFields []string `json:"-"`
  1145  }
  1146  
  1147  func (s *Task) MarshalJSON() ([]byte, error) {
  1148  	type NoMethod Task
  1149  	raw := NoMethod(*s)
  1150  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1151  }
  1152  
  1153  // TaskList: Represents a list of tasks for a table.
  1154  type TaskList struct {
  1155  	// Items: List of all requested tasks.
  1156  	Items []*Task `json:"items,omitempty"`
  1157  
  1158  	// Kind: Type of the resource. This is always "fusiontables#taskList".
  1159  	Kind string `json:"kind,omitempty"`
  1160  
  1161  	// NextPageToken: Token used to access the next page of this result. No
  1162  	// token is displayed if there are no more pages left.
  1163  	NextPageToken string `json:"nextPageToken,omitempty"`
  1164  
  1165  	// TotalItems: Total number of tasks for the table.
  1166  	TotalItems int64 `json:"totalItems,omitempty"`
  1167  
  1168  	// ServerResponse contains the HTTP response code and headers from the
  1169  	// server.
  1170  	googleapi.ServerResponse `json:"-"`
  1171  
  1172  	// ForceSendFields is a list of field names (e.g. "Items") to
  1173  	// unconditionally include in API requests. By default, fields with
  1174  	// empty values are omitted from API requests. However, any non-pointer,
  1175  	// non-interface field appearing in ForceSendFields will be sent to the
  1176  	// server regardless of whether the field is empty or not. This may be
  1177  	// used to include empty fields in Patch requests.
  1178  	ForceSendFields []string `json:"-"`
  1179  
  1180  	// NullFields is a list of field names (e.g. "Items") to include in API
  1181  	// requests with the JSON null value. By default, fields with empty
  1182  	// values are omitted from API requests. However, any field with an
  1183  	// empty value appearing in NullFields will be sent to the server as
  1184  	// null. It is an error if a field in this list has a non-empty value.
  1185  	// This may be used to include null fields in Patch requests.
  1186  	NullFields []string `json:"-"`
  1187  }
  1188  
  1189  func (s *TaskList) MarshalJSON() ([]byte, error) {
  1190  	type NoMethod TaskList
  1191  	raw := NoMethod(*s)
  1192  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1193  }
  1194  
  1195  // Template: Represents the contents of InfoWindow templates.
  1196  type Template struct {
  1197  	// AutomaticColumnNames: List of columns from which the template is to
  1198  	// be automatically constructed. Only one of body or automaticColumns
  1199  	// can be specified.
  1200  	AutomaticColumnNames []string `json:"automaticColumnNames,omitempty"`
  1201  
  1202  	// Body: Body of the template. It contains HTML with {column_name} to
  1203  	// insert values from a particular column. The body is sanitized to
  1204  	// remove certain tags, e.g., script. Only one of body or
  1205  	// automaticColumns can be specified.
  1206  	Body string `json:"body,omitempty"`
  1207  
  1208  	// Kind: Type name: a template for the info window contents. The
  1209  	// template can either include an HTML body or a list of columns from
  1210  	// which the template is computed automatically.
  1211  	Kind string `json:"kind,omitempty"`
  1212  
  1213  	// Name: Optional name assigned to a template.
  1214  	Name string `json:"name,omitempty"`
  1215  
  1216  	// TableId: Identifier for the table for which the template is defined.
  1217  	TableId string `json:"tableId,omitempty"`
  1218  
  1219  	// TemplateId: Identifier for the template, unique within the context of
  1220  	// a particular table.
  1221  	TemplateId int64 `json:"templateId,omitempty"`
  1222  
  1223  	// ServerResponse contains the HTTP response code and headers from the
  1224  	// server.
  1225  	googleapi.ServerResponse `json:"-"`
  1226  
  1227  	// ForceSendFields is a list of field names (e.g.
  1228  	// "AutomaticColumnNames") to unconditionally include in API requests.
  1229  	// By default, fields with empty values are omitted from API requests.
  1230  	// However, any non-pointer, non-interface field appearing in
  1231  	// ForceSendFields will be sent to the server regardless of whether the
  1232  	// field is empty or not. This may be used to include empty fields in
  1233  	// Patch requests.
  1234  	ForceSendFields []string `json:"-"`
  1235  
  1236  	// NullFields is a list of field names (e.g. "AutomaticColumnNames") to
  1237  	// include in API requests with the JSON null value. By default, fields
  1238  	// with empty values are omitted from API requests. However, any field
  1239  	// with an empty value appearing in NullFields will be sent to the
  1240  	// server as null. It is an error if a field in this list has a
  1241  	// non-empty value. This may be used to include null fields in Patch
  1242  	// requests.
  1243  	NullFields []string `json:"-"`
  1244  }
  1245  
  1246  func (s *Template) MarshalJSON() ([]byte, error) {
  1247  	type NoMethod Template
  1248  	raw := NoMethod(*s)
  1249  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1250  }
  1251  
  1252  // TemplateList: Represents a list of templates for a given table.
  1253  type TemplateList struct {
  1254  	// Items: List of all requested templates.
  1255  	Items []*Template `json:"items,omitempty"`
  1256  
  1257  	// Kind: Type name: a list of all templates.
  1258  	Kind string `json:"kind,omitempty"`
  1259  
  1260  	// NextPageToken: Token used to access the next page of this result. No
  1261  	// token is displayed if there are no more pages left.
  1262  	NextPageToken string `json:"nextPageToken,omitempty"`
  1263  
  1264  	// TotalItems: Total number of templates for the table.
  1265  	TotalItems int64 `json:"totalItems,omitempty"`
  1266  
  1267  	// ServerResponse contains the HTTP response code and headers from the
  1268  	// server.
  1269  	googleapi.ServerResponse `json:"-"`
  1270  
  1271  	// ForceSendFields is a list of field names (e.g. "Items") to
  1272  	// unconditionally include in API requests. By default, fields with
  1273  	// empty values are omitted from API requests. However, any non-pointer,
  1274  	// non-interface field appearing in ForceSendFields will be sent to the
  1275  	// server regardless of whether the field is empty or not. This may be
  1276  	// used to include empty fields in Patch requests.
  1277  	ForceSendFields []string `json:"-"`
  1278  
  1279  	// NullFields is a list of field names (e.g. "Items") to include in API
  1280  	// requests with the JSON null value. By default, fields with empty
  1281  	// values are omitted from API requests. However, any field with an
  1282  	// empty value appearing in NullFields will be sent to the server as
  1283  	// null. It is an error if a field in this list has a non-empty value.
  1284  	// This may be used to include null fields in Patch requests.
  1285  	NullFields []string `json:"-"`
  1286  }
  1287  
  1288  func (s *TemplateList) MarshalJSON() ([]byte, error) {
  1289  	type NoMethod TemplateList
  1290  	raw := NoMethod(*s)
  1291  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1292  }
  1293  
  1294  // method id "fusiontables.column.delete":
  1295  
  1296  type ColumnDeleteCall struct {
  1297  	s          *Service
  1298  	tableId    string
  1299  	columnId   string
  1300  	urlParams_ gensupport.URLParams
  1301  	ctx_       context.Context
  1302  	header_    http.Header
  1303  }
  1304  
  1305  // Delete: Deletes the column.
  1306  func (r *ColumnService) Delete(tableId string, columnId string) *ColumnDeleteCall {
  1307  	c := &ColumnDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1308  	c.tableId = tableId
  1309  	c.columnId = columnId
  1310  	return c
  1311  }
  1312  
  1313  // Fields allows partial responses to be retrieved. See
  1314  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1315  // for more information.
  1316  func (c *ColumnDeleteCall) Fields(s ...googleapi.Field) *ColumnDeleteCall {
  1317  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1318  	return c
  1319  }
  1320  
  1321  // Context sets the context to be used in this call's Do method. Any
  1322  // pending HTTP request will be aborted if the provided context is
  1323  // canceled.
  1324  func (c *ColumnDeleteCall) Context(ctx context.Context) *ColumnDeleteCall {
  1325  	c.ctx_ = ctx
  1326  	return c
  1327  }
  1328  
  1329  // Header returns an http.Header that can be modified by the caller to
  1330  // add HTTP headers to the request.
  1331  func (c *ColumnDeleteCall) Header() http.Header {
  1332  	if c.header_ == nil {
  1333  		c.header_ = make(http.Header)
  1334  	}
  1335  	return c.header_
  1336  }
  1337  
  1338  func (c *ColumnDeleteCall) doRequest(alt string) (*http.Response, error) {
  1339  	reqHeaders := make(http.Header)
  1340  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1341  	for k, v := range c.header_ {
  1342  		reqHeaders[k] = v
  1343  	}
  1344  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1345  	var body io.Reader = nil
  1346  	c.urlParams_.Set("alt", alt)
  1347  	c.urlParams_.Set("prettyPrint", "false")
  1348  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/columns/{columnId}")
  1349  	urls += "?" + c.urlParams_.Encode()
  1350  	req, err := http.NewRequest("DELETE", urls, body)
  1351  	if err != nil {
  1352  		return nil, err
  1353  	}
  1354  	req.Header = reqHeaders
  1355  	googleapi.Expand(req.URL, map[string]string{
  1356  		"tableId":  c.tableId,
  1357  		"columnId": c.columnId,
  1358  	})
  1359  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1360  }
  1361  
  1362  // Do executes the "fusiontables.column.delete" call.
  1363  func (c *ColumnDeleteCall) Do(opts ...googleapi.CallOption) error {
  1364  	gensupport.SetOptions(c.urlParams_, opts...)
  1365  	res, err := c.doRequest("json")
  1366  	if err != nil {
  1367  		return err
  1368  	}
  1369  	defer googleapi.CloseBody(res)
  1370  	if err := googleapi.CheckResponse(res); err != nil {
  1371  		return err
  1372  	}
  1373  	return nil
  1374  	// {
  1375  	//   "description": "Deletes the column.",
  1376  	//   "httpMethod": "DELETE",
  1377  	//   "id": "fusiontables.column.delete",
  1378  	//   "parameterOrder": [
  1379  	//     "tableId",
  1380  	//     "columnId"
  1381  	//   ],
  1382  	//   "parameters": {
  1383  	//     "columnId": {
  1384  	//       "description": "Name or identifier for the column being deleted.",
  1385  	//       "location": "path",
  1386  	//       "required": true,
  1387  	//       "type": "string"
  1388  	//     },
  1389  	//     "tableId": {
  1390  	//       "description": "Table from which the column is being deleted.",
  1391  	//       "location": "path",
  1392  	//       "required": true,
  1393  	//       "type": "string"
  1394  	//     }
  1395  	//   },
  1396  	//   "path": "tables/{tableId}/columns/{columnId}",
  1397  	//   "scopes": [
  1398  	//     "https://www.googleapis.com/auth/fusiontables"
  1399  	//   ]
  1400  	// }
  1401  
  1402  }
  1403  
  1404  // method id "fusiontables.column.get":
  1405  
  1406  type ColumnGetCall struct {
  1407  	s            *Service
  1408  	tableId      string
  1409  	columnId     string
  1410  	urlParams_   gensupport.URLParams
  1411  	ifNoneMatch_ string
  1412  	ctx_         context.Context
  1413  	header_      http.Header
  1414  }
  1415  
  1416  // Get: Retrieves a specific column by its id.
  1417  func (r *ColumnService) Get(tableId string, columnId string) *ColumnGetCall {
  1418  	c := &ColumnGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1419  	c.tableId = tableId
  1420  	c.columnId = columnId
  1421  	return c
  1422  }
  1423  
  1424  // Fields allows partial responses to be retrieved. See
  1425  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1426  // for more information.
  1427  func (c *ColumnGetCall) Fields(s ...googleapi.Field) *ColumnGetCall {
  1428  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1429  	return c
  1430  }
  1431  
  1432  // IfNoneMatch sets the optional parameter which makes the operation
  1433  // fail if the object's ETag matches the given value. This is useful for
  1434  // getting updates only after the object has changed since the last
  1435  // request. Use googleapi.IsNotModified to check whether the response
  1436  // error from Do is the result of In-None-Match.
  1437  func (c *ColumnGetCall) IfNoneMatch(entityTag string) *ColumnGetCall {
  1438  	c.ifNoneMatch_ = entityTag
  1439  	return c
  1440  }
  1441  
  1442  // Context sets the context to be used in this call's Do method. Any
  1443  // pending HTTP request will be aborted if the provided context is
  1444  // canceled.
  1445  func (c *ColumnGetCall) Context(ctx context.Context) *ColumnGetCall {
  1446  	c.ctx_ = ctx
  1447  	return c
  1448  }
  1449  
  1450  // Header returns an http.Header that can be modified by the caller to
  1451  // add HTTP headers to the request.
  1452  func (c *ColumnGetCall) Header() http.Header {
  1453  	if c.header_ == nil {
  1454  		c.header_ = make(http.Header)
  1455  	}
  1456  	return c.header_
  1457  }
  1458  
  1459  func (c *ColumnGetCall) doRequest(alt string) (*http.Response, error) {
  1460  	reqHeaders := make(http.Header)
  1461  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1462  	for k, v := range c.header_ {
  1463  		reqHeaders[k] = v
  1464  	}
  1465  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1466  	if c.ifNoneMatch_ != "" {
  1467  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1468  	}
  1469  	var body io.Reader = nil
  1470  	c.urlParams_.Set("alt", alt)
  1471  	c.urlParams_.Set("prettyPrint", "false")
  1472  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/columns/{columnId}")
  1473  	urls += "?" + c.urlParams_.Encode()
  1474  	req, err := http.NewRequest("GET", urls, body)
  1475  	if err != nil {
  1476  		return nil, err
  1477  	}
  1478  	req.Header = reqHeaders
  1479  	googleapi.Expand(req.URL, map[string]string{
  1480  		"tableId":  c.tableId,
  1481  		"columnId": c.columnId,
  1482  	})
  1483  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1484  }
  1485  
  1486  // Do executes the "fusiontables.column.get" call.
  1487  // Exactly one of *Column or error will be non-nil. Any non-2xx status
  1488  // code is an error. Response headers are in either
  1489  // *Column.ServerResponse.Header or (if a response was returned at all)
  1490  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1491  // check whether the returned error was because http.StatusNotModified
  1492  // was returned.
  1493  func (c *ColumnGetCall) Do(opts ...googleapi.CallOption) (*Column, error) {
  1494  	gensupport.SetOptions(c.urlParams_, opts...)
  1495  	res, err := c.doRequest("json")
  1496  	if res != nil && res.StatusCode == http.StatusNotModified {
  1497  		if res.Body != nil {
  1498  			res.Body.Close()
  1499  		}
  1500  		return nil, &googleapi.Error{
  1501  			Code:   res.StatusCode,
  1502  			Header: res.Header,
  1503  		}
  1504  	}
  1505  	if err != nil {
  1506  		return nil, err
  1507  	}
  1508  	defer googleapi.CloseBody(res)
  1509  	if err := googleapi.CheckResponse(res); err != nil {
  1510  		return nil, err
  1511  	}
  1512  	ret := &Column{
  1513  		ServerResponse: googleapi.ServerResponse{
  1514  			Header:         res.Header,
  1515  			HTTPStatusCode: res.StatusCode,
  1516  		},
  1517  	}
  1518  	target := &ret
  1519  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1520  		return nil, err
  1521  	}
  1522  	return ret, nil
  1523  	// {
  1524  	//   "description": "Retrieves a specific column by its id.",
  1525  	//   "httpMethod": "GET",
  1526  	//   "id": "fusiontables.column.get",
  1527  	//   "parameterOrder": [
  1528  	//     "tableId",
  1529  	//     "columnId"
  1530  	//   ],
  1531  	//   "parameters": {
  1532  	//     "columnId": {
  1533  	//       "description": "Name or identifier for the column that is being requested.",
  1534  	//       "location": "path",
  1535  	//       "required": true,
  1536  	//       "type": "string"
  1537  	//     },
  1538  	//     "tableId": {
  1539  	//       "description": "Table to which the column belongs.",
  1540  	//       "location": "path",
  1541  	//       "required": true,
  1542  	//       "type": "string"
  1543  	//     }
  1544  	//   },
  1545  	//   "path": "tables/{tableId}/columns/{columnId}",
  1546  	//   "response": {
  1547  	//     "$ref": "Column"
  1548  	//   },
  1549  	//   "scopes": [
  1550  	//     "https://www.googleapis.com/auth/fusiontables",
  1551  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  1552  	//   ]
  1553  	// }
  1554  
  1555  }
  1556  
  1557  // method id "fusiontables.column.insert":
  1558  
  1559  type ColumnInsertCall struct {
  1560  	s          *Service
  1561  	tableId    string
  1562  	column     *Column
  1563  	urlParams_ gensupport.URLParams
  1564  	ctx_       context.Context
  1565  	header_    http.Header
  1566  }
  1567  
  1568  // Insert: Adds a new column to the table.
  1569  func (r *ColumnService) Insert(tableId string, column *Column) *ColumnInsertCall {
  1570  	c := &ColumnInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1571  	c.tableId = tableId
  1572  	c.column = column
  1573  	return c
  1574  }
  1575  
  1576  // Fields allows partial responses to be retrieved. See
  1577  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1578  // for more information.
  1579  func (c *ColumnInsertCall) Fields(s ...googleapi.Field) *ColumnInsertCall {
  1580  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1581  	return c
  1582  }
  1583  
  1584  // Context sets the context to be used in this call's Do method. Any
  1585  // pending HTTP request will be aborted if the provided context is
  1586  // canceled.
  1587  func (c *ColumnInsertCall) Context(ctx context.Context) *ColumnInsertCall {
  1588  	c.ctx_ = ctx
  1589  	return c
  1590  }
  1591  
  1592  // Header returns an http.Header that can be modified by the caller to
  1593  // add HTTP headers to the request.
  1594  func (c *ColumnInsertCall) Header() http.Header {
  1595  	if c.header_ == nil {
  1596  		c.header_ = make(http.Header)
  1597  	}
  1598  	return c.header_
  1599  }
  1600  
  1601  func (c *ColumnInsertCall) doRequest(alt string) (*http.Response, error) {
  1602  	reqHeaders := make(http.Header)
  1603  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1604  	for k, v := range c.header_ {
  1605  		reqHeaders[k] = v
  1606  	}
  1607  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1608  	var body io.Reader = nil
  1609  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
  1610  	if err != nil {
  1611  		return nil, err
  1612  	}
  1613  	reqHeaders.Set("Content-Type", "application/json")
  1614  	c.urlParams_.Set("alt", alt)
  1615  	c.urlParams_.Set("prettyPrint", "false")
  1616  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/columns")
  1617  	urls += "?" + c.urlParams_.Encode()
  1618  	req, err := http.NewRequest("POST", urls, body)
  1619  	if err != nil {
  1620  		return nil, err
  1621  	}
  1622  	req.Header = reqHeaders
  1623  	googleapi.Expand(req.URL, map[string]string{
  1624  		"tableId": c.tableId,
  1625  	})
  1626  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1627  }
  1628  
  1629  // Do executes the "fusiontables.column.insert" call.
  1630  // Exactly one of *Column or error will be non-nil. Any non-2xx status
  1631  // code is an error. Response headers are in either
  1632  // *Column.ServerResponse.Header or (if a response was returned at all)
  1633  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1634  // check whether the returned error was because http.StatusNotModified
  1635  // was returned.
  1636  func (c *ColumnInsertCall) Do(opts ...googleapi.CallOption) (*Column, error) {
  1637  	gensupport.SetOptions(c.urlParams_, opts...)
  1638  	res, err := c.doRequest("json")
  1639  	if res != nil && res.StatusCode == http.StatusNotModified {
  1640  		if res.Body != nil {
  1641  			res.Body.Close()
  1642  		}
  1643  		return nil, &googleapi.Error{
  1644  			Code:   res.StatusCode,
  1645  			Header: res.Header,
  1646  		}
  1647  	}
  1648  	if err != nil {
  1649  		return nil, err
  1650  	}
  1651  	defer googleapi.CloseBody(res)
  1652  	if err := googleapi.CheckResponse(res); err != nil {
  1653  		return nil, err
  1654  	}
  1655  	ret := &Column{
  1656  		ServerResponse: googleapi.ServerResponse{
  1657  			Header:         res.Header,
  1658  			HTTPStatusCode: res.StatusCode,
  1659  		},
  1660  	}
  1661  	target := &ret
  1662  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1663  		return nil, err
  1664  	}
  1665  	return ret, nil
  1666  	// {
  1667  	//   "description": "Adds a new column to the table.",
  1668  	//   "httpMethod": "POST",
  1669  	//   "id": "fusiontables.column.insert",
  1670  	//   "parameterOrder": [
  1671  	//     "tableId"
  1672  	//   ],
  1673  	//   "parameters": {
  1674  	//     "tableId": {
  1675  	//       "description": "Table for which a new column is being added.",
  1676  	//       "location": "path",
  1677  	//       "required": true,
  1678  	//       "type": "string"
  1679  	//     }
  1680  	//   },
  1681  	//   "path": "tables/{tableId}/columns",
  1682  	//   "request": {
  1683  	//     "$ref": "Column"
  1684  	//   },
  1685  	//   "response": {
  1686  	//     "$ref": "Column"
  1687  	//   },
  1688  	//   "scopes": [
  1689  	//     "https://www.googleapis.com/auth/fusiontables"
  1690  	//   ]
  1691  	// }
  1692  
  1693  }
  1694  
  1695  // method id "fusiontables.column.list":
  1696  
  1697  type ColumnListCall struct {
  1698  	s            *Service
  1699  	tableId      string
  1700  	urlParams_   gensupport.URLParams
  1701  	ifNoneMatch_ string
  1702  	ctx_         context.Context
  1703  	header_      http.Header
  1704  }
  1705  
  1706  // List: Retrieves a list of columns.
  1707  func (r *ColumnService) List(tableId string) *ColumnListCall {
  1708  	c := &ColumnListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1709  	c.tableId = tableId
  1710  	return c
  1711  }
  1712  
  1713  // MaxResults sets the optional parameter "maxResults": Maximum number
  1714  // of columns to return.  Default is 5.
  1715  func (c *ColumnListCall) MaxResults(maxResults int64) *ColumnListCall {
  1716  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  1717  	return c
  1718  }
  1719  
  1720  // PageToken sets the optional parameter "pageToken": Continuation token
  1721  // specifying which result page to return.
  1722  func (c *ColumnListCall) PageToken(pageToken string) *ColumnListCall {
  1723  	c.urlParams_.Set("pageToken", pageToken)
  1724  	return c
  1725  }
  1726  
  1727  // Fields allows partial responses to be retrieved. See
  1728  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1729  // for more information.
  1730  func (c *ColumnListCall) Fields(s ...googleapi.Field) *ColumnListCall {
  1731  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1732  	return c
  1733  }
  1734  
  1735  // IfNoneMatch sets the optional parameter which makes the operation
  1736  // fail if the object's ETag matches the given value. This is useful for
  1737  // getting updates only after the object has changed since the last
  1738  // request. Use googleapi.IsNotModified to check whether the response
  1739  // error from Do is the result of In-None-Match.
  1740  func (c *ColumnListCall) IfNoneMatch(entityTag string) *ColumnListCall {
  1741  	c.ifNoneMatch_ = entityTag
  1742  	return c
  1743  }
  1744  
  1745  // Context sets the context to be used in this call's Do method. Any
  1746  // pending HTTP request will be aborted if the provided context is
  1747  // canceled.
  1748  func (c *ColumnListCall) Context(ctx context.Context) *ColumnListCall {
  1749  	c.ctx_ = ctx
  1750  	return c
  1751  }
  1752  
  1753  // Header returns an http.Header that can be modified by the caller to
  1754  // add HTTP headers to the request.
  1755  func (c *ColumnListCall) Header() http.Header {
  1756  	if c.header_ == nil {
  1757  		c.header_ = make(http.Header)
  1758  	}
  1759  	return c.header_
  1760  }
  1761  
  1762  func (c *ColumnListCall) doRequest(alt string) (*http.Response, error) {
  1763  	reqHeaders := make(http.Header)
  1764  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1765  	for k, v := range c.header_ {
  1766  		reqHeaders[k] = v
  1767  	}
  1768  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1769  	if c.ifNoneMatch_ != "" {
  1770  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1771  	}
  1772  	var body io.Reader = nil
  1773  	c.urlParams_.Set("alt", alt)
  1774  	c.urlParams_.Set("prettyPrint", "false")
  1775  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/columns")
  1776  	urls += "?" + c.urlParams_.Encode()
  1777  	req, err := http.NewRequest("GET", urls, body)
  1778  	if err != nil {
  1779  		return nil, err
  1780  	}
  1781  	req.Header = reqHeaders
  1782  	googleapi.Expand(req.URL, map[string]string{
  1783  		"tableId": c.tableId,
  1784  	})
  1785  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1786  }
  1787  
  1788  // Do executes the "fusiontables.column.list" call.
  1789  // Exactly one of *ColumnList or error will be non-nil. Any non-2xx
  1790  // status code is an error. Response headers are in either
  1791  // *ColumnList.ServerResponse.Header or (if a response was returned at
  1792  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1793  // to check whether the returned error was because
  1794  // http.StatusNotModified was returned.
  1795  func (c *ColumnListCall) Do(opts ...googleapi.CallOption) (*ColumnList, error) {
  1796  	gensupport.SetOptions(c.urlParams_, opts...)
  1797  	res, err := c.doRequest("json")
  1798  	if res != nil && res.StatusCode == http.StatusNotModified {
  1799  		if res.Body != nil {
  1800  			res.Body.Close()
  1801  		}
  1802  		return nil, &googleapi.Error{
  1803  			Code:   res.StatusCode,
  1804  			Header: res.Header,
  1805  		}
  1806  	}
  1807  	if err != nil {
  1808  		return nil, err
  1809  	}
  1810  	defer googleapi.CloseBody(res)
  1811  	if err := googleapi.CheckResponse(res); err != nil {
  1812  		return nil, err
  1813  	}
  1814  	ret := &ColumnList{
  1815  		ServerResponse: googleapi.ServerResponse{
  1816  			Header:         res.Header,
  1817  			HTTPStatusCode: res.StatusCode,
  1818  		},
  1819  	}
  1820  	target := &ret
  1821  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1822  		return nil, err
  1823  	}
  1824  	return ret, nil
  1825  	// {
  1826  	//   "description": "Retrieves a list of columns.",
  1827  	//   "httpMethod": "GET",
  1828  	//   "id": "fusiontables.column.list",
  1829  	//   "parameterOrder": [
  1830  	//     "tableId"
  1831  	//   ],
  1832  	//   "parameters": {
  1833  	//     "maxResults": {
  1834  	//       "description": "Maximum number of columns to return. Optional. Default is 5.",
  1835  	//       "format": "uint32",
  1836  	//       "location": "query",
  1837  	//       "minimum": "0",
  1838  	//       "type": "integer"
  1839  	//     },
  1840  	//     "pageToken": {
  1841  	//       "description": "Continuation token specifying which result page to return. Optional.",
  1842  	//       "location": "query",
  1843  	//       "type": "string"
  1844  	//     },
  1845  	//     "tableId": {
  1846  	//       "description": "Table whose columns are being listed.",
  1847  	//       "location": "path",
  1848  	//       "required": true,
  1849  	//       "type": "string"
  1850  	//     }
  1851  	//   },
  1852  	//   "path": "tables/{tableId}/columns",
  1853  	//   "response": {
  1854  	//     "$ref": "ColumnList"
  1855  	//   },
  1856  	//   "scopes": [
  1857  	//     "https://www.googleapis.com/auth/fusiontables",
  1858  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  1859  	//   ]
  1860  	// }
  1861  
  1862  }
  1863  
  1864  // Pages invokes f for each page of results.
  1865  // A non-nil error returned from f will halt the iteration.
  1866  // The provided context supersedes any context provided to the Context method.
  1867  func (c *ColumnListCall) Pages(ctx context.Context, f func(*ColumnList) error) error {
  1868  	c.ctx_ = ctx
  1869  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1870  	for {
  1871  		x, err := c.Do()
  1872  		if err != nil {
  1873  			return err
  1874  		}
  1875  		if err := f(x); err != nil {
  1876  			return err
  1877  		}
  1878  		if x.NextPageToken == "" {
  1879  			return nil
  1880  		}
  1881  		c.PageToken(x.NextPageToken)
  1882  	}
  1883  }
  1884  
  1885  // method id "fusiontables.column.patch":
  1886  
  1887  type ColumnPatchCall struct {
  1888  	s          *Service
  1889  	tableId    string
  1890  	columnId   string
  1891  	column     *Column
  1892  	urlParams_ gensupport.URLParams
  1893  	ctx_       context.Context
  1894  	header_    http.Header
  1895  }
  1896  
  1897  // Patch: Updates the name or type of an existing column. This method
  1898  // supports patch semantics.
  1899  func (r *ColumnService) Patch(tableId string, columnId string, column *Column) *ColumnPatchCall {
  1900  	c := &ColumnPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1901  	c.tableId = tableId
  1902  	c.columnId = columnId
  1903  	c.column = column
  1904  	return c
  1905  }
  1906  
  1907  // Fields allows partial responses to be retrieved. See
  1908  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1909  // for more information.
  1910  func (c *ColumnPatchCall) Fields(s ...googleapi.Field) *ColumnPatchCall {
  1911  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1912  	return c
  1913  }
  1914  
  1915  // Context sets the context to be used in this call's Do method. Any
  1916  // pending HTTP request will be aborted if the provided context is
  1917  // canceled.
  1918  func (c *ColumnPatchCall) Context(ctx context.Context) *ColumnPatchCall {
  1919  	c.ctx_ = ctx
  1920  	return c
  1921  }
  1922  
  1923  // Header returns an http.Header that can be modified by the caller to
  1924  // add HTTP headers to the request.
  1925  func (c *ColumnPatchCall) Header() http.Header {
  1926  	if c.header_ == nil {
  1927  		c.header_ = make(http.Header)
  1928  	}
  1929  	return c.header_
  1930  }
  1931  
  1932  func (c *ColumnPatchCall) doRequest(alt string) (*http.Response, error) {
  1933  	reqHeaders := make(http.Header)
  1934  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1935  	for k, v := range c.header_ {
  1936  		reqHeaders[k] = v
  1937  	}
  1938  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1939  	var body io.Reader = nil
  1940  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
  1941  	if err != nil {
  1942  		return nil, err
  1943  	}
  1944  	reqHeaders.Set("Content-Type", "application/json")
  1945  	c.urlParams_.Set("alt", alt)
  1946  	c.urlParams_.Set("prettyPrint", "false")
  1947  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/columns/{columnId}")
  1948  	urls += "?" + c.urlParams_.Encode()
  1949  	req, err := http.NewRequest("PATCH", urls, body)
  1950  	if err != nil {
  1951  		return nil, err
  1952  	}
  1953  	req.Header = reqHeaders
  1954  	googleapi.Expand(req.URL, map[string]string{
  1955  		"tableId":  c.tableId,
  1956  		"columnId": c.columnId,
  1957  	})
  1958  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1959  }
  1960  
  1961  // Do executes the "fusiontables.column.patch" call.
  1962  // Exactly one of *Column or error will be non-nil. Any non-2xx status
  1963  // code is an error. Response headers are in either
  1964  // *Column.ServerResponse.Header or (if a response was returned at all)
  1965  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1966  // check whether the returned error was because http.StatusNotModified
  1967  // was returned.
  1968  func (c *ColumnPatchCall) Do(opts ...googleapi.CallOption) (*Column, error) {
  1969  	gensupport.SetOptions(c.urlParams_, opts...)
  1970  	res, err := c.doRequest("json")
  1971  	if res != nil && res.StatusCode == http.StatusNotModified {
  1972  		if res.Body != nil {
  1973  			res.Body.Close()
  1974  		}
  1975  		return nil, &googleapi.Error{
  1976  			Code:   res.StatusCode,
  1977  			Header: res.Header,
  1978  		}
  1979  	}
  1980  	if err != nil {
  1981  		return nil, err
  1982  	}
  1983  	defer googleapi.CloseBody(res)
  1984  	if err := googleapi.CheckResponse(res); err != nil {
  1985  		return nil, err
  1986  	}
  1987  	ret := &Column{
  1988  		ServerResponse: googleapi.ServerResponse{
  1989  			Header:         res.Header,
  1990  			HTTPStatusCode: res.StatusCode,
  1991  		},
  1992  	}
  1993  	target := &ret
  1994  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1995  		return nil, err
  1996  	}
  1997  	return ret, nil
  1998  	// {
  1999  	//   "description": "Updates the name or type of an existing column. This method supports patch semantics.",
  2000  	//   "httpMethod": "PATCH",
  2001  	//   "id": "fusiontables.column.patch",
  2002  	//   "parameterOrder": [
  2003  	//     "tableId",
  2004  	//     "columnId"
  2005  	//   ],
  2006  	//   "parameters": {
  2007  	//     "columnId": {
  2008  	//       "description": "Name or identifier for the column that is being updated.",
  2009  	//       "location": "path",
  2010  	//       "required": true,
  2011  	//       "type": "string"
  2012  	//     },
  2013  	//     "tableId": {
  2014  	//       "description": "Table for which the column is being updated.",
  2015  	//       "location": "path",
  2016  	//       "required": true,
  2017  	//       "type": "string"
  2018  	//     }
  2019  	//   },
  2020  	//   "path": "tables/{tableId}/columns/{columnId}",
  2021  	//   "request": {
  2022  	//     "$ref": "Column"
  2023  	//   },
  2024  	//   "response": {
  2025  	//     "$ref": "Column"
  2026  	//   },
  2027  	//   "scopes": [
  2028  	//     "https://www.googleapis.com/auth/fusiontables"
  2029  	//   ]
  2030  	// }
  2031  
  2032  }
  2033  
  2034  // method id "fusiontables.column.update":
  2035  
  2036  type ColumnUpdateCall struct {
  2037  	s          *Service
  2038  	tableId    string
  2039  	columnId   string
  2040  	column     *Column
  2041  	urlParams_ gensupport.URLParams
  2042  	ctx_       context.Context
  2043  	header_    http.Header
  2044  }
  2045  
  2046  // Update: Updates the name or type of an existing column.
  2047  func (r *ColumnService) Update(tableId string, columnId string, column *Column) *ColumnUpdateCall {
  2048  	c := &ColumnUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2049  	c.tableId = tableId
  2050  	c.columnId = columnId
  2051  	c.column = column
  2052  	return c
  2053  }
  2054  
  2055  // Fields allows partial responses to be retrieved. See
  2056  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2057  // for more information.
  2058  func (c *ColumnUpdateCall) Fields(s ...googleapi.Field) *ColumnUpdateCall {
  2059  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2060  	return c
  2061  }
  2062  
  2063  // Context sets the context to be used in this call's Do method. Any
  2064  // pending HTTP request will be aborted if the provided context is
  2065  // canceled.
  2066  func (c *ColumnUpdateCall) Context(ctx context.Context) *ColumnUpdateCall {
  2067  	c.ctx_ = ctx
  2068  	return c
  2069  }
  2070  
  2071  // Header returns an http.Header that can be modified by the caller to
  2072  // add HTTP headers to the request.
  2073  func (c *ColumnUpdateCall) Header() http.Header {
  2074  	if c.header_ == nil {
  2075  		c.header_ = make(http.Header)
  2076  	}
  2077  	return c.header_
  2078  }
  2079  
  2080  func (c *ColumnUpdateCall) doRequest(alt string) (*http.Response, error) {
  2081  	reqHeaders := make(http.Header)
  2082  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2083  	for k, v := range c.header_ {
  2084  		reqHeaders[k] = v
  2085  	}
  2086  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2087  	var body io.Reader = nil
  2088  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
  2089  	if err != nil {
  2090  		return nil, err
  2091  	}
  2092  	reqHeaders.Set("Content-Type", "application/json")
  2093  	c.urlParams_.Set("alt", alt)
  2094  	c.urlParams_.Set("prettyPrint", "false")
  2095  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/columns/{columnId}")
  2096  	urls += "?" + c.urlParams_.Encode()
  2097  	req, err := http.NewRequest("PUT", urls, body)
  2098  	if err != nil {
  2099  		return nil, err
  2100  	}
  2101  	req.Header = reqHeaders
  2102  	googleapi.Expand(req.URL, map[string]string{
  2103  		"tableId":  c.tableId,
  2104  		"columnId": c.columnId,
  2105  	})
  2106  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2107  }
  2108  
  2109  // Do executes the "fusiontables.column.update" call.
  2110  // Exactly one of *Column or error will be non-nil. Any non-2xx status
  2111  // code is an error. Response headers are in either
  2112  // *Column.ServerResponse.Header or (if a response was returned at all)
  2113  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2114  // check whether the returned error was because http.StatusNotModified
  2115  // was returned.
  2116  func (c *ColumnUpdateCall) Do(opts ...googleapi.CallOption) (*Column, error) {
  2117  	gensupport.SetOptions(c.urlParams_, opts...)
  2118  	res, err := c.doRequest("json")
  2119  	if res != nil && res.StatusCode == http.StatusNotModified {
  2120  		if res.Body != nil {
  2121  			res.Body.Close()
  2122  		}
  2123  		return nil, &googleapi.Error{
  2124  			Code:   res.StatusCode,
  2125  			Header: res.Header,
  2126  		}
  2127  	}
  2128  	if err != nil {
  2129  		return nil, err
  2130  	}
  2131  	defer googleapi.CloseBody(res)
  2132  	if err := googleapi.CheckResponse(res); err != nil {
  2133  		return nil, err
  2134  	}
  2135  	ret := &Column{
  2136  		ServerResponse: googleapi.ServerResponse{
  2137  			Header:         res.Header,
  2138  			HTTPStatusCode: res.StatusCode,
  2139  		},
  2140  	}
  2141  	target := &ret
  2142  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2143  		return nil, err
  2144  	}
  2145  	return ret, nil
  2146  	// {
  2147  	//   "description": "Updates the name or type of an existing column.",
  2148  	//   "httpMethod": "PUT",
  2149  	//   "id": "fusiontables.column.update",
  2150  	//   "parameterOrder": [
  2151  	//     "tableId",
  2152  	//     "columnId"
  2153  	//   ],
  2154  	//   "parameters": {
  2155  	//     "columnId": {
  2156  	//       "description": "Name or identifier for the column that is being updated.",
  2157  	//       "location": "path",
  2158  	//       "required": true,
  2159  	//       "type": "string"
  2160  	//     },
  2161  	//     "tableId": {
  2162  	//       "description": "Table for which the column is being updated.",
  2163  	//       "location": "path",
  2164  	//       "required": true,
  2165  	//       "type": "string"
  2166  	//     }
  2167  	//   },
  2168  	//   "path": "tables/{tableId}/columns/{columnId}",
  2169  	//   "request": {
  2170  	//     "$ref": "Column"
  2171  	//   },
  2172  	//   "response": {
  2173  	//     "$ref": "Column"
  2174  	//   },
  2175  	//   "scopes": [
  2176  	//     "https://www.googleapis.com/auth/fusiontables"
  2177  	//   ]
  2178  	// }
  2179  
  2180  }
  2181  
  2182  // method id "fusiontables.query.sql":
  2183  
  2184  type QuerySqlCall struct {
  2185  	s          *Service
  2186  	urlParams_ gensupport.URLParams
  2187  	ctx_       context.Context
  2188  	header_    http.Header
  2189  }
  2190  
  2191  // Sql: Executes an SQL SELECT/INSERT/UPDATE/DELETE/SHOW/DESCRIBE/CREATE
  2192  // statement.
  2193  func (r *QueryService) Sql(sql string) *QuerySqlCall {
  2194  	c := &QuerySqlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2195  	c.urlParams_.Set("sql", sql)
  2196  	return c
  2197  }
  2198  
  2199  // Hdrs sets the optional parameter "hdrs": Should column names be
  2200  // included (in the first row)?. Default is true.
  2201  func (c *QuerySqlCall) Hdrs(hdrs bool) *QuerySqlCall {
  2202  	c.urlParams_.Set("hdrs", fmt.Sprint(hdrs))
  2203  	return c
  2204  }
  2205  
  2206  // Typed sets the optional parameter "typed": Should typed values be
  2207  // returned in the (JSON) response -- numbers for numeric values and
  2208  // parsed geometries for KML values? Default is true.
  2209  func (c *QuerySqlCall) Typed(typed bool) *QuerySqlCall {
  2210  	c.urlParams_.Set("typed", fmt.Sprint(typed))
  2211  	return c
  2212  }
  2213  
  2214  // Fields allows partial responses to be retrieved. See
  2215  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2216  // for more information.
  2217  func (c *QuerySqlCall) Fields(s ...googleapi.Field) *QuerySqlCall {
  2218  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2219  	return c
  2220  }
  2221  
  2222  // Context sets the context to be used in this call's Do and Download
  2223  // methods. Any pending HTTP request will be aborted if the provided
  2224  // context is canceled.
  2225  func (c *QuerySqlCall) Context(ctx context.Context) *QuerySqlCall {
  2226  	c.ctx_ = ctx
  2227  	return c
  2228  }
  2229  
  2230  // Header returns an http.Header that can be modified by the caller to
  2231  // add HTTP headers to the request.
  2232  func (c *QuerySqlCall) Header() http.Header {
  2233  	if c.header_ == nil {
  2234  		c.header_ = make(http.Header)
  2235  	}
  2236  	return c.header_
  2237  }
  2238  
  2239  func (c *QuerySqlCall) doRequest(alt string) (*http.Response, error) {
  2240  	reqHeaders := make(http.Header)
  2241  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2242  	for k, v := range c.header_ {
  2243  		reqHeaders[k] = v
  2244  	}
  2245  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2246  	var body io.Reader = nil
  2247  	c.urlParams_.Set("alt", alt)
  2248  	c.urlParams_.Set("prettyPrint", "false")
  2249  	urls := googleapi.ResolveRelative(c.s.BasePath, "query")
  2250  	urls += "?" + c.urlParams_.Encode()
  2251  	req, err := http.NewRequest("POST", urls, body)
  2252  	if err != nil {
  2253  		return nil, err
  2254  	}
  2255  	req.Header = reqHeaders
  2256  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2257  }
  2258  
  2259  // Download fetches the API endpoint's "media" value, instead of the normal
  2260  // API response value. If the returned error is nil, the Response is guaranteed to
  2261  // have a 2xx status code. Callers must close the Response.Body as usual.
  2262  func (c *QuerySqlCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  2263  	gensupport.SetOptions(c.urlParams_, opts...)
  2264  	res, err := c.doRequest("media")
  2265  	if err != nil {
  2266  		return nil, err
  2267  	}
  2268  	if err := googleapi.CheckMediaResponse(res); err != nil {
  2269  		res.Body.Close()
  2270  		return nil, err
  2271  	}
  2272  	return res, nil
  2273  }
  2274  
  2275  // Do executes the "fusiontables.query.sql" call.
  2276  // Exactly one of *Sqlresponse or error will be non-nil. Any non-2xx
  2277  // status code is an error. Response headers are in either
  2278  // *Sqlresponse.ServerResponse.Header or (if a response was returned at
  2279  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2280  // to check whether the returned error was because
  2281  // http.StatusNotModified was returned.
  2282  func (c *QuerySqlCall) Do(opts ...googleapi.CallOption) (*Sqlresponse, error) {
  2283  	gensupport.SetOptions(c.urlParams_, opts...)
  2284  	res, err := c.doRequest("json")
  2285  	if res != nil && res.StatusCode == http.StatusNotModified {
  2286  		if res.Body != nil {
  2287  			res.Body.Close()
  2288  		}
  2289  		return nil, &googleapi.Error{
  2290  			Code:   res.StatusCode,
  2291  			Header: res.Header,
  2292  		}
  2293  	}
  2294  	if err != nil {
  2295  		return nil, err
  2296  	}
  2297  	defer googleapi.CloseBody(res)
  2298  	if err := googleapi.CheckResponse(res); err != nil {
  2299  		return nil, err
  2300  	}
  2301  	ret := &Sqlresponse{
  2302  		ServerResponse: googleapi.ServerResponse{
  2303  			Header:         res.Header,
  2304  			HTTPStatusCode: res.StatusCode,
  2305  		},
  2306  	}
  2307  	target := &ret
  2308  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2309  		return nil, err
  2310  	}
  2311  	return ret, nil
  2312  	// {
  2313  	//   "description": "Executes an SQL SELECT/INSERT/UPDATE/DELETE/SHOW/DESCRIBE/CREATE statement.",
  2314  	//   "httpMethod": "POST",
  2315  	//   "id": "fusiontables.query.sql",
  2316  	//   "parameterOrder": [
  2317  	//     "sql"
  2318  	//   ],
  2319  	//   "parameters": {
  2320  	//     "hdrs": {
  2321  	//       "description": "Should column names be included (in the first row)?. Default is true.",
  2322  	//       "location": "query",
  2323  	//       "type": "boolean"
  2324  	//     },
  2325  	//     "sql": {
  2326  	//       "description": "An SQL SELECT/SHOW/DESCRIBE/INSERT/UPDATE/DELETE/CREATE statement.",
  2327  	//       "location": "query",
  2328  	//       "required": true,
  2329  	//       "type": "string"
  2330  	//     },
  2331  	//     "typed": {
  2332  	//       "description": "Should typed values be returned in the (JSON) response -- numbers for numeric values and parsed geometries for KML values? Default is true.",
  2333  	//       "location": "query",
  2334  	//       "type": "boolean"
  2335  	//     }
  2336  	//   },
  2337  	//   "path": "query",
  2338  	//   "response": {
  2339  	//     "$ref": "Sqlresponse"
  2340  	//   },
  2341  	//   "scopes": [
  2342  	//     "https://www.googleapis.com/auth/fusiontables",
  2343  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  2344  	//   ],
  2345  	//   "supportsMediaDownload": true,
  2346  	//   "useMediaDownloadService": true
  2347  	// }
  2348  
  2349  }
  2350  
  2351  // method id "fusiontables.query.sqlGet":
  2352  
  2353  type QuerySqlGetCall struct {
  2354  	s            *Service
  2355  	urlParams_   gensupport.URLParams
  2356  	ifNoneMatch_ string
  2357  	ctx_         context.Context
  2358  	header_      http.Header
  2359  }
  2360  
  2361  // SqlGet: Executes an SQL SELECT/SHOW/DESCRIBE statement.
  2362  func (r *QueryService) SqlGet(sql string) *QuerySqlGetCall {
  2363  	c := &QuerySqlGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2364  	c.urlParams_.Set("sql", sql)
  2365  	return c
  2366  }
  2367  
  2368  // Hdrs sets the optional parameter "hdrs": Should column names be
  2369  // included (in the first row)?. Default is true.
  2370  func (c *QuerySqlGetCall) Hdrs(hdrs bool) *QuerySqlGetCall {
  2371  	c.urlParams_.Set("hdrs", fmt.Sprint(hdrs))
  2372  	return c
  2373  }
  2374  
  2375  // Typed sets the optional parameter "typed": Should typed values be
  2376  // returned in the (JSON) response -- numbers for numeric values and
  2377  // parsed geometries for KML values? Default is true.
  2378  func (c *QuerySqlGetCall) Typed(typed bool) *QuerySqlGetCall {
  2379  	c.urlParams_.Set("typed", fmt.Sprint(typed))
  2380  	return c
  2381  }
  2382  
  2383  // Fields allows partial responses to be retrieved. See
  2384  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2385  // for more information.
  2386  func (c *QuerySqlGetCall) Fields(s ...googleapi.Field) *QuerySqlGetCall {
  2387  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2388  	return c
  2389  }
  2390  
  2391  // IfNoneMatch sets the optional parameter which makes the operation
  2392  // fail if the object's ETag matches the given value. This is useful for
  2393  // getting updates only after the object has changed since the last
  2394  // request. Use googleapi.IsNotModified to check whether the response
  2395  // error from Do is the result of In-None-Match.
  2396  func (c *QuerySqlGetCall) IfNoneMatch(entityTag string) *QuerySqlGetCall {
  2397  	c.ifNoneMatch_ = entityTag
  2398  	return c
  2399  }
  2400  
  2401  // Context sets the context to be used in this call's Do and Download
  2402  // methods. Any pending HTTP request will be aborted if the provided
  2403  // context is canceled.
  2404  func (c *QuerySqlGetCall) Context(ctx context.Context) *QuerySqlGetCall {
  2405  	c.ctx_ = ctx
  2406  	return c
  2407  }
  2408  
  2409  // Header returns an http.Header that can be modified by the caller to
  2410  // add HTTP headers to the request.
  2411  func (c *QuerySqlGetCall) Header() http.Header {
  2412  	if c.header_ == nil {
  2413  		c.header_ = make(http.Header)
  2414  	}
  2415  	return c.header_
  2416  }
  2417  
  2418  func (c *QuerySqlGetCall) doRequest(alt string) (*http.Response, error) {
  2419  	reqHeaders := make(http.Header)
  2420  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2421  	for k, v := range c.header_ {
  2422  		reqHeaders[k] = v
  2423  	}
  2424  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2425  	if c.ifNoneMatch_ != "" {
  2426  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2427  	}
  2428  	var body io.Reader = nil
  2429  	c.urlParams_.Set("alt", alt)
  2430  	c.urlParams_.Set("prettyPrint", "false")
  2431  	urls := googleapi.ResolveRelative(c.s.BasePath, "query")
  2432  	urls += "?" + c.urlParams_.Encode()
  2433  	req, err := http.NewRequest("GET", urls, body)
  2434  	if err != nil {
  2435  		return nil, err
  2436  	}
  2437  	req.Header = reqHeaders
  2438  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2439  }
  2440  
  2441  // Download fetches the API endpoint's "media" value, instead of the normal
  2442  // API response value. If the returned error is nil, the Response is guaranteed to
  2443  // have a 2xx status code. Callers must close the Response.Body as usual.
  2444  func (c *QuerySqlGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  2445  	gensupport.SetOptions(c.urlParams_, opts...)
  2446  	res, err := c.doRequest("media")
  2447  	if err != nil {
  2448  		return nil, err
  2449  	}
  2450  	if err := googleapi.CheckMediaResponse(res); err != nil {
  2451  		res.Body.Close()
  2452  		return nil, err
  2453  	}
  2454  	return res, nil
  2455  }
  2456  
  2457  // Do executes the "fusiontables.query.sqlGet" call.
  2458  // Exactly one of *Sqlresponse or error will be non-nil. Any non-2xx
  2459  // status code is an error. Response headers are in either
  2460  // *Sqlresponse.ServerResponse.Header or (if a response was returned at
  2461  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2462  // to check whether the returned error was because
  2463  // http.StatusNotModified was returned.
  2464  func (c *QuerySqlGetCall) Do(opts ...googleapi.CallOption) (*Sqlresponse, error) {
  2465  	gensupport.SetOptions(c.urlParams_, opts...)
  2466  	res, err := c.doRequest("json")
  2467  	if res != nil && res.StatusCode == http.StatusNotModified {
  2468  		if res.Body != nil {
  2469  			res.Body.Close()
  2470  		}
  2471  		return nil, &googleapi.Error{
  2472  			Code:   res.StatusCode,
  2473  			Header: res.Header,
  2474  		}
  2475  	}
  2476  	if err != nil {
  2477  		return nil, err
  2478  	}
  2479  	defer googleapi.CloseBody(res)
  2480  	if err := googleapi.CheckResponse(res); err != nil {
  2481  		return nil, err
  2482  	}
  2483  	ret := &Sqlresponse{
  2484  		ServerResponse: googleapi.ServerResponse{
  2485  			Header:         res.Header,
  2486  			HTTPStatusCode: res.StatusCode,
  2487  		},
  2488  	}
  2489  	target := &ret
  2490  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2491  		return nil, err
  2492  	}
  2493  	return ret, nil
  2494  	// {
  2495  	//   "description": "Executes an SQL SELECT/SHOW/DESCRIBE statement.",
  2496  	//   "httpMethod": "GET",
  2497  	//   "id": "fusiontables.query.sqlGet",
  2498  	//   "parameterOrder": [
  2499  	//     "sql"
  2500  	//   ],
  2501  	//   "parameters": {
  2502  	//     "hdrs": {
  2503  	//       "description": "Should column names be included (in the first row)?. Default is true.",
  2504  	//       "location": "query",
  2505  	//       "type": "boolean"
  2506  	//     },
  2507  	//     "sql": {
  2508  	//       "description": "An SQL SELECT/SHOW/DESCRIBE statement.",
  2509  	//       "location": "query",
  2510  	//       "required": true,
  2511  	//       "type": "string"
  2512  	//     },
  2513  	//     "typed": {
  2514  	//       "description": "Should typed values be returned in the (JSON) response -- numbers for numeric values and parsed geometries for KML values? Default is true.",
  2515  	//       "location": "query",
  2516  	//       "type": "boolean"
  2517  	//     }
  2518  	//   },
  2519  	//   "path": "query",
  2520  	//   "response": {
  2521  	//     "$ref": "Sqlresponse"
  2522  	//   },
  2523  	//   "scopes": [
  2524  	//     "https://www.googleapis.com/auth/fusiontables",
  2525  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  2526  	//   ],
  2527  	//   "supportsMediaDownload": true,
  2528  	//   "useMediaDownloadService": true
  2529  	// }
  2530  
  2531  }
  2532  
  2533  // method id "fusiontables.style.delete":
  2534  
  2535  type StyleDeleteCall struct {
  2536  	s          *Service
  2537  	tableId    string
  2538  	styleId    int64
  2539  	urlParams_ gensupport.URLParams
  2540  	ctx_       context.Context
  2541  	header_    http.Header
  2542  }
  2543  
  2544  // Delete: Deletes a style.
  2545  func (r *StyleService) Delete(tableId string, styleId int64) *StyleDeleteCall {
  2546  	c := &StyleDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2547  	c.tableId = tableId
  2548  	c.styleId = styleId
  2549  	return c
  2550  }
  2551  
  2552  // Fields allows partial responses to be retrieved. See
  2553  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2554  // for more information.
  2555  func (c *StyleDeleteCall) Fields(s ...googleapi.Field) *StyleDeleteCall {
  2556  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2557  	return c
  2558  }
  2559  
  2560  // Context sets the context to be used in this call's Do method. Any
  2561  // pending HTTP request will be aborted if the provided context is
  2562  // canceled.
  2563  func (c *StyleDeleteCall) Context(ctx context.Context) *StyleDeleteCall {
  2564  	c.ctx_ = ctx
  2565  	return c
  2566  }
  2567  
  2568  // Header returns an http.Header that can be modified by the caller to
  2569  // add HTTP headers to the request.
  2570  func (c *StyleDeleteCall) Header() http.Header {
  2571  	if c.header_ == nil {
  2572  		c.header_ = make(http.Header)
  2573  	}
  2574  	return c.header_
  2575  }
  2576  
  2577  func (c *StyleDeleteCall) doRequest(alt string) (*http.Response, error) {
  2578  	reqHeaders := make(http.Header)
  2579  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2580  	for k, v := range c.header_ {
  2581  		reqHeaders[k] = v
  2582  	}
  2583  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2584  	var body io.Reader = nil
  2585  	c.urlParams_.Set("alt", alt)
  2586  	c.urlParams_.Set("prettyPrint", "false")
  2587  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/styles/{styleId}")
  2588  	urls += "?" + c.urlParams_.Encode()
  2589  	req, err := http.NewRequest("DELETE", urls, body)
  2590  	if err != nil {
  2591  		return nil, err
  2592  	}
  2593  	req.Header = reqHeaders
  2594  	googleapi.Expand(req.URL, map[string]string{
  2595  		"tableId": c.tableId,
  2596  		"styleId": strconv.FormatInt(c.styleId, 10),
  2597  	})
  2598  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2599  }
  2600  
  2601  // Do executes the "fusiontables.style.delete" call.
  2602  func (c *StyleDeleteCall) Do(opts ...googleapi.CallOption) error {
  2603  	gensupport.SetOptions(c.urlParams_, opts...)
  2604  	res, err := c.doRequest("json")
  2605  	if err != nil {
  2606  		return err
  2607  	}
  2608  	defer googleapi.CloseBody(res)
  2609  	if err := googleapi.CheckResponse(res); err != nil {
  2610  		return err
  2611  	}
  2612  	return nil
  2613  	// {
  2614  	//   "description": "Deletes a style.",
  2615  	//   "httpMethod": "DELETE",
  2616  	//   "id": "fusiontables.style.delete",
  2617  	//   "parameterOrder": [
  2618  	//     "tableId",
  2619  	//     "styleId"
  2620  	//   ],
  2621  	//   "parameters": {
  2622  	//     "styleId": {
  2623  	//       "description": "Identifier (within a table) for the style being deleted",
  2624  	//       "format": "int32",
  2625  	//       "location": "path",
  2626  	//       "required": true,
  2627  	//       "type": "integer"
  2628  	//     },
  2629  	//     "tableId": {
  2630  	//       "description": "Table from which the style is being deleted",
  2631  	//       "location": "path",
  2632  	//       "required": true,
  2633  	//       "type": "string"
  2634  	//     }
  2635  	//   },
  2636  	//   "path": "tables/{tableId}/styles/{styleId}",
  2637  	//   "scopes": [
  2638  	//     "https://www.googleapis.com/auth/fusiontables"
  2639  	//   ]
  2640  	// }
  2641  
  2642  }
  2643  
  2644  // method id "fusiontables.style.get":
  2645  
  2646  type StyleGetCall struct {
  2647  	s            *Service
  2648  	tableId      string
  2649  	styleId      int64
  2650  	urlParams_   gensupport.URLParams
  2651  	ifNoneMatch_ string
  2652  	ctx_         context.Context
  2653  	header_      http.Header
  2654  }
  2655  
  2656  // Get: Gets a specific style.
  2657  func (r *StyleService) Get(tableId string, styleId int64) *StyleGetCall {
  2658  	c := &StyleGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2659  	c.tableId = tableId
  2660  	c.styleId = styleId
  2661  	return c
  2662  }
  2663  
  2664  // Fields allows partial responses to be retrieved. See
  2665  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2666  // for more information.
  2667  func (c *StyleGetCall) Fields(s ...googleapi.Field) *StyleGetCall {
  2668  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2669  	return c
  2670  }
  2671  
  2672  // IfNoneMatch sets the optional parameter which makes the operation
  2673  // fail if the object's ETag matches the given value. This is useful for
  2674  // getting updates only after the object has changed since the last
  2675  // request. Use googleapi.IsNotModified to check whether the response
  2676  // error from Do is the result of In-None-Match.
  2677  func (c *StyleGetCall) IfNoneMatch(entityTag string) *StyleGetCall {
  2678  	c.ifNoneMatch_ = entityTag
  2679  	return c
  2680  }
  2681  
  2682  // Context sets the context to be used in this call's Do method. Any
  2683  // pending HTTP request will be aborted if the provided context is
  2684  // canceled.
  2685  func (c *StyleGetCall) Context(ctx context.Context) *StyleGetCall {
  2686  	c.ctx_ = ctx
  2687  	return c
  2688  }
  2689  
  2690  // Header returns an http.Header that can be modified by the caller to
  2691  // add HTTP headers to the request.
  2692  func (c *StyleGetCall) Header() http.Header {
  2693  	if c.header_ == nil {
  2694  		c.header_ = make(http.Header)
  2695  	}
  2696  	return c.header_
  2697  }
  2698  
  2699  func (c *StyleGetCall) doRequest(alt string) (*http.Response, error) {
  2700  	reqHeaders := make(http.Header)
  2701  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2702  	for k, v := range c.header_ {
  2703  		reqHeaders[k] = v
  2704  	}
  2705  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2706  	if c.ifNoneMatch_ != "" {
  2707  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2708  	}
  2709  	var body io.Reader = nil
  2710  	c.urlParams_.Set("alt", alt)
  2711  	c.urlParams_.Set("prettyPrint", "false")
  2712  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/styles/{styleId}")
  2713  	urls += "?" + c.urlParams_.Encode()
  2714  	req, err := http.NewRequest("GET", urls, body)
  2715  	if err != nil {
  2716  		return nil, err
  2717  	}
  2718  	req.Header = reqHeaders
  2719  	googleapi.Expand(req.URL, map[string]string{
  2720  		"tableId": c.tableId,
  2721  		"styleId": strconv.FormatInt(c.styleId, 10),
  2722  	})
  2723  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2724  }
  2725  
  2726  // Do executes the "fusiontables.style.get" call.
  2727  // Exactly one of *StyleSetting or error will be non-nil. Any non-2xx
  2728  // status code is an error. Response headers are in either
  2729  // *StyleSetting.ServerResponse.Header or (if a response was returned at
  2730  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2731  // to check whether the returned error was because
  2732  // http.StatusNotModified was returned.
  2733  func (c *StyleGetCall) Do(opts ...googleapi.CallOption) (*StyleSetting, error) {
  2734  	gensupport.SetOptions(c.urlParams_, opts...)
  2735  	res, err := c.doRequest("json")
  2736  	if res != nil && res.StatusCode == http.StatusNotModified {
  2737  		if res.Body != nil {
  2738  			res.Body.Close()
  2739  		}
  2740  		return nil, &googleapi.Error{
  2741  			Code:   res.StatusCode,
  2742  			Header: res.Header,
  2743  		}
  2744  	}
  2745  	if err != nil {
  2746  		return nil, err
  2747  	}
  2748  	defer googleapi.CloseBody(res)
  2749  	if err := googleapi.CheckResponse(res); err != nil {
  2750  		return nil, err
  2751  	}
  2752  	ret := &StyleSetting{
  2753  		ServerResponse: googleapi.ServerResponse{
  2754  			Header:         res.Header,
  2755  			HTTPStatusCode: res.StatusCode,
  2756  		},
  2757  	}
  2758  	target := &ret
  2759  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2760  		return nil, err
  2761  	}
  2762  	return ret, nil
  2763  	// {
  2764  	//   "description": "Gets a specific style.",
  2765  	//   "httpMethod": "GET",
  2766  	//   "id": "fusiontables.style.get",
  2767  	//   "parameterOrder": [
  2768  	//     "tableId",
  2769  	//     "styleId"
  2770  	//   ],
  2771  	//   "parameters": {
  2772  	//     "styleId": {
  2773  	//       "description": "Identifier (integer) for a specific style in a table",
  2774  	//       "format": "int32",
  2775  	//       "location": "path",
  2776  	//       "required": true,
  2777  	//       "type": "integer"
  2778  	//     },
  2779  	//     "tableId": {
  2780  	//       "description": "Table to which the requested style belongs",
  2781  	//       "location": "path",
  2782  	//       "required": true,
  2783  	//       "type": "string"
  2784  	//     }
  2785  	//   },
  2786  	//   "path": "tables/{tableId}/styles/{styleId}",
  2787  	//   "response": {
  2788  	//     "$ref": "StyleSetting"
  2789  	//   },
  2790  	//   "scopes": [
  2791  	//     "https://www.googleapis.com/auth/fusiontables",
  2792  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  2793  	//   ]
  2794  	// }
  2795  
  2796  }
  2797  
  2798  // method id "fusiontables.style.insert":
  2799  
  2800  type StyleInsertCall struct {
  2801  	s            *Service
  2802  	tableId      string
  2803  	stylesetting *StyleSetting
  2804  	urlParams_   gensupport.URLParams
  2805  	ctx_         context.Context
  2806  	header_      http.Header
  2807  }
  2808  
  2809  // Insert: Adds a new style for the table.
  2810  func (r *StyleService) Insert(tableId string, stylesetting *StyleSetting) *StyleInsertCall {
  2811  	c := &StyleInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2812  	c.tableId = tableId
  2813  	c.stylesetting = stylesetting
  2814  	return c
  2815  }
  2816  
  2817  // Fields allows partial responses to be retrieved. See
  2818  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2819  // for more information.
  2820  func (c *StyleInsertCall) Fields(s ...googleapi.Field) *StyleInsertCall {
  2821  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2822  	return c
  2823  }
  2824  
  2825  // Context sets the context to be used in this call's Do method. Any
  2826  // pending HTTP request will be aborted if the provided context is
  2827  // canceled.
  2828  func (c *StyleInsertCall) Context(ctx context.Context) *StyleInsertCall {
  2829  	c.ctx_ = ctx
  2830  	return c
  2831  }
  2832  
  2833  // Header returns an http.Header that can be modified by the caller to
  2834  // add HTTP headers to the request.
  2835  func (c *StyleInsertCall) Header() http.Header {
  2836  	if c.header_ == nil {
  2837  		c.header_ = make(http.Header)
  2838  	}
  2839  	return c.header_
  2840  }
  2841  
  2842  func (c *StyleInsertCall) doRequest(alt string) (*http.Response, error) {
  2843  	reqHeaders := make(http.Header)
  2844  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2845  	for k, v := range c.header_ {
  2846  		reqHeaders[k] = v
  2847  	}
  2848  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2849  	var body io.Reader = nil
  2850  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
  2851  	if err != nil {
  2852  		return nil, err
  2853  	}
  2854  	reqHeaders.Set("Content-Type", "application/json")
  2855  	c.urlParams_.Set("alt", alt)
  2856  	c.urlParams_.Set("prettyPrint", "false")
  2857  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/styles")
  2858  	urls += "?" + c.urlParams_.Encode()
  2859  	req, err := http.NewRequest("POST", urls, body)
  2860  	if err != nil {
  2861  		return nil, err
  2862  	}
  2863  	req.Header = reqHeaders
  2864  	googleapi.Expand(req.URL, map[string]string{
  2865  		"tableId": c.tableId,
  2866  	})
  2867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2868  }
  2869  
  2870  // Do executes the "fusiontables.style.insert" call.
  2871  // Exactly one of *StyleSetting or error will be non-nil. Any non-2xx
  2872  // status code is an error. Response headers are in either
  2873  // *StyleSetting.ServerResponse.Header or (if a response was returned at
  2874  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2875  // to check whether the returned error was because
  2876  // http.StatusNotModified was returned.
  2877  func (c *StyleInsertCall) Do(opts ...googleapi.CallOption) (*StyleSetting, error) {
  2878  	gensupport.SetOptions(c.urlParams_, opts...)
  2879  	res, err := c.doRequest("json")
  2880  	if res != nil && res.StatusCode == http.StatusNotModified {
  2881  		if res.Body != nil {
  2882  			res.Body.Close()
  2883  		}
  2884  		return nil, &googleapi.Error{
  2885  			Code:   res.StatusCode,
  2886  			Header: res.Header,
  2887  		}
  2888  	}
  2889  	if err != nil {
  2890  		return nil, err
  2891  	}
  2892  	defer googleapi.CloseBody(res)
  2893  	if err := googleapi.CheckResponse(res); err != nil {
  2894  		return nil, err
  2895  	}
  2896  	ret := &StyleSetting{
  2897  		ServerResponse: googleapi.ServerResponse{
  2898  			Header:         res.Header,
  2899  			HTTPStatusCode: res.StatusCode,
  2900  		},
  2901  	}
  2902  	target := &ret
  2903  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2904  		return nil, err
  2905  	}
  2906  	return ret, nil
  2907  	// {
  2908  	//   "description": "Adds a new style for the table.",
  2909  	//   "httpMethod": "POST",
  2910  	//   "id": "fusiontables.style.insert",
  2911  	//   "parameterOrder": [
  2912  	//     "tableId"
  2913  	//   ],
  2914  	//   "parameters": {
  2915  	//     "tableId": {
  2916  	//       "description": "Table for which a new style is being added",
  2917  	//       "location": "path",
  2918  	//       "required": true,
  2919  	//       "type": "string"
  2920  	//     }
  2921  	//   },
  2922  	//   "path": "tables/{tableId}/styles",
  2923  	//   "request": {
  2924  	//     "$ref": "StyleSetting"
  2925  	//   },
  2926  	//   "response": {
  2927  	//     "$ref": "StyleSetting"
  2928  	//   },
  2929  	//   "scopes": [
  2930  	//     "https://www.googleapis.com/auth/fusiontables"
  2931  	//   ]
  2932  	// }
  2933  
  2934  }
  2935  
  2936  // method id "fusiontables.style.list":
  2937  
  2938  type StyleListCall struct {
  2939  	s            *Service
  2940  	tableId      string
  2941  	urlParams_   gensupport.URLParams
  2942  	ifNoneMatch_ string
  2943  	ctx_         context.Context
  2944  	header_      http.Header
  2945  }
  2946  
  2947  // List: Retrieves a list of styles.
  2948  func (r *StyleService) List(tableId string) *StyleListCall {
  2949  	c := &StyleListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2950  	c.tableId = tableId
  2951  	return c
  2952  }
  2953  
  2954  // MaxResults sets the optional parameter "maxResults": Maximum number
  2955  // of styles to return.  Default is 5.
  2956  func (c *StyleListCall) MaxResults(maxResults int64) *StyleListCall {
  2957  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  2958  	return c
  2959  }
  2960  
  2961  // PageToken sets the optional parameter "pageToken": Continuation token
  2962  // specifying which result page to return.
  2963  func (c *StyleListCall) PageToken(pageToken string) *StyleListCall {
  2964  	c.urlParams_.Set("pageToken", pageToken)
  2965  	return c
  2966  }
  2967  
  2968  // Fields allows partial responses to be retrieved. See
  2969  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2970  // for more information.
  2971  func (c *StyleListCall) Fields(s ...googleapi.Field) *StyleListCall {
  2972  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2973  	return c
  2974  }
  2975  
  2976  // IfNoneMatch sets the optional parameter which makes the operation
  2977  // fail if the object's ETag matches the given value. This is useful for
  2978  // getting updates only after the object has changed since the last
  2979  // request. Use googleapi.IsNotModified to check whether the response
  2980  // error from Do is the result of In-None-Match.
  2981  func (c *StyleListCall) IfNoneMatch(entityTag string) *StyleListCall {
  2982  	c.ifNoneMatch_ = entityTag
  2983  	return c
  2984  }
  2985  
  2986  // Context sets the context to be used in this call's Do method. Any
  2987  // pending HTTP request will be aborted if the provided context is
  2988  // canceled.
  2989  func (c *StyleListCall) Context(ctx context.Context) *StyleListCall {
  2990  	c.ctx_ = ctx
  2991  	return c
  2992  }
  2993  
  2994  // Header returns an http.Header that can be modified by the caller to
  2995  // add HTTP headers to the request.
  2996  func (c *StyleListCall) Header() http.Header {
  2997  	if c.header_ == nil {
  2998  		c.header_ = make(http.Header)
  2999  	}
  3000  	return c.header_
  3001  }
  3002  
  3003  func (c *StyleListCall) doRequest(alt string) (*http.Response, error) {
  3004  	reqHeaders := make(http.Header)
  3005  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3006  	for k, v := range c.header_ {
  3007  		reqHeaders[k] = v
  3008  	}
  3009  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3010  	if c.ifNoneMatch_ != "" {
  3011  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3012  	}
  3013  	var body io.Reader = nil
  3014  	c.urlParams_.Set("alt", alt)
  3015  	c.urlParams_.Set("prettyPrint", "false")
  3016  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/styles")
  3017  	urls += "?" + c.urlParams_.Encode()
  3018  	req, err := http.NewRequest("GET", urls, body)
  3019  	if err != nil {
  3020  		return nil, err
  3021  	}
  3022  	req.Header = reqHeaders
  3023  	googleapi.Expand(req.URL, map[string]string{
  3024  		"tableId": c.tableId,
  3025  	})
  3026  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3027  }
  3028  
  3029  // Do executes the "fusiontables.style.list" call.
  3030  // Exactly one of *StyleSettingList or error will be non-nil. Any
  3031  // non-2xx status code is an error. Response headers are in either
  3032  // *StyleSettingList.ServerResponse.Header or (if a response was
  3033  // returned at all) in error.(*googleapi.Error).Header. Use
  3034  // googleapi.IsNotModified to check whether the returned error was
  3035  // because http.StatusNotModified was returned.
  3036  func (c *StyleListCall) Do(opts ...googleapi.CallOption) (*StyleSettingList, error) {
  3037  	gensupport.SetOptions(c.urlParams_, opts...)
  3038  	res, err := c.doRequest("json")
  3039  	if res != nil && res.StatusCode == http.StatusNotModified {
  3040  		if res.Body != nil {
  3041  			res.Body.Close()
  3042  		}
  3043  		return nil, &googleapi.Error{
  3044  			Code:   res.StatusCode,
  3045  			Header: res.Header,
  3046  		}
  3047  	}
  3048  	if err != nil {
  3049  		return nil, err
  3050  	}
  3051  	defer googleapi.CloseBody(res)
  3052  	if err := googleapi.CheckResponse(res); err != nil {
  3053  		return nil, err
  3054  	}
  3055  	ret := &StyleSettingList{
  3056  		ServerResponse: googleapi.ServerResponse{
  3057  			Header:         res.Header,
  3058  			HTTPStatusCode: res.StatusCode,
  3059  		},
  3060  	}
  3061  	target := &ret
  3062  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3063  		return nil, err
  3064  	}
  3065  	return ret, nil
  3066  	// {
  3067  	//   "description": "Retrieves a list of styles.",
  3068  	//   "httpMethod": "GET",
  3069  	//   "id": "fusiontables.style.list",
  3070  	//   "parameterOrder": [
  3071  	//     "tableId"
  3072  	//   ],
  3073  	//   "parameters": {
  3074  	//     "maxResults": {
  3075  	//       "description": "Maximum number of styles to return. Optional. Default is 5.",
  3076  	//       "format": "uint32",
  3077  	//       "location": "query",
  3078  	//       "minimum": "0",
  3079  	//       "type": "integer"
  3080  	//     },
  3081  	//     "pageToken": {
  3082  	//       "description": "Continuation token specifying which result page to return. Optional.",
  3083  	//       "location": "query",
  3084  	//       "type": "string"
  3085  	//     },
  3086  	//     "tableId": {
  3087  	//       "description": "Table whose styles are being listed",
  3088  	//       "location": "path",
  3089  	//       "required": true,
  3090  	//       "type": "string"
  3091  	//     }
  3092  	//   },
  3093  	//   "path": "tables/{tableId}/styles",
  3094  	//   "response": {
  3095  	//     "$ref": "StyleSettingList"
  3096  	//   },
  3097  	//   "scopes": [
  3098  	//     "https://www.googleapis.com/auth/fusiontables",
  3099  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  3100  	//   ]
  3101  	// }
  3102  
  3103  }
  3104  
  3105  // Pages invokes f for each page of results.
  3106  // A non-nil error returned from f will halt the iteration.
  3107  // The provided context supersedes any context provided to the Context method.
  3108  func (c *StyleListCall) Pages(ctx context.Context, f func(*StyleSettingList) error) error {
  3109  	c.ctx_ = ctx
  3110  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3111  	for {
  3112  		x, err := c.Do()
  3113  		if err != nil {
  3114  			return err
  3115  		}
  3116  		if err := f(x); err != nil {
  3117  			return err
  3118  		}
  3119  		if x.NextPageToken == "" {
  3120  			return nil
  3121  		}
  3122  		c.PageToken(x.NextPageToken)
  3123  	}
  3124  }
  3125  
  3126  // method id "fusiontables.style.patch":
  3127  
  3128  type StylePatchCall struct {
  3129  	s            *Service
  3130  	tableId      string
  3131  	styleId      int64
  3132  	stylesetting *StyleSetting
  3133  	urlParams_   gensupport.URLParams
  3134  	ctx_         context.Context
  3135  	header_      http.Header
  3136  }
  3137  
  3138  // Patch: Updates an existing style. This method supports patch
  3139  // semantics.
  3140  func (r *StyleService) Patch(tableId string, styleId int64, stylesetting *StyleSetting) *StylePatchCall {
  3141  	c := &StylePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3142  	c.tableId = tableId
  3143  	c.styleId = styleId
  3144  	c.stylesetting = stylesetting
  3145  	return c
  3146  }
  3147  
  3148  // Fields allows partial responses to be retrieved. See
  3149  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3150  // for more information.
  3151  func (c *StylePatchCall) Fields(s ...googleapi.Field) *StylePatchCall {
  3152  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3153  	return c
  3154  }
  3155  
  3156  // Context sets the context to be used in this call's Do method. Any
  3157  // pending HTTP request will be aborted if the provided context is
  3158  // canceled.
  3159  func (c *StylePatchCall) Context(ctx context.Context) *StylePatchCall {
  3160  	c.ctx_ = ctx
  3161  	return c
  3162  }
  3163  
  3164  // Header returns an http.Header that can be modified by the caller to
  3165  // add HTTP headers to the request.
  3166  func (c *StylePatchCall) Header() http.Header {
  3167  	if c.header_ == nil {
  3168  		c.header_ = make(http.Header)
  3169  	}
  3170  	return c.header_
  3171  }
  3172  
  3173  func (c *StylePatchCall) doRequest(alt string) (*http.Response, error) {
  3174  	reqHeaders := make(http.Header)
  3175  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3176  	for k, v := range c.header_ {
  3177  		reqHeaders[k] = v
  3178  	}
  3179  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3180  	var body io.Reader = nil
  3181  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
  3182  	if err != nil {
  3183  		return nil, err
  3184  	}
  3185  	reqHeaders.Set("Content-Type", "application/json")
  3186  	c.urlParams_.Set("alt", alt)
  3187  	c.urlParams_.Set("prettyPrint", "false")
  3188  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/styles/{styleId}")
  3189  	urls += "?" + c.urlParams_.Encode()
  3190  	req, err := http.NewRequest("PATCH", urls, body)
  3191  	if err != nil {
  3192  		return nil, err
  3193  	}
  3194  	req.Header = reqHeaders
  3195  	googleapi.Expand(req.URL, map[string]string{
  3196  		"tableId": c.tableId,
  3197  		"styleId": strconv.FormatInt(c.styleId, 10),
  3198  	})
  3199  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3200  }
  3201  
  3202  // Do executes the "fusiontables.style.patch" call.
  3203  // Exactly one of *StyleSetting or error will be non-nil. Any non-2xx
  3204  // status code is an error. Response headers are in either
  3205  // *StyleSetting.ServerResponse.Header or (if a response was returned at
  3206  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3207  // to check whether the returned error was because
  3208  // http.StatusNotModified was returned.
  3209  func (c *StylePatchCall) Do(opts ...googleapi.CallOption) (*StyleSetting, error) {
  3210  	gensupport.SetOptions(c.urlParams_, opts...)
  3211  	res, err := c.doRequest("json")
  3212  	if res != nil && res.StatusCode == http.StatusNotModified {
  3213  		if res.Body != nil {
  3214  			res.Body.Close()
  3215  		}
  3216  		return nil, &googleapi.Error{
  3217  			Code:   res.StatusCode,
  3218  			Header: res.Header,
  3219  		}
  3220  	}
  3221  	if err != nil {
  3222  		return nil, err
  3223  	}
  3224  	defer googleapi.CloseBody(res)
  3225  	if err := googleapi.CheckResponse(res); err != nil {
  3226  		return nil, err
  3227  	}
  3228  	ret := &StyleSetting{
  3229  		ServerResponse: googleapi.ServerResponse{
  3230  			Header:         res.Header,
  3231  			HTTPStatusCode: res.StatusCode,
  3232  		},
  3233  	}
  3234  	target := &ret
  3235  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3236  		return nil, err
  3237  	}
  3238  	return ret, nil
  3239  	// {
  3240  	//   "description": "Updates an existing style. This method supports patch semantics.",
  3241  	//   "httpMethod": "PATCH",
  3242  	//   "id": "fusiontables.style.patch",
  3243  	//   "parameterOrder": [
  3244  	//     "tableId",
  3245  	//     "styleId"
  3246  	//   ],
  3247  	//   "parameters": {
  3248  	//     "styleId": {
  3249  	//       "description": "Identifier (within a table) for the style being updated.",
  3250  	//       "format": "int32",
  3251  	//       "location": "path",
  3252  	//       "required": true,
  3253  	//       "type": "integer"
  3254  	//     },
  3255  	//     "tableId": {
  3256  	//       "description": "Table whose style is being updated.",
  3257  	//       "location": "path",
  3258  	//       "required": true,
  3259  	//       "type": "string"
  3260  	//     }
  3261  	//   },
  3262  	//   "path": "tables/{tableId}/styles/{styleId}",
  3263  	//   "request": {
  3264  	//     "$ref": "StyleSetting"
  3265  	//   },
  3266  	//   "response": {
  3267  	//     "$ref": "StyleSetting"
  3268  	//   },
  3269  	//   "scopes": [
  3270  	//     "https://www.googleapis.com/auth/fusiontables"
  3271  	//   ]
  3272  	// }
  3273  
  3274  }
  3275  
  3276  // method id "fusiontables.style.update":
  3277  
  3278  type StyleUpdateCall struct {
  3279  	s            *Service
  3280  	tableId      string
  3281  	styleId      int64
  3282  	stylesetting *StyleSetting
  3283  	urlParams_   gensupport.URLParams
  3284  	ctx_         context.Context
  3285  	header_      http.Header
  3286  }
  3287  
  3288  // Update: Updates an existing style.
  3289  func (r *StyleService) Update(tableId string, styleId int64, stylesetting *StyleSetting) *StyleUpdateCall {
  3290  	c := &StyleUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3291  	c.tableId = tableId
  3292  	c.styleId = styleId
  3293  	c.stylesetting = stylesetting
  3294  	return c
  3295  }
  3296  
  3297  // Fields allows partial responses to be retrieved. See
  3298  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3299  // for more information.
  3300  func (c *StyleUpdateCall) Fields(s ...googleapi.Field) *StyleUpdateCall {
  3301  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3302  	return c
  3303  }
  3304  
  3305  // Context sets the context to be used in this call's Do method. Any
  3306  // pending HTTP request will be aborted if the provided context is
  3307  // canceled.
  3308  func (c *StyleUpdateCall) Context(ctx context.Context) *StyleUpdateCall {
  3309  	c.ctx_ = ctx
  3310  	return c
  3311  }
  3312  
  3313  // Header returns an http.Header that can be modified by the caller to
  3314  // add HTTP headers to the request.
  3315  func (c *StyleUpdateCall) Header() http.Header {
  3316  	if c.header_ == nil {
  3317  		c.header_ = make(http.Header)
  3318  	}
  3319  	return c.header_
  3320  }
  3321  
  3322  func (c *StyleUpdateCall) doRequest(alt string) (*http.Response, error) {
  3323  	reqHeaders := make(http.Header)
  3324  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3325  	for k, v := range c.header_ {
  3326  		reqHeaders[k] = v
  3327  	}
  3328  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3329  	var body io.Reader = nil
  3330  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
  3331  	if err != nil {
  3332  		return nil, err
  3333  	}
  3334  	reqHeaders.Set("Content-Type", "application/json")
  3335  	c.urlParams_.Set("alt", alt)
  3336  	c.urlParams_.Set("prettyPrint", "false")
  3337  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/styles/{styleId}")
  3338  	urls += "?" + c.urlParams_.Encode()
  3339  	req, err := http.NewRequest("PUT", urls, body)
  3340  	if err != nil {
  3341  		return nil, err
  3342  	}
  3343  	req.Header = reqHeaders
  3344  	googleapi.Expand(req.URL, map[string]string{
  3345  		"tableId": c.tableId,
  3346  		"styleId": strconv.FormatInt(c.styleId, 10),
  3347  	})
  3348  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3349  }
  3350  
  3351  // Do executes the "fusiontables.style.update" call.
  3352  // Exactly one of *StyleSetting or error will be non-nil. Any non-2xx
  3353  // status code is an error. Response headers are in either
  3354  // *StyleSetting.ServerResponse.Header or (if a response was returned at
  3355  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3356  // to check whether the returned error was because
  3357  // http.StatusNotModified was returned.
  3358  func (c *StyleUpdateCall) Do(opts ...googleapi.CallOption) (*StyleSetting, error) {
  3359  	gensupport.SetOptions(c.urlParams_, opts...)
  3360  	res, err := c.doRequest("json")
  3361  	if res != nil && res.StatusCode == http.StatusNotModified {
  3362  		if res.Body != nil {
  3363  			res.Body.Close()
  3364  		}
  3365  		return nil, &googleapi.Error{
  3366  			Code:   res.StatusCode,
  3367  			Header: res.Header,
  3368  		}
  3369  	}
  3370  	if err != nil {
  3371  		return nil, err
  3372  	}
  3373  	defer googleapi.CloseBody(res)
  3374  	if err := googleapi.CheckResponse(res); err != nil {
  3375  		return nil, err
  3376  	}
  3377  	ret := &StyleSetting{
  3378  		ServerResponse: googleapi.ServerResponse{
  3379  			Header:         res.Header,
  3380  			HTTPStatusCode: res.StatusCode,
  3381  		},
  3382  	}
  3383  	target := &ret
  3384  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3385  		return nil, err
  3386  	}
  3387  	return ret, nil
  3388  	// {
  3389  	//   "description": "Updates an existing style.",
  3390  	//   "httpMethod": "PUT",
  3391  	//   "id": "fusiontables.style.update",
  3392  	//   "parameterOrder": [
  3393  	//     "tableId",
  3394  	//     "styleId"
  3395  	//   ],
  3396  	//   "parameters": {
  3397  	//     "styleId": {
  3398  	//       "description": "Identifier (within a table) for the style being updated.",
  3399  	//       "format": "int32",
  3400  	//       "location": "path",
  3401  	//       "required": true,
  3402  	//       "type": "integer"
  3403  	//     },
  3404  	//     "tableId": {
  3405  	//       "description": "Table whose style is being updated.",
  3406  	//       "location": "path",
  3407  	//       "required": true,
  3408  	//       "type": "string"
  3409  	//     }
  3410  	//   },
  3411  	//   "path": "tables/{tableId}/styles/{styleId}",
  3412  	//   "request": {
  3413  	//     "$ref": "StyleSetting"
  3414  	//   },
  3415  	//   "response": {
  3416  	//     "$ref": "StyleSetting"
  3417  	//   },
  3418  	//   "scopes": [
  3419  	//     "https://www.googleapis.com/auth/fusiontables"
  3420  	//   ]
  3421  	// }
  3422  
  3423  }
  3424  
  3425  // method id "fusiontables.table.copy":
  3426  
  3427  type TableCopyCall struct {
  3428  	s          *Service
  3429  	tableId    string
  3430  	urlParams_ gensupport.URLParams
  3431  	ctx_       context.Context
  3432  	header_    http.Header
  3433  }
  3434  
  3435  // Copy: Copies a table.
  3436  func (r *TableService) Copy(tableId string) *TableCopyCall {
  3437  	c := &TableCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3438  	c.tableId = tableId
  3439  	return c
  3440  }
  3441  
  3442  // CopyPresentation sets the optional parameter "copyPresentation":
  3443  // Whether to also copy tabs, styles, and templates. Default is false.
  3444  func (c *TableCopyCall) CopyPresentation(copyPresentation bool) *TableCopyCall {
  3445  	c.urlParams_.Set("copyPresentation", fmt.Sprint(copyPresentation))
  3446  	return c
  3447  }
  3448  
  3449  // Fields allows partial responses to be retrieved. See
  3450  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3451  // for more information.
  3452  func (c *TableCopyCall) Fields(s ...googleapi.Field) *TableCopyCall {
  3453  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3454  	return c
  3455  }
  3456  
  3457  // Context sets the context to be used in this call's Do method. Any
  3458  // pending HTTP request will be aborted if the provided context is
  3459  // canceled.
  3460  func (c *TableCopyCall) Context(ctx context.Context) *TableCopyCall {
  3461  	c.ctx_ = ctx
  3462  	return c
  3463  }
  3464  
  3465  // Header returns an http.Header that can be modified by the caller to
  3466  // add HTTP headers to the request.
  3467  func (c *TableCopyCall) Header() http.Header {
  3468  	if c.header_ == nil {
  3469  		c.header_ = make(http.Header)
  3470  	}
  3471  	return c.header_
  3472  }
  3473  
  3474  func (c *TableCopyCall) doRequest(alt string) (*http.Response, error) {
  3475  	reqHeaders := make(http.Header)
  3476  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3477  	for k, v := range c.header_ {
  3478  		reqHeaders[k] = v
  3479  	}
  3480  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3481  	var body io.Reader = nil
  3482  	c.urlParams_.Set("alt", alt)
  3483  	c.urlParams_.Set("prettyPrint", "false")
  3484  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/copy")
  3485  	urls += "?" + c.urlParams_.Encode()
  3486  	req, err := http.NewRequest("POST", urls, body)
  3487  	if err != nil {
  3488  		return nil, err
  3489  	}
  3490  	req.Header = reqHeaders
  3491  	googleapi.Expand(req.URL, map[string]string{
  3492  		"tableId": c.tableId,
  3493  	})
  3494  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3495  }
  3496  
  3497  // Do executes the "fusiontables.table.copy" call.
  3498  // Exactly one of *Table or error will be non-nil. Any non-2xx status
  3499  // code is an error. Response headers are in either
  3500  // *Table.ServerResponse.Header or (if a response was returned at all)
  3501  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3502  // check whether the returned error was because http.StatusNotModified
  3503  // was returned.
  3504  func (c *TableCopyCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  3505  	gensupport.SetOptions(c.urlParams_, opts...)
  3506  	res, err := c.doRequest("json")
  3507  	if res != nil && res.StatusCode == http.StatusNotModified {
  3508  		if res.Body != nil {
  3509  			res.Body.Close()
  3510  		}
  3511  		return nil, &googleapi.Error{
  3512  			Code:   res.StatusCode,
  3513  			Header: res.Header,
  3514  		}
  3515  	}
  3516  	if err != nil {
  3517  		return nil, err
  3518  	}
  3519  	defer googleapi.CloseBody(res)
  3520  	if err := googleapi.CheckResponse(res); err != nil {
  3521  		return nil, err
  3522  	}
  3523  	ret := &Table{
  3524  		ServerResponse: googleapi.ServerResponse{
  3525  			Header:         res.Header,
  3526  			HTTPStatusCode: res.StatusCode,
  3527  		},
  3528  	}
  3529  	target := &ret
  3530  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3531  		return nil, err
  3532  	}
  3533  	return ret, nil
  3534  	// {
  3535  	//   "description": "Copies a table.",
  3536  	//   "httpMethod": "POST",
  3537  	//   "id": "fusiontables.table.copy",
  3538  	//   "parameterOrder": [
  3539  	//     "tableId"
  3540  	//   ],
  3541  	//   "parameters": {
  3542  	//     "copyPresentation": {
  3543  	//       "description": "Whether to also copy tabs, styles, and templates. Default is false.",
  3544  	//       "location": "query",
  3545  	//       "type": "boolean"
  3546  	//     },
  3547  	//     "tableId": {
  3548  	//       "description": "ID of the table that is being copied.",
  3549  	//       "location": "path",
  3550  	//       "required": true,
  3551  	//       "type": "string"
  3552  	//     }
  3553  	//   },
  3554  	//   "path": "tables/{tableId}/copy",
  3555  	//   "response": {
  3556  	//     "$ref": "Table"
  3557  	//   },
  3558  	//   "scopes": [
  3559  	//     "https://www.googleapis.com/auth/fusiontables",
  3560  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  3561  	//   ]
  3562  	// }
  3563  
  3564  }
  3565  
  3566  // method id "fusiontables.table.delete":
  3567  
  3568  type TableDeleteCall struct {
  3569  	s          *Service
  3570  	tableId    string
  3571  	urlParams_ gensupport.URLParams
  3572  	ctx_       context.Context
  3573  	header_    http.Header
  3574  }
  3575  
  3576  // Delete: Deletes a table.
  3577  func (r *TableService) Delete(tableId string) *TableDeleteCall {
  3578  	c := &TableDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3579  	c.tableId = tableId
  3580  	return c
  3581  }
  3582  
  3583  // Fields allows partial responses to be retrieved. See
  3584  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3585  // for more information.
  3586  func (c *TableDeleteCall) Fields(s ...googleapi.Field) *TableDeleteCall {
  3587  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3588  	return c
  3589  }
  3590  
  3591  // Context sets the context to be used in this call's Do method. Any
  3592  // pending HTTP request will be aborted if the provided context is
  3593  // canceled.
  3594  func (c *TableDeleteCall) Context(ctx context.Context) *TableDeleteCall {
  3595  	c.ctx_ = ctx
  3596  	return c
  3597  }
  3598  
  3599  // Header returns an http.Header that can be modified by the caller to
  3600  // add HTTP headers to the request.
  3601  func (c *TableDeleteCall) Header() http.Header {
  3602  	if c.header_ == nil {
  3603  		c.header_ = make(http.Header)
  3604  	}
  3605  	return c.header_
  3606  }
  3607  
  3608  func (c *TableDeleteCall) doRequest(alt string) (*http.Response, error) {
  3609  	reqHeaders := make(http.Header)
  3610  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3611  	for k, v := range c.header_ {
  3612  		reqHeaders[k] = v
  3613  	}
  3614  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3615  	var body io.Reader = nil
  3616  	c.urlParams_.Set("alt", alt)
  3617  	c.urlParams_.Set("prettyPrint", "false")
  3618  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}")
  3619  	urls += "?" + c.urlParams_.Encode()
  3620  	req, err := http.NewRequest("DELETE", urls, body)
  3621  	if err != nil {
  3622  		return nil, err
  3623  	}
  3624  	req.Header = reqHeaders
  3625  	googleapi.Expand(req.URL, map[string]string{
  3626  		"tableId": c.tableId,
  3627  	})
  3628  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3629  }
  3630  
  3631  // Do executes the "fusiontables.table.delete" call.
  3632  func (c *TableDeleteCall) Do(opts ...googleapi.CallOption) error {
  3633  	gensupport.SetOptions(c.urlParams_, opts...)
  3634  	res, err := c.doRequest("json")
  3635  	if err != nil {
  3636  		return err
  3637  	}
  3638  	defer googleapi.CloseBody(res)
  3639  	if err := googleapi.CheckResponse(res); err != nil {
  3640  		return err
  3641  	}
  3642  	return nil
  3643  	// {
  3644  	//   "description": "Deletes a table.",
  3645  	//   "httpMethod": "DELETE",
  3646  	//   "id": "fusiontables.table.delete",
  3647  	//   "parameterOrder": [
  3648  	//     "tableId"
  3649  	//   ],
  3650  	//   "parameters": {
  3651  	//     "tableId": {
  3652  	//       "description": "ID of the table that is being deleted.",
  3653  	//       "location": "path",
  3654  	//       "required": true,
  3655  	//       "type": "string"
  3656  	//     }
  3657  	//   },
  3658  	//   "path": "tables/{tableId}",
  3659  	//   "scopes": [
  3660  	//     "https://www.googleapis.com/auth/fusiontables"
  3661  	//   ]
  3662  	// }
  3663  
  3664  }
  3665  
  3666  // method id "fusiontables.table.get":
  3667  
  3668  type TableGetCall struct {
  3669  	s            *Service
  3670  	tableId      string
  3671  	urlParams_   gensupport.URLParams
  3672  	ifNoneMatch_ string
  3673  	ctx_         context.Context
  3674  	header_      http.Header
  3675  }
  3676  
  3677  // Get: Retrieves a specific table by its id.
  3678  func (r *TableService) Get(tableId string) *TableGetCall {
  3679  	c := &TableGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3680  	c.tableId = tableId
  3681  	return c
  3682  }
  3683  
  3684  // Fields allows partial responses to be retrieved. See
  3685  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3686  // for more information.
  3687  func (c *TableGetCall) Fields(s ...googleapi.Field) *TableGetCall {
  3688  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3689  	return c
  3690  }
  3691  
  3692  // IfNoneMatch sets the optional parameter which makes the operation
  3693  // fail if the object's ETag matches the given value. This is useful for
  3694  // getting updates only after the object has changed since the last
  3695  // request. Use googleapi.IsNotModified to check whether the response
  3696  // error from Do is the result of In-None-Match.
  3697  func (c *TableGetCall) IfNoneMatch(entityTag string) *TableGetCall {
  3698  	c.ifNoneMatch_ = entityTag
  3699  	return c
  3700  }
  3701  
  3702  // Context sets the context to be used in this call's Do method. Any
  3703  // pending HTTP request will be aborted if the provided context is
  3704  // canceled.
  3705  func (c *TableGetCall) Context(ctx context.Context) *TableGetCall {
  3706  	c.ctx_ = ctx
  3707  	return c
  3708  }
  3709  
  3710  // Header returns an http.Header that can be modified by the caller to
  3711  // add HTTP headers to the request.
  3712  func (c *TableGetCall) Header() http.Header {
  3713  	if c.header_ == nil {
  3714  		c.header_ = make(http.Header)
  3715  	}
  3716  	return c.header_
  3717  }
  3718  
  3719  func (c *TableGetCall) doRequest(alt string) (*http.Response, error) {
  3720  	reqHeaders := make(http.Header)
  3721  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3722  	for k, v := range c.header_ {
  3723  		reqHeaders[k] = v
  3724  	}
  3725  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3726  	if c.ifNoneMatch_ != "" {
  3727  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3728  	}
  3729  	var body io.Reader = nil
  3730  	c.urlParams_.Set("alt", alt)
  3731  	c.urlParams_.Set("prettyPrint", "false")
  3732  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}")
  3733  	urls += "?" + c.urlParams_.Encode()
  3734  	req, err := http.NewRequest("GET", urls, body)
  3735  	if err != nil {
  3736  		return nil, err
  3737  	}
  3738  	req.Header = reqHeaders
  3739  	googleapi.Expand(req.URL, map[string]string{
  3740  		"tableId": c.tableId,
  3741  	})
  3742  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3743  }
  3744  
  3745  // Do executes the "fusiontables.table.get" call.
  3746  // Exactly one of *Table or error will be non-nil. Any non-2xx status
  3747  // code is an error. Response headers are in either
  3748  // *Table.ServerResponse.Header or (if a response was returned at all)
  3749  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3750  // check whether the returned error was because http.StatusNotModified
  3751  // was returned.
  3752  func (c *TableGetCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  3753  	gensupport.SetOptions(c.urlParams_, opts...)
  3754  	res, err := c.doRequest("json")
  3755  	if res != nil && res.StatusCode == http.StatusNotModified {
  3756  		if res.Body != nil {
  3757  			res.Body.Close()
  3758  		}
  3759  		return nil, &googleapi.Error{
  3760  			Code:   res.StatusCode,
  3761  			Header: res.Header,
  3762  		}
  3763  	}
  3764  	if err != nil {
  3765  		return nil, err
  3766  	}
  3767  	defer googleapi.CloseBody(res)
  3768  	if err := googleapi.CheckResponse(res); err != nil {
  3769  		return nil, err
  3770  	}
  3771  	ret := &Table{
  3772  		ServerResponse: googleapi.ServerResponse{
  3773  			Header:         res.Header,
  3774  			HTTPStatusCode: res.StatusCode,
  3775  		},
  3776  	}
  3777  	target := &ret
  3778  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3779  		return nil, err
  3780  	}
  3781  	return ret, nil
  3782  	// {
  3783  	//   "description": "Retrieves a specific table by its id.",
  3784  	//   "httpMethod": "GET",
  3785  	//   "id": "fusiontables.table.get",
  3786  	//   "parameterOrder": [
  3787  	//     "tableId"
  3788  	//   ],
  3789  	//   "parameters": {
  3790  	//     "tableId": {
  3791  	//       "description": "Identifier(ID) for the table being requested.",
  3792  	//       "location": "path",
  3793  	//       "required": true,
  3794  	//       "type": "string"
  3795  	//     }
  3796  	//   },
  3797  	//   "path": "tables/{tableId}",
  3798  	//   "response": {
  3799  	//     "$ref": "Table"
  3800  	//   },
  3801  	//   "scopes": [
  3802  	//     "https://www.googleapis.com/auth/fusiontables",
  3803  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  3804  	//   ]
  3805  	// }
  3806  
  3807  }
  3808  
  3809  // method id "fusiontables.table.importRows":
  3810  
  3811  type TableImportRowsCall struct {
  3812  	s          *Service
  3813  	tableId    string
  3814  	urlParams_ gensupport.URLParams
  3815  	mediaInfo_ *gensupport.MediaInfo
  3816  	ctx_       context.Context
  3817  	header_    http.Header
  3818  }
  3819  
  3820  // ImportRows: Import more rows into a table.
  3821  func (r *TableService) ImportRows(tableId string) *TableImportRowsCall {
  3822  	c := &TableImportRowsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3823  	c.tableId = tableId
  3824  	return c
  3825  }
  3826  
  3827  // Delimiter sets the optional parameter "delimiter": The delimiter used
  3828  // to separate cell values. This can only consist of a single character.
  3829  // Default is ','.
  3830  func (c *TableImportRowsCall) Delimiter(delimiter string) *TableImportRowsCall {
  3831  	c.urlParams_.Set("delimiter", delimiter)
  3832  	return c
  3833  }
  3834  
  3835  // Encoding sets the optional parameter "encoding": The encoding of the
  3836  // content. Default is UTF-8. Use 'auto-detect' if you are unsure of the
  3837  // encoding.
  3838  func (c *TableImportRowsCall) Encoding(encoding string) *TableImportRowsCall {
  3839  	c.urlParams_.Set("encoding", encoding)
  3840  	return c
  3841  }
  3842  
  3843  // EndLine sets the optional parameter "endLine": The index of the last
  3844  // line from which to start importing, exclusive. Thus, the number of
  3845  // imported lines is endLine - startLine. If this parameter is not
  3846  // provided, the file will be imported until the last line of the file.
  3847  // If endLine is negative, then the imported content will exclude the
  3848  // last endLine lines. That is, if endline is negative, no line will be
  3849  // imported whose index is greater than N + endLine where N is the
  3850  // number of lines in the file, and the number of imported lines will be
  3851  // N + endLine - startLine.
  3852  func (c *TableImportRowsCall) EndLine(endLine int64) *TableImportRowsCall {
  3853  	c.urlParams_.Set("endLine", fmt.Sprint(endLine))
  3854  	return c
  3855  }
  3856  
  3857  // IsStrict sets the optional parameter "isStrict": Whether the CSV must
  3858  // have the same number of values for each row. If false, rows with
  3859  // fewer values will be padded with empty values. Default is true.
  3860  func (c *TableImportRowsCall) IsStrict(isStrict bool) *TableImportRowsCall {
  3861  	c.urlParams_.Set("isStrict", fmt.Sprint(isStrict))
  3862  	return c
  3863  }
  3864  
  3865  // StartLine sets the optional parameter "startLine": The index of the
  3866  // first line from which to start importing, inclusive. Default is 0.
  3867  func (c *TableImportRowsCall) StartLine(startLine int64) *TableImportRowsCall {
  3868  	c.urlParams_.Set("startLine", fmt.Sprint(startLine))
  3869  	return c
  3870  }
  3871  
  3872  // Media specifies the media to upload in one or more chunks. The chunk
  3873  // size may be controlled by supplying a MediaOption generated by
  3874  // googleapi.ChunkSize. The chunk size defaults to
  3875  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the
  3876  // upload request will be determined by sniffing the contents of r,
  3877  // unless a MediaOption generated by googleapi.ContentType is
  3878  // supplied.
  3879  // At most one of Media and ResumableMedia may be set.
  3880  func (c *TableImportRowsCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableImportRowsCall {
  3881  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  3882  	return c
  3883  }
  3884  
  3885  // ResumableMedia specifies the media to upload in chunks and can be
  3886  // canceled with ctx.
  3887  //
  3888  // Deprecated: use Media instead.
  3889  //
  3890  // At most one of Media and ResumableMedia may be set. mediaType
  3891  // identifies the MIME media type of the upload, such as "image/png". If
  3892  // mediaType is "", it will be auto-detected. The provided ctx will
  3893  // supersede any context previously provided to the Context method.
  3894  func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportRowsCall {
  3895  	c.ctx_ = ctx
  3896  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  3897  	return c
  3898  }
  3899  
  3900  // ProgressUpdater provides a callback function that will be called
  3901  // after every chunk. It should be a low-latency function in order to
  3902  // not slow down the upload operation. This should only be called when
  3903  // using ResumableMedia (as opposed to Media).
  3904  func (c *TableImportRowsCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableImportRowsCall {
  3905  	c.mediaInfo_.SetProgressUpdater(pu)
  3906  	return c
  3907  }
  3908  
  3909  // Fields allows partial responses to be retrieved. See
  3910  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3911  // for more information.
  3912  func (c *TableImportRowsCall) Fields(s ...googleapi.Field) *TableImportRowsCall {
  3913  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3914  	return c
  3915  }
  3916  
  3917  // Context sets the context to be used in this call's Do method. Any
  3918  // pending HTTP request will be aborted if the provided context is
  3919  // canceled.
  3920  // This context will supersede any context previously provided to the
  3921  // ResumableMedia method.
  3922  func (c *TableImportRowsCall) Context(ctx context.Context) *TableImportRowsCall {
  3923  	c.ctx_ = ctx
  3924  	return c
  3925  }
  3926  
  3927  // Header returns an http.Header that can be modified by the caller to
  3928  // add HTTP headers to the request.
  3929  func (c *TableImportRowsCall) Header() http.Header {
  3930  	if c.header_ == nil {
  3931  		c.header_ = make(http.Header)
  3932  	}
  3933  	return c.header_
  3934  }
  3935  
  3936  func (c *TableImportRowsCall) doRequest(alt string) (*http.Response, error) {
  3937  	reqHeaders := make(http.Header)
  3938  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3939  	for k, v := range c.header_ {
  3940  		reqHeaders[k] = v
  3941  	}
  3942  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3943  	var body io.Reader = nil
  3944  	c.urlParams_.Set("alt", alt)
  3945  	c.urlParams_.Set("prettyPrint", "false")
  3946  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/import")
  3947  	if c.mediaInfo_ != nil {
  3948  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/fusiontables/v1/tables/{tableId}/import")
  3949  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  3950  	}
  3951  	if body == nil {
  3952  		body = new(bytes.Buffer)
  3953  		reqHeaders.Set("Content-Type", "application/json")
  3954  	}
  3955  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  3956  	defer cleanup()
  3957  	urls += "?" + c.urlParams_.Encode()
  3958  	req, err := http.NewRequest("POST", urls, body)
  3959  	if err != nil {
  3960  		return nil, err
  3961  	}
  3962  	req.Header = reqHeaders
  3963  	req.GetBody = getBody
  3964  	googleapi.Expand(req.URL, map[string]string{
  3965  		"tableId": c.tableId,
  3966  	})
  3967  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3968  }
  3969  
  3970  // Do executes the "fusiontables.table.importRows" call.
  3971  // Exactly one of *Import or error will be non-nil. Any non-2xx status
  3972  // code is an error. Response headers are in either
  3973  // *Import.ServerResponse.Header or (if a response was returned at all)
  3974  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3975  // check whether the returned error was because http.StatusNotModified
  3976  // was returned.
  3977  func (c *TableImportRowsCall) Do(opts ...googleapi.CallOption) (*Import, error) {
  3978  	gensupport.SetOptions(c.urlParams_, opts...)
  3979  	res, err := c.doRequest("json")
  3980  	if res != nil && res.StatusCode == http.StatusNotModified {
  3981  		if res.Body != nil {
  3982  			res.Body.Close()
  3983  		}
  3984  		return nil, &googleapi.Error{
  3985  			Code:   res.StatusCode,
  3986  			Header: res.Header,
  3987  		}
  3988  	}
  3989  	if err != nil {
  3990  		return nil, err
  3991  	}
  3992  	defer googleapi.CloseBody(res)
  3993  	if err := googleapi.CheckResponse(res); err != nil {
  3994  		return nil, err
  3995  	}
  3996  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  3997  	if rx != nil {
  3998  		rx.Client = c.s.client
  3999  		rx.UserAgent = c.s.userAgent()
  4000  		ctx := c.ctx_
  4001  		if ctx == nil {
  4002  			ctx = context.TODO()
  4003  		}
  4004  		res, err = rx.Upload(ctx)
  4005  		if err != nil {
  4006  			return nil, err
  4007  		}
  4008  		defer res.Body.Close()
  4009  		if err := googleapi.CheckResponse(res); err != nil {
  4010  			return nil, err
  4011  		}
  4012  	}
  4013  	ret := &Import{
  4014  		ServerResponse: googleapi.ServerResponse{
  4015  			Header:         res.Header,
  4016  			HTTPStatusCode: res.StatusCode,
  4017  		},
  4018  	}
  4019  	target := &ret
  4020  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4021  		return nil, err
  4022  	}
  4023  	return ret, nil
  4024  	// {
  4025  	//   "description": "Import more rows into a table.",
  4026  	//   "httpMethod": "POST",
  4027  	//   "id": "fusiontables.table.importRows",
  4028  	//   "mediaUpload": {
  4029  	//     "accept": [
  4030  	//       "application/octet-stream"
  4031  	//     ],
  4032  	//     "maxSize": "250MB",
  4033  	//     "protocols": {
  4034  	//       "resumable": {
  4035  	//         "multipart": true,
  4036  	//         "path": "/resumable/upload/fusiontables/v1/tables/{tableId}/import"
  4037  	//       },
  4038  	//       "simple": {
  4039  	//         "multipart": true,
  4040  	//         "path": "/upload/fusiontables/v1/tables/{tableId}/import"
  4041  	//       }
  4042  	//     }
  4043  	//   },
  4044  	//   "parameterOrder": [
  4045  	//     "tableId"
  4046  	//   ],
  4047  	//   "parameters": {
  4048  	//     "delimiter": {
  4049  	//       "description": "The delimiter used to separate cell values. This can only consist of a single character. Default is ','.",
  4050  	//       "location": "query",
  4051  	//       "type": "string"
  4052  	//     },
  4053  	//     "encoding": {
  4054  	//       "description": "The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding.",
  4055  	//       "location": "query",
  4056  	//       "type": "string"
  4057  	//     },
  4058  	//     "endLine": {
  4059  	//       "description": "The index of the last line from which to start importing, exclusive. Thus, the number of imported lines is endLine - startLine. If this parameter is not provided, the file will be imported until the last line of the file. If endLine is negative, then the imported content will exclude the last endLine lines. That is, if endline is negative, no line will be imported whose index is greater than N + endLine where N is the number of lines in the file, and the number of imported lines will be N + endLine - startLine.",
  4060  	//       "format": "int32",
  4061  	//       "location": "query",
  4062  	//       "type": "integer"
  4063  	//     },
  4064  	//     "isStrict": {
  4065  	//       "description": "Whether the CSV must have the same number of values for each row. If false, rows with fewer values will be padded with empty values. Default is true.",
  4066  	//       "location": "query",
  4067  	//       "type": "boolean"
  4068  	//     },
  4069  	//     "startLine": {
  4070  	//       "description": "The index of the first line from which to start importing, inclusive. Default is 0.",
  4071  	//       "format": "int32",
  4072  	//       "location": "query",
  4073  	//       "type": "integer"
  4074  	//     },
  4075  	//     "tableId": {
  4076  	//       "description": "The table into which new rows are being imported.",
  4077  	//       "location": "path",
  4078  	//       "required": true,
  4079  	//       "type": "string"
  4080  	//     }
  4081  	//   },
  4082  	//   "path": "tables/{tableId}/import",
  4083  	//   "response": {
  4084  	//     "$ref": "Import"
  4085  	//   },
  4086  	//   "scopes": [
  4087  	//     "https://www.googleapis.com/auth/fusiontables"
  4088  	//   ],
  4089  	//   "supportsMediaUpload": true
  4090  	// }
  4091  
  4092  }
  4093  
  4094  // method id "fusiontables.table.importTable":
  4095  
  4096  type TableImportTableCall struct {
  4097  	s          *Service
  4098  	urlParams_ gensupport.URLParams
  4099  	mediaInfo_ *gensupport.MediaInfo
  4100  	ctx_       context.Context
  4101  	header_    http.Header
  4102  }
  4103  
  4104  // ImportTable: Import a new table.
  4105  func (r *TableService) ImportTable(name string) *TableImportTableCall {
  4106  	c := &TableImportTableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4107  	c.urlParams_.Set("name", name)
  4108  	return c
  4109  }
  4110  
  4111  // Delimiter sets the optional parameter "delimiter": The delimiter used
  4112  // to separate cell values. This can only consist of a single character.
  4113  // Default is ','.
  4114  func (c *TableImportTableCall) Delimiter(delimiter string) *TableImportTableCall {
  4115  	c.urlParams_.Set("delimiter", delimiter)
  4116  	return c
  4117  }
  4118  
  4119  // Encoding sets the optional parameter "encoding": The encoding of the
  4120  // content. Default is UTF-8. Use 'auto-detect' if you are unsure of the
  4121  // encoding.
  4122  func (c *TableImportTableCall) Encoding(encoding string) *TableImportTableCall {
  4123  	c.urlParams_.Set("encoding", encoding)
  4124  	return c
  4125  }
  4126  
  4127  // Media specifies the media to upload in one or more chunks. The chunk
  4128  // size may be controlled by supplying a MediaOption generated by
  4129  // googleapi.ChunkSize. The chunk size defaults to
  4130  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the
  4131  // upload request will be determined by sniffing the contents of r,
  4132  // unless a MediaOption generated by googleapi.ContentType is
  4133  // supplied.
  4134  // At most one of Media and ResumableMedia may be set.
  4135  func (c *TableImportTableCall) Media(r io.Reader, options ...googleapi.MediaOption) *TableImportTableCall {
  4136  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  4137  	return c
  4138  }
  4139  
  4140  // ResumableMedia specifies the media to upload in chunks and can be
  4141  // canceled with ctx.
  4142  //
  4143  // Deprecated: use Media instead.
  4144  //
  4145  // At most one of Media and ResumableMedia may be set. mediaType
  4146  // identifies the MIME media type of the upload, such as "image/png". If
  4147  // mediaType is "", it will be auto-detected. The provided ctx will
  4148  // supersede any context previously provided to the Context method.
  4149  func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportTableCall {
  4150  	c.ctx_ = ctx
  4151  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  4152  	return c
  4153  }
  4154  
  4155  // ProgressUpdater provides a callback function that will be called
  4156  // after every chunk. It should be a low-latency function in order to
  4157  // not slow down the upload operation. This should only be called when
  4158  // using ResumableMedia (as opposed to Media).
  4159  func (c *TableImportTableCall) ProgressUpdater(pu googleapi.ProgressUpdater) *TableImportTableCall {
  4160  	c.mediaInfo_.SetProgressUpdater(pu)
  4161  	return c
  4162  }
  4163  
  4164  // Fields allows partial responses to be retrieved. See
  4165  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4166  // for more information.
  4167  func (c *TableImportTableCall) Fields(s ...googleapi.Field) *TableImportTableCall {
  4168  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4169  	return c
  4170  }
  4171  
  4172  // Context sets the context to be used in this call's Do method. Any
  4173  // pending HTTP request will be aborted if the provided context is
  4174  // canceled.
  4175  // This context will supersede any context previously provided to the
  4176  // ResumableMedia method.
  4177  func (c *TableImportTableCall) Context(ctx context.Context) *TableImportTableCall {
  4178  	c.ctx_ = ctx
  4179  	return c
  4180  }
  4181  
  4182  // Header returns an http.Header that can be modified by the caller to
  4183  // add HTTP headers to the request.
  4184  func (c *TableImportTableCall) Header() http.Header {
  4185  	if c.header_ == nil {
  4186  		c.header_ = make(http.Header)
  4187  	}
  4188  	return c.header_
  4189  }
  4190  
  4191  func (c *TableImportTableCall) doRequest(alt string) (*http.Response, error) {
  4192  	reqHeaders := make(http.Header)
  4193  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4194  	for k, v := range c.header_ {
  4195  		reqHeaders[k] = v
  4196  	}
  4197  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4198  	var body io.Reader = nil
  4199  	c.urlParams_.Set("alt", alt)
  4200  	c.urlParams_.Set("prettyPrint", "false")
  4201  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/import")
  4202  	if c.mediaInfo_ != nil {
  4203  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/fusiontables/v1/tables/import")
  4204  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  4205  	}
  4206  	if body == nil {
  4207  		body = new(bytes.Buffer)
  4208  		reqHeaders.Set("Content-Type", "application/json")
  4209  	}
  4210  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  4211  	defer cleanup()
  4212  	urls += "?" + c.urlParams_.Encode()
  4213  	req, err := http.NewRequest("POST", urls, body)
  4214  	if err != nil {
  4215  		return nil, err
  4216  	}
  4217  	req.Header = reqHeaders
  4218  	req.GetBody = getBody
  4219  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4220  }
  4221  
  4222  // Do executes the "fusiontables.table.importTable" call.
  4223  // Exactly one of *Table or error will be non-nil. Any non-2xx status
  4224  // code is an error. Response headers are in either
  4225  // *Table.ServerResponse.Header or (if a response was returned at all)
  4226  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4227  // check whether the returned error was because http.StatusNotModified
  4228  // was returned.
  4229  func (c *TableImportTableCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  4230  	gensupport.SetOptions(c.urlParams_, opts...)
  4231  	res, err := c.doRequest("json")
  4232  	if res != nil && res.StatusCode == http.StatusNotModified {
  4233  		if res.Body != nil {
  4234  			res.Body.Close()
  4235  		}
  4236  		return nil, &googleapi.Error{
  4237  			Code:   res.StatusCode,
  4238  			Header: res.Header,
  4239  		}
  4240  	}
  4241  	if err != nil {
  4242  		return nil, err
  4243  	}
  4244  	defer googleapi.CloseBody(res)
  4245  	if err := googleapi.CheckResponse(res); err != nil {
  4246  		return nil, err
  4247  	}
  4248  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  4249  	if rx != nil {
  4250  		rx.Client = c.s.client
  4251  		rx.UserAgent = c.s.userAgent()
  4252  		ctx := c.ctx_
  4253  		if ctx == nil {
  4254  			ctx = context.TODO()
  4255  		}
  4256  		res, err = rx.Upload(ctx)
  4257  		if err != nil {
  4258  			return nil, err
  4259  		}
  4260  		defer res.Body.Close()
  4261  		if err := googleapi.CheckResponse(res); err != nil {
  4262  			return nil, err
  4263  		}
  4264  	}
  4265  	ret := &Table{
  4266  		ServerResponse: googleapi.ServerResponse{
  4267  			Header:         res.Header,
  4268  			HTTPStatusCode: res.StatusCode,
  4269  		},
  4270  	}
  4271  	target := &ret
  4272  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4273  		return nil, err
  4274  	}
  4275  	return ret, nil
  4276  	// {
  4277  	//   "description": "Import a new table.",
  4278  	//   "httpMethod": "POST",
  4279  	//   "id": "fusiontables.table.importTable",
  4280  	//   "mediaUpload": {
  4281  	//     "accept": [
  4282  	//       "application/octet-stream"
  4283  	//     ],
  4284  	//     "maxSize": "250MB",
  4285  	//     "protocols": {
  4286  	//       "resumable": {
  4287  	//         "multipart": true,
  4288  	//         "path": "/resumable/upload/fusiontables/v1/tables/import"
  4289  	//       },
  4290  	//       "simple": {
  4291  	//         "multipart": true,
  4292  	//         "path": "/upload/fusiontables/v1/tables/import"
  4293  	//       }
  4294  	//     }
  4295  	//   },
  4296  	//   "parameterOrder": [
  4297  	//     "name"
  4298  	//   ],
  4299  	//   "parameters": {
  4300  	//     "delimiter": {
  4301  	//       "description": "The delimiter used to separate cell values. This can only consist of a single character. Default is ','.",
  4302  	//       "location": "query",
  4303  	//       "type": "string"
  4304  	//     },
  4305  	//     "encoding": {
  4306  	//       "description": "The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding.",
  4307  	//       "location": "query",
  4308  	//       "type": "string"
  4309  	//     },
  4310  	//     "name": {
  4311  	//       "description": "The name to be assigned to the new table.",
  4312  	//       "location": "query",
  4313  	//       "required": true,
  4314  	//       "type": "string"
  4315  	//     }
  4316  	//   },
  4317  	//   "path": "tables/import",
  4318  	//   "response": {
  4319  	//     "$ref": "Table"
  4320  	//   },
  4321  	//   "scopes": [
  4322  	//     "https://www.googleapis.com/auth/fusiontables"
  4323  	//   ],
  4324  	//   "supportsMediaUpload": true
  4325  	// }
  4326  
  4327  }
  4328  
  4329  // method id "fusiontables.table.insert":
  4330  
  4331  type TableInsertCall struct {
  4332  	s          *Service
  4333  	table      *Table
  4334  	urlParams_ gensupport.URLParams
  4335  	ctx_       context.Context
  4336  	header_    http.Header
  4337  }
  4338  
  4339  // Insert: Creates a new table.
  4340  func (r *TableService) Insert(table *Table) *TableInsertCall {
  4341  	c := &TableInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4342  	c.table = table
  4343  	return c
  4344  }
  4345  
  4346  // Fields allows partial responses to be retrieved. See
  4347  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4348  // for more information.
  4349  func (c *TableInsertCall) Fields(s ...googleapi.Field) *TableInsertCall {
  4350  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4351  	return c
  4352  }
  4353  
  4354  // Context sets the context to be used in this call's Do method. Any
  4355  // pending HTTP request will be aborted if the provided context is
  4356  // canceled.
  4357  func (c *TableInsertCall) Context(ctx context.Context) *TableInsertCall {
  4358  	c.ctx_ = ctx
  4359  	return c
  4360  }
  4361  
  4362  // Header returns an http.Header that can be modified by the caller to
  4363  // add HTTP headers to the request.
  4364  func (c *TableInsertCall) Header() http.Header {
  4365  	if c.header_ == nil {
  4366  		c.header_ = make(http.Header)
  4367  	}
  4368  	return c.header_
  4369  }
  4370  
  4371  func (c *TableInsertCall) doRequest(alt string) (*http.Response, error) {
  4372  	reqHeaders := make(http.Header)
  4373  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4374  	for k, v := range c.header_ {
  4375  		reqHeaders[k] = v
  4376  	}
  4377  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4378  	var body io.Reader = nil
  4379  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
  4380  	if err != nil {
  4381  		return nil, err
  4382  	}
  4383  	reqHeaders.Set("Content-Type", "application/json")
  4384  	c.urlParams_.Set("alt", alt)
  4385  	c.urlParams_.Set("prettyPrint", "false")
  4386  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables")
  4387  	urls += "?" + c.urlParams_.Encode()
  4388  	req, err := http.NewRequest("POST", urls, body)
  4389  	if err != nil {
  4390  		return nil, err
  4391  	}
  4392  	req.Header = reqHeaders
  4393  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4394  }
  4395  
  4396  // Do executes the "fusiontables.table.insert" call.
  4397  // Exactly one of *Table or error will be non-nil. Any non-2xx status
  4398  // code is an error. Response headers are in either
  4399  // *Table.ServerResponse.Header or (if a response was returned at all)
  4400  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4401  // check whether the returned error was because http.StatusNotModified
  4402  // was returned.
  4403  func (c *TableInsertCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  4404  	gensupport.SetOptions(c.urlParams_, opts...)
  4405  	res, err := c.doRequest("json")
  4406  	if res != nil && res.StatusCode == http.StatusNotModified {
  4407  		if res.Body != nil {
  4408  			res.Body.Close()
  4409  		}
  4410  		return nil, &googleapi.Error{
  4411  			Code:   res.StatusCode,
  4412  			Header: res.Header,
  4413  		}
  4414  	}
  4415  	if err != nil {
  4416  		return nil, err
  4417  	}
  4418  	defer googleapi.CloseBody(res)
  4419  	if err := googleapi.CheckResponse(res); err != nil {
  4420  		return nil, err
  4421  	}
  4422  	ret := &Table{
  4423  		ServerResponse: googleapi.ServerResponse{
  4424  			Header:         res.Header,
  4425  			HTTPStatusCode: res.StatusCode,
  4426  		},
  4427  	}
  4428  	target := &ret
  4429  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4430  		return nil, err
  4431  	}
  4432  	return ret, nil
  4433  	// {
  4434  	//   "description": "Creates a new table.",
  4435  	//   "httpMethod": "POST",
  4436  	//   "id": "fusiontables.table.insert",
  4437  	//   "path": "tables",
  4438  	//   "request": {
  4439  	//     "$ref": "Table"
  4440  	//   },
  4441  	//   "response": {
  4442  	//     "$ref": "Table"
  4443  	//   },
  4444  	//   "scopes": [
  4445  	//     "https://www.googleapis.com/auth/fusiontables"
  4446  	//   ]
  4447  	// }
  4448  
  4449  }
  4450  
  4451  // method id "fusiontables.table.list":
  4452  
  4453  type TableListCall struct {
  4454  	s            *Service
  4455  	urlParams_   gensupport.URLParams
  4456  	ifNoneMatch_ string
  4457  	ctx_         context.Context
  4458  	header_      http.Header
  4459  }
  4460  
  4461  // List: Retrieves a list of tables a user owns.
  4462  func (r *TableService) List() *TableListCall {
  4463  	c := &TableListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4464  	return c
  4465  }
  4466  
  4467  // MaxResults sets the optional parameter "maxResults": Maximum number
  4468  // of styles to return.  Default is 5.
  4469  func (c *TableListCall) MaxResults(maxResults int64) *TableListCall {
  4470  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4471  	return c
  4472  }
  4473  
  4474  // PageToken sets the optional parameter "pageToken": Continuation token
  4475  // specifying which result page to return.
  4476  func (c *TableListCall) PageToken(pageToken string) *TableListCall {
  4477  	c.urlParams_.Set("pageToken", pageToken)
  4478  	return c
  4479  }
  4480  
  4481  // Fields allows partial responses to be retrieved. See
  4482  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4483  // for more information.
  4484  func (c *TableListCall) Fields(s ...googleapi.Field) *TableListCall {
  4485  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4486  	return c
  4487  }
  4488  
  4489  // IfNoneMatch sets the optional parameter which makes the operation
  4490  // fail if the object's ETag matches the given value. This is useful for
  4491  // getting updates only after the object has changed since the last
  4492  // request. Use googleapi.IsNotModified to check whether the response
  4493  // error from Do is the result of In-None-Match.
  4494  func (c *TableListCall) IfNoneMatch(entityTag string) *TableListCall {
  4495  	c.ifNoneMatch_ = entityTag
  4496  	return c
  4497  }
  4498  
  4499  // Context sets the context to be used in this call's Do method. Any
  4500  // pending HTTP request will be aborted if the provided context is
  4501  // canceled.
  4502  func (c *TableListCall) Context(ctx context.Context) *TableListCall {
  4503  	c.ctx_ = ctx
  4504  	return c
  4505  }
  4506  
  4507  // Header returns an http.Header that can be modified by the caller to
  4508  // add HTTP headers to the request.
  4509  func (c *TableListCall) Header() http.Header {
  4510  	if c.header_ == nil {
  4511  		c.header_ = make(http.Header)
  4512  	}
  4513  	return c.header_
  4514  }
  4515  
  4516  func (c *TableListCall) doRequest(alt string) (*http.Response, error) {
  4517  	reqHeaders := make(http.Header)
  4518  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4519  	for k, v := range c.header_ {
  4520  		reqHeaders[k] = v
  4521  	}
  4522  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4523  	if c.ifNoneMatch_ != "" {
  4524  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4525  	}
  4526  	var body io.Reader = nil
  4527  	c.urlParams_.Set("alt", alt)
  4528  	c.urlParams_.Set("prettyPrint", "false")
  4529  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables")
  4530  	urls += "?" + c.urlParams_.Encode()
  4531  	req, err := http.NewRequest("GET", urls, body)
  4532  	if err != nil {
  4533  		return nil, err
  4534  	}
  4535  	req.Header = reqHeaders
  4536  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4537  }
  4538  
  4539  // Do executes the "fusiontables.table.list" call.
  4540  // Exactly one of *TableList or error will be non-nil. Any non-2xx
  4541  // status code is an error. Response headers are in either
  4542  // *TableList.ServerResponse.Header or (if a response was returned at
  4543  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4544  // to check whether the returned error was because
  4545  // http.StatusNotModified was returned.
  4546  func (c *TableListCall) Do(opts ...googleapi.CallOption) (*TableList, error) {
  4547  	gensupport.SetOptions(c.urlParams_, opts...)
  4548  	res, err := c.doRequest("json")
  4549  	if res != nil && res.StatusCode == http.StatusNotModified {
  4550  		if res.Body != nil {
  4551  			res.Body.Close()
  4552  		}
  4553  		return nil, &googleapi.Error{
  4554  			Code:   res.StatusCode,
  4555  			Header: res.Header,
  4556  		}
  4557  	}
  4558  	if err != nil {
  4559  		return nil, err
  4560  	}
  4561  	defer googleapi.CloseBody(res)
  4562  	if err := googleapi.CheckResponse(res); err != nil {
  4563  		return nil, err
  4564  	}
  4565  	ret := &TableList{
  4566  		ServerResponse: googleapi.ServerResponse{
  4567  			Header:         res.Header,
  4568  			HTTPStatusCode: res.StatusCode,
  4569  		},
  4570  	}
  4571  	target := &ret
  4572  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4573  		return nil, err
  4574  	}
  4575  	return ret, nil
  4576  	// {
  4577  	//   "description": "Retrieves a list of tables a user owns.",
  4578  	//   "httpMethod": "GET",
  4579  	//   "id": "fusiontables.table.list",
  4580  	//   "parameters": {
  4581  	//     "maxResults": {
  4582  	//       "description": "Maximum number of styles to return. Optional. Default is 5.",
  4583  	//       "format": "uint32",
  4584  	//       "location": "query",
  4585  	//       "minimum": "0",
  4586  	//       "type": "integer"
  4587  	//     },
  4588  	//     "pageToken": {
  4589  	//       "description": "Continuation token specifying which result page to return. Optional.",
  4590  	//       "location": "query",
  4591  	//       "type": "string"
  4592  	//     }
  4593  	//   },
  4594  	//   "path": "tables",
  4595  	//   "response": {
  4596  	//     "$ref": "TableList"
  4597  	//   },
  4598  	//   "scopes": [
  4599  	//     "https://www.googleapis.com/auth/fusiontables",
  4600  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  4601  	//   ]
  4602  	// }
  4603  
  4604  }
  4605  
  4606  // Pages invokes f for each page of results.
  4607  // A non-nil error returned from f will halt the iteration.
  4608  // The provided context supersedes any context provided to the Context method.
  4609  func (c *TableListCall) Pages(ctx context.Context, f func(*TableList) error) error {
  4610  	c.ctx_ = ctx
  4611  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4612  	for {
  4613  		x, err := c.Do()
  4614  		if err != nil {
  4615  			return err
  4616  		}
  4617  		if err := f(x); err != nil {
  4618  			return err
  4619  		}
  4620  		if x.NextPageToken == "" {
  4621  			return nil
  4622  		}
  4623  		c.PageToken(x.NextPageToken)
  4624  	}
  4625  }
  4626  
  4627  // method id "fusiontables.table.patch":
  4628  
  4629  type TablePatchCall struct {
  4630  	s          *Service
  4631  	tableId    string
  4632  	table      *Table
  4633  	urlParams_ gensupport.URLParams
  4634  	ctx_       context.Context
  4635  	header_    http.Header
  4636  }
  4637  
  4638  // Patch: Updates an existing table. Unless explicitly requested, only
  4639  // the name, description, and attribution will be updated. This method
  4640  // supports patch semantics.
  4641  func (r *TableService) Patch(tableId string, table *Table) *TablePatchCall {
  4642  	c := &TablePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4643  	c.tableId = tableId
  4644  	c.table = table
  4645  	return c
  4646  }
  4647  
  4648  // ReplaceViewDefinition sets the optional parameter
  4649  // "replaceViewDefinition": Should the view definition also be updated?
  4650  // The specified view definition replaces the existing one. Only a view
  4651  // can be updated with a new definition.
  4652  func (c *TablePatchCall) ReplaceViewDefinition(replaceViewDefinition bool) *TablePatchCall {
  4653  	c.urlParams_.Set("replaceViewDefinition", fmt.Sprint(replaceViewDefinition))
  4654  	return c
  4655  }
  4656  
  4657  // Fields allows partial responses to be retrieved. See
  4658  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4659  // for more information.
  4660  func (c *TablePatchCall) Fields(s ...googleapi.Field) *TablePatchCall {
  4661  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4662  	return c
  4663  }
  4664  
  4665  // Context sets the context to be used in this call's Do method. Any
  4666  // pending HTTP request will be aborted if the provided context is
  4667  // canceled.
  4668  func (c *TablePatchCall) Context(ctx context.Context) *TablePatchCall {
  4669  	c.ctx_ = ctx
  4670  	return c
  4671  }
  4672  
  4673  // Header returns an http.Header that can be modified by the caller to
  4674  // add HTTP headers to the request.
  4675  func (c *TablePatchCall) Header() http.Header {
  4676  	if c.header_ == nil {
  4677  		c.header_ = make(http.Header)
  4678  	}
  4679  	return c.header_
  4680  }
  4681  
  4682  func (c *TablePatchCall) doRequest(alt string) (*http.Response, error) {
  4683  	reqHeaders := make(http.Header)
  4684  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4685  	for k, v := range c.header_ {
  4686  		reqHeaders[k] = v
  4687  	}
  4688  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4689  	var body io.Reader = nil
  4690  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
  4691  	if err != nil {
  4692  		return nil, err
  4693  	}
  4694  	reqHeaders.Set("Content-Type", "application/json")
  4695  	c.urlParams_.Set("alt", alt)
  4696  	c.urlParams_.Set("prettyPrint", "false")
  4697  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}")
  4698  	urls += "?" + c.urlParams_.Encode()
  4699  	req, err := http.NewRequest("PATCH", urls, body)
  4700  	if err != nil {
  4701  		return nil, err
  4702  	}
  4703  	req.Header = reqHeaders
  4704  	googleapi.Expand(req.URL, map[string]string{
  4705  		"tableId": c.tableId,
  4706  	})
  4707  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4708  }
  4709  
  4710  // Do executes the "fusiontables.table.patch" call.
  4711  // Exactly one of *Table or error will be non-nil. Any non-2xx status
  4712  // code is an error. Response headers are in either
  4713  // *Table.ServerResponse.Header or (if a response was returned at all)
  4714  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4715  // check whether the returned error was because http.StatusNotModified
  4716  // was returned.
  4717  func (c *TablePatchCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  4718  	gensupport.SetOptions(c.urlParams_, opts...)
  4719  	res, err := c.doRequest("json")
  4720  	if res != nil && res.StatusCode == http.StatusNotModified {
  4721  		if res.Body != nil {
  4722  			res.Body.Close()
  4723  		}
  4724  		return nil, &googleapi.Error{
  4725  			Code:   res.StatusCode,
  4726  			Header: res.Header,
  4727  		}
  4728  	}
  4729  	if err != nil {
  4730  		return nil, err
  4731  	}
  4732  	defer googleapi.CloseBody(res)
  4733  	if err := googleapi.CheckResponse(res); err != nil {
  4734  		return nil, err
  4735  	}
  4736  	ret := &Table{
  4737  		ServerResponse: googleapi.ServerResponse{
  4738  			Header:         res.Header,
  4739  			HTTPStatusCode: res.StatusCode,
  4740  		},
  4741  	}
  4742  	target := &ret
  4743  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4744  		return nil, err
  4745  	}
  4746  	return ret, nil
  4747  	// {
  4748  	//   "description": "Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics.",
  4749  	//   "httpMethod": "PATCH",
  4750  	//   "id": "fusiontables.table.patch",
  4751  	//   "parameterOrder": [
  4752  	//     "tableId"
  4753  	//   ],
  4754  	//   "parameters": {
  4755  	//     "replaceViewDefinition": {
  4756  	//       "description": "Should the view definition also be updated? The specified view definition replaces the existing one. Only a view can be updated with a new definition.",
  4757  	//       "location": "query",
  4758  	//       "type": "boolean"
  4759  	//     },
  4760  	//     "tableId": {
  4761  	//       "description": "ID of the table that is being updated.",
  4762  	//       "location": "path",
  4763  	//       "required": true,
  4764  	//       "type": "string"
  4765  	//     }
  4766  	//   },
  4767  	//   "path": "tables/{tableId}",
  4768  	//   "request": {
  4769  	//     "$ref": "Table"
  4770  	//   },
  4771  	//   "response": {
  4772  	//     "$ref": "Table"
  4773  	//   },
  4774  	//   "scopes": [
  4775  	//     "https://www.googleapis.com/auth/fusiontables"
  4776  	//   ]
  4777  	// }
  4778  
  4779  }
  4780  
  4781  // method id "fusiontables.table.update":
  4782  
  4783  type TableUpdateCall struct {
  4784  	s          *Service
  4785  	tableId    string
  4786  	table      *Table
  4787  	urlParams_ gensupport.URLParams
  4788  	ctx_       context.Context
  4789  	header_    http.Header
  4790  }
  4791  
  4792  // Update: Updates an existing table. Unless explicitly requested, only
  4793  // the name, description, and attribution will be updated.
  4794  func (r *TableService) Update(tableId string, table *Table) *TableUpdateCall {
  4795  	c := &TableUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4796  	c.tableId = tableId
  4797  	c.table = table
  4798  	return c
  4799  }
  4800  
  4801  // ReplaceViewDefinition sets the optional parameter
  4802  // "replaceViewDefinition": Should the view definition also be updated?
  4803  // The specified view definition replaces the existing one. Only a view
  4804  // can be updated with a new definition.
  4805  func (c *TableUpdateCall) ReplaceViewDefinition(replaceViewDefinition bool) *TableUpdateCall {
  4806  	c.urlParams_.Set("replaceViewDefinition", fmt.Sprint(replaceViewDefinition))
  4807  	return c
  4808  }
  4809  
  4810  // Fields allows partial responses to be retrieved. See
  4811  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4812  // for more information.
  4813  func (c *TableUpdateCall) Fields(s ...googleapi.Field) *TableUpdateCall {
  4814  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4815  	return c
  4816  }
  4817  
  4818  // Context sets the context to be used in this call's Do method. Any
  4819  // pending HTTP request will be aborted if the provided context is
  4820  // canceled.
  4821  func (c *TableUpdateCall) Context(ctx context.Context) *TableUpdateCall {
  4822  	c.ctx_ = ctx
  4823  	return c
  4824  }
  4825  
  4826  // Header returns an http.Header that can be modified by the caller to
  4827  // add HTTP headers to the request.
  4828  func (c *TableUpdateCall) Header() http.Header {
  4829  	if c.header_ == nil {
  4830  		c.header_ = make(http.Header)
  4831  	}
  4832  	return c.header_
  4833  }
  4834  
  4835  func (c *TableUpdateCall) doRequest(alt string) (*http.Response, error) {
  4836  	reqHeaders := make(http.Header)
  4837  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4838  	for k, v := range c.header_ {
  4839  		reqHeaders[k] = v
  4840  	}
  4841  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4842  	var body io.Reader = nil
  4843  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
  4844  	if err != nil {
  4845  		return nil, err
  4846  	}
  4847  	reqHeaders.Set("Content-Type", "application/json")
  4848  	c.urlParams_.Set("alt", alt)
  4849  	c.urlParams_.Set("prettyPrint", "false")
  4850  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}")
  4851  	urls += "?" + c.urlParams_.Encode()
  4852  	req, err := http.NewRequest("PUT", urls, body)
  4853  	if err != nil {
  4854  		return nil, err
  4855  	}
  4856  	req.Header = reqHeaders
  4857  	googleapi.Expand(req.URL, map[string]string{
  4858  		"tableId": c.tableId,
  4859  	})
  4860  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4861  }
  4862  
  4863  // Do executes the "fusiontables.table.update" call.
  4864  // Exactly one of *Table or error will be non-nil. Any non-2xx status
  4865  // code is an error. Response headers are in either
  4866  // *Table.ServerResponse.Header or (if a response was returned at all)
  4867  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4868  // check whether the returned error was because http.StatusNotModified
  4869  // was returned.
  4870  func (c *TableUpdateCall) Do(opts ...googleapi.CallOption) (*Table, error) {
  4871  	gensupport.SetOptions(c.urlParams_, opts...)
  4872  	res, err := c.doRequest("json")
  4873  	if res != nil && res.StatusCode == http.StatusNotModified {
  4874  		if res.Body != nil {
  4875  			res.Body.Close()
  4876  		}
  4877  		return nil, &googleapi.Error{
  4878  			Code:   res.StatusCode,
  4879  			Header: res.Header,
  4880  		}
  4881  	}
  4882  	if err != nil {
  4883  		return nil, err
  4884  	}
  4885  	defer googleapi.CloseBody(res)
  4886  	if err := googleapi.CheckResponse(res); err != nil {
  4887  		return nil, err
  4888  	}
  4889  	ret := &Table{
  4890  		ServerResponse: googleapi.ServerResponse{
  4891  			Header:         res.Header,
  4892  			HTTPStatusCode: res.StatusCode,
  4893  		},
  4894  	}
  4895  	target := &ret
  4896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4897  		return nil, err
  4898  	}
  4899  	return ret, nil
  4900  	// {
  4901  	//   "description": "Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated.",
  4902  	//   "httpMethod": "PUT",
  4903  	//   "id": "fusiontables.table.update",
  4904  	//   "parameterOrder": [
  4905  	//     "tableId"
  4906  	//   ],
  4907  	//   "parameters": {
  4908  	//     "replaceViewDefinition": {
  4909  	//       "description": "Should the view definition also be updated? The specified view definition replaces the existing one. Only a view can be updated with a new definition.",
  4910  	//       "location": "query",
  4911  	//       "type": "boolean"
  4912  	//     },
  4913  	//     "tableId": {
  4914  	//       "description": "ID of the table that is being updated.",
  4915  	//       "location": "path",
  4916  	//       "required": true,
  4917  	//       "type": "string"
  4918  	//     }
  4919  	//   },
  4920  	//   "path": "tables/{tableId}",
  4921  	//   "request": {
  4922  	//     "$ref": "Table"
  4923  	//   },
  4924  	//   "response": {
  4925  	//     "$ref": "Table"
  4926  	//   },
  4927  	//   "scopes": [
  4928  	//     "https://www.googleapis.com/auth/fusiontables"
  4929  	//   ]
  4930  	// }
  4931  
  4932  }
  4933  
  4934  // method id "fusiontables.task.delete":
  4935  
  4936  type TaskDeleteCall struct {
  4937  	s          *Service
  4938  	tableId    string
  4939  	taskId     string
  4940  	urlParams_ gensupport.URLParams
  4941  	ctx_       context.Context
  4942  	header_    http.Header
  4943  }
  4944  
  4945  // Delete: Deletes the task, unless already started.
  4946  func (r *TaskService) Delete(tableId string, taskId string) *TaskDeleteCall {
  4947  	c := &TaskDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4948  	c.tableId = tableId
  4949  	c.taskId = taskId
  4950  	return c
  4951  }
  4952  
  4953  // Fields allows partial responses to be retrieved. See
  4954  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4955  // for more information.
  4956  func (c *TaskDeleteCall) Fields(s ...googleapi.Field) *TaskDeleteCall {
  4957  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4958  	return c
  4959  }
  4960  
  4961  // Context sets the context to be used in this call's Do method. Any
  4962  // pending HTTP request will be aborted if the provided context is
  4963  // canceled.
  4964  func (c *TaskDeleteCall) Context(ctx context.Context) *TaskDeleteCall {
  4965  	c.ctx_ = ctx
  4966  	return c
  4967  }
  4968  
  4969  // Header returns an http.Header that can be modified by the caller to
  4970  // add HTTP headers to the request.
  4971  func (c *TaskDeleteCall) Header() http.Header {
  4972  	if c.header_ == nil {
  4973  		c.header_ = make(http.Header)
  4974  	}
  4975  	return c.header_
  4976  }
  4977  
  4978  func (c *TaskDeleteCall) doRequest(alt string) (*http.Response, error) {
  4979  	reqHeaders := make(http.Header)
  4980  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4981  	for k, v := range c.header_ {
  4982  		reqHeaders[k] = v
  4983  	}
  4984  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4985  	var body io.Reader = nil
  4986  	c.urlParams_.Set("alt", alt)
  4987  	c.urlParams_.Set("prettyPrint", "false")
  4988  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/tasks/{taskId}")
  4989  	urls += "?" + c.urlParams_.Encode()
  4990  	req, err := http.NewRequest("DELETE", urls, body)
  4991  	if err != nil {
  4992  		return nil, err
  4993  	}
  4994  	req.Header = reqHeaders
  4995  	googleapi.Expand(req.URL, map[string]string{
  4996  		"tableId": c.tableId,
  4997  		"taskId":  c.taskId,
  4998  	})
  4999  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5000  }
  5001  
  5002  // Do executes the "fusiontables.task.delete" call.
  5003  func (c *TaskDeleteCall) Do(opts ...googleapi.CallOption) error {
  5004  	gensupport.SetOptions(c.urlParams_, opts...)
  5005  	res, err := c.doRequest("json")
  5006  	if err != nil {
  5007  		return err
  5008  	}
  5009  	defer googleapi.CloseBody(res)
  5010  	if err := googleapi.CheckResponse(res); err != nil {
  5011  		return err
  5012  	}
  5013  	return nil
  5014  	// {
  5015  	//   "description": "Deletes the task, unless already started.",
  5016  	//   "httpMethod": "DELETE",
  5017  	//   "id": "fusiontables.task.delete",
  5018  	//   "parameterOrder": [
  5019  	//     "tableId",
  5020  	//     "taskId"
  5021  	//   ],
  5022  	//   "parameters": {
  5023  	//     "tableId": {
  5024  	//       "description": "Table from which the task is being deleted.",
  5025  	//       "location": "path",
  5026  	//       "required": true,
  5027  	//       "type": "string"
  5028  	//     },
  5029  	//     "taskId": {
  5030  	//       "location": "path",
  5031  	//       "required": true,
  5032  	//       "type": "string"
  5033  	//     }
  5034  	//   },
  5035  	//   "path": "tables/{tableId}/tasks/{taskId}",
  5036  	//   "scopes": [
  5037  	//     "https://www.googleapis.com/auth/fusiontables"
  5038  	//   ]
  5039  	// }
  5040  
  5041  }
  5042  
  5043  // method id "fusiontables.task.get":
  5044  
  5045  type TaskGetCall struct {
  5046  	s            *Service
  5047  	tableId      string
  5048  	taskId       string
  5049  	urlParams_   gensupport.URLParams
  5050  	ifNoneMatch_ string
  5051  	ctx_         context.Context
  5052  	header_      http.Header
  5053  }
  5054  
  5055  // Get: Retrieves a specific task by its id.
  5056  func (r *TaskService) Get(tableId string, taskId string) *TaskGetCall {
  5057  	c := &TaskGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5058  	c.tableId = tableId
  5059  	c.taskId = taskId
  5060  	return c
  5061  }
  5062  
  5063  // Fields allows partial responses to be retrieved. See
  5064  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5065  // for more information.
  5066  func (c *TaskGetCall) Fields(s ...googleapi.Field) *TaskGetCall {
  5067  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5068  	return c
  5069  }
  5070  
  5071  // IfNoneMatch sets the optional parameter which makes the operation
  5072  // fail if the object's ETag matches the given value. This is useful for
  5073  // getting updates only after the object has changed since the last
  5074  // request. Use googleapi.IsNotModified to check whether the response
  5075  // error from Do is the result of In-None-Match.
  5076  func (c *TaskGetCall) IfNoneMatch(entityTag string) *TaskGetCall {
  5077  	c.ifNoneMatch_ = entityTag
  5078  	return c
  5079  }
  5080  
  5081  // Context sets the context to be used in this call's Do method. Any
  5082  // pending HTTP request will be aborted if the provided context is
  5083  // canceled.
  5084  func (c *TaskGetCall) Context(ctx context.Context) *TaskGetCall {
  5085  	c.ctx_ = ctx
  5086  	return c
  5087  }
  5088  
  5089  // Header returns an http.Header that can be modified by the caller to
  5090  // add HTTP headers to the request.
  5091  func (c *TaskGetCall) Header() http.Header {
  5092  	if c.header_ == nil {
  5093  		c.header_ = make(http.Header)
  5094  	}
  5095  	return c.header_
  5096  }
  5097  
  5098  func (c *TaskGetCall) doRequest(alt string) (*http.Response, error) {
  5099  	reqHeaders := make(http.Header)
  5100  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5101  	for k, v := range c.header_ {
  5102  		reqHeaders[k] = v
  5103  	}
  5104  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5105  	if c.ifNoneMatch_ != "" {
  5106  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5107  	}
  5108  	var body io.Reader = nil
  5109  	c.urlParams_.Set("alt", alt)
  5110  	c.urlParams_.Set("prettyPrint", "false")
  5111  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/tasks/{taskId}")
  5112  	urls += "?" + c.urlParams_.Encode()
  5113  	req, err := http.NewRequest("GET", urls, body)
  5114  	if err != nil {
  5115  		return nil, err
  5116  	}
  5117  	req.Header = reqHeaders
  5118  	googleapi.Expand(req.URL, map[string]string{
  5119  		"tableId": c.tableId,
  5120  		"taskId":  c.taskId,
  5121  	})
  5122  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5123  }
  5124  
  5125  // Do executes the "fusiontables.task.get" call.
  5126  // Exactly one of *Task or error will be non-nil. Any non-2xx status
  5127  // code is an error. Response headers are in either
  5128  // *Task.ServerResponse.Header or (if a response was returned at all) in
  5129  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5130  // whether the returned error was because http.StatusNotModified was
  5131  // returned.
  5132  func (c *TaskGetCall) Do(opts ...googleapi.CallOption) (*Task, error) {
  5133  	gensupport.SetOptions(c.urlParams_, opts...)
  5134  	res, err := c.doRequest("json")
  5135  	if res != nil && res.StatusCode == http.StatusNotModified {
  5136  		if res.Body != nil {
  5137  			res.Body.Close()
  5138  		}
  5139  		return nil, &googleapi.Error{
  5140  			Code:   res.StatusCode,
  5141  			Header: res.Header,
  5142  		}
  5143  	}
  5144  	if err != nil {
  5145  		return nil, err
  5146  	}
  5147  	defer googleapi.CloseBody(res)
  5148  	if err := googleapi.CheckResponse(res); err != nil {
  5149  		return nil, err
  5150  	}
  5151  	ret := &Task{
  5152  		ServerResponse: googleapi.ServerResponse{
  5153  			Header:         res.Header,
  5154  			HTTPStatusCode: res.StatusCode,
  5155  		},
  5156  	}
  5157  	target := &ret
  5158  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5159  		return nil, err
  5160  	}
  5161  	return ret, nil
  5162  	// {
  5163  	//   "description": "Retrieves a specific task by its id.",
  5164  	//   "httpMethod": "GET",
  5165  	//   "id": "fusiontables.task.get",
  5166  	//   "parameterOrder": [
  5167  	//     "tableId",
  5168  	//     "taskId"
  5169  	//   ],
  5170  	//   "parameters": {
  5171  	//     "tableId": {
  5172  	//       "description": "Table to which the task belongs.",
  5173  	//       "location": "path",
  5174  	//       "required": true,
  5175  	//       "type": "string"
  5176  	//     },
  5177  	//     "taskId": {
  5178  	//       "location": "path",
  5179  	//       "required": true,
  5180  	//       "type": "string"
  5181  	//     }
  5182  	//   },
  5183  	//   "path": "tables/{tableId}/tasks/{taskId}",
  5184  	//   "response": {
  5185  	//     "$ref": "Task"
  5186  	//   },
  5187  	//   "scopes": [
  5188  	//     "https://www.googleapis.com/auth/fusiontables",
  5189  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  5190  	//   ]
  5191  	// }
  5192  
  5193  }
  5194  
  5195  // method id "fusiontables.task.list":
  5196  
  5197  type TaskListCall struct {
  5198  	s            *Service
  5199  	tableId      string
  5200  	urlParams_   gensupport.URLParams
  5201  	ifNoneMatch_ string
  5202  	ctx_         context.Context
  5203  	header_      http.Header
  5204  }
  5205  
  5206  // List: Retrieves a list of tasks.
  5207  func (r *TaskService) List(tableId string) *TaskListCall {
  5208  	c := &TaskListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5209  	c.tableId = tableId
  5210  	return c
  5211  }
  5212  
  5213  // MaxResults sets the optional parameter "maxResults": Maximum number
  5214  // of columns to return.  Default is 5.
  5215  func (c *TaskListCall) MaxResults(maxResults int64) *TaskListCall {
  5216  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5217  	return c
  5218  }
  5219  
  5220  // PageToken sets the optional parameter "pageToken":
  5221  func (c *TaskListCall) PageToken(pageToken string) *TaskListCall {
  5222  	c.urlParams_.Set("pageToken", pageToken)
  5223  	return c
  5224  }
  5225  
  5226  // StartIndex sets the optional parameter "startIndex":
  5227  func (c *TaskListCall) StartIndex(startIndex int64) *TaskListCall {
  5228  	c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  5229  	return c
  5230  }
  5231  
  5232  // Fields allows partial responses to be retrieved. See
  5233  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5234  // for more information.
  5235  func (c *TaskListCall) Fields(s ...googleapi.Field) *TaskListCall {
  5236  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5237  	return c
  5238  }
  5239  
  5240  // IfNoneMatch sets the optional parameter which makes the operation
  5241  // fail if the object's ETag matches the given value. This is useful for
  5242  // getting updates only after the object has changed since the last
  5243  // request. Use googleapi.IsNotModified to check whether the response
  5244  // error from Do is the result of In-None-Match.
  5245  func (c *TaskListCall) IfNoneMatch(entityTag string) *TaskListCall {
  5246  	c.ifNoneMatch_ = entityTag
  5247  	return c
  5248  }
  5249  
  5250  // Context sets the context to be used in this call's Do method. Any
  5251  // pending HTTP request will be aborted if the provided context is
  5252  // canceled.
  5253  func (c *TaskListCall) Context(ctx context.Context) *TaskListCall {
  5254  	c.ctx_ = ctx
  5255  	return c
  5256  }
  5257  
  5258  // Header returns an http.Header that can be modified by the caller to
  5259  // add HTTP headers to the request.
  5260  func (c *TaskListCall) Header() http.Header {
  5261  	if c.header_ == nil {
  5262  		c.header_ = make(http.Header)
  5263  	}
  5264  	return c.header_
  5265  }
  5266  
  5267  func (c *TaskListCall) doRequest(alt string) (*http.Response, error) {
  5268  	reqHeaders := make(http.Header)
  5269  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5270  	for k, v := range c.header_ {
  5271  		reqHeaders[k] = v
  5272  	}
  5273  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5274  	if c.ifNoneMatch_ != "" {
  5275  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5276  	}
  5277  	var body io.Reader = nil
  5278  	c.urlParams_.Set("alt", alt)
  5279  	c.urlParams_.Set("prettyPrint", "false")
  5280  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/tasks")
  5281  	urls += "?" + c.urlParams_.Encode()
  5282  	req, err := http.NewRequest("GET", urls, body)
  5283  	if err != nil {
  5284  		return nil, err
  5285  	}
  5286  	req.Header = reqHeaders
  5287  	googleapi.Expand(req.URL, map[string]string{
  5288  		"tableId": c.tableId,
  5289  	})
  5290  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5291  }
  5292  
  5293  // Do executes the "fusiontables.task.list" call.
  5294  // Exactly one of *TaskList or error will be non-nil. Any non-2xx status
  5295  // code is an error. Response headers are in either
  5296  // *TaskList.ServerResponse.Header or (if a response was returned at
  5297  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5298  // to check whether the returned error was because
  5299  // http.StatusNotModified was returned.
  5300  func (c *TaskListCall) Do(opts ...googleapi.CallOption) (*TaskList, error) {
  5301  	gensupport.SetOptions(c.urlParams_, opts...)
  5302  	res, err := c.doRequest("json")
  5303  	if res != nil && res.StatusCode == http.StatusNotModified {
  5304  		if res.Body != nil {
  5305  			res.Body.Close()
  5306  		}
  5307  		return nil, &googleapi.Error{
  5308  			Code:   res.StatusCode,
  5309  			Header: res.Header,
  5310  		}
  5311  	}
  5312  	if err != nil {
  5313  		return nil, err
  5314  	}
  5315  	defer googleapi.CloseBody(res)
  5316  	if err := googleapi.CheckResponse(res); err != nil {
  5317  		return nil, err
  5318  	}
  5319  	ret := &TaskList{
  5320  		ServerResponse: googleapi.ServerResponse{
  5321  			Header:         res.Header,
  5322  			HTTPStatusCode: res.StatusCode,
  5323  		},
  5324  	}
  5325  	target := &ret
  5326  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5327  		return nil, err
  5328  	}
  5329  	return ret, nil
  5330  	// {
  5331  	//   "description": "Retrieves a list of tasks.",
  5332  	//   "httpMethod": "GET",
  5333  	//   "id": "fusiontables.task.list",
  5334  	//   "parameterOrder": [
  5335  	//     "tableId"
  5336  	//   ],
  5337  	//   "parameters": {
  5338  	//     "maxResults": {
  5339  	//       "description": "Maximum number of columns to return. Optional. Default is 5.",
  5340  	//       "format": "uint32",
  5341  	//       "location": "query",
  5342  	//       "minimum": "0",
  5343  	//       "type": "integer"
  5344  	//     },
  5345  	//     "pageToken": {
  5346  	//       "location": "query",
  5347  	//       "type": "string"
  5348  	//     },
  5349  	//     "startIndex": {
  5350  	//       "format": "uint32",
  5351  	//       "location": "query",
  5352  	//       "type": "integer"
  5353  	//     },
  5354  	//     "tableId": {
  5355  	//       "description": "Table whose tasks are being listed.",
  5356  	//       "location": "path",
  5357  	//       "required": true,
  5358  	//       "type": "string"
  5359  	//     }
  5360  	//   },
  5361  	//   "path": "tables/{tableId}/tasks",
  5362  	//   "response": {
  5363  	//     "$ref": "TaskList"
  5364  	//   },
  5365  	//   "scopes": [
  5366  	//     "https://www.googleapis.com/auth/fusiontables",
  5367  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  5368  	//   ]
  5369  	// }
  5370  
  5371  }
  5372  
  5373  // Pages invokes f for each page of results.
  5374  // A non-nil error returned from f will halt the iteration.
  5375  // The provided context supersedes any context provided to the Context method.
  5376  func (c *TaskListCall) Pages(ctx context.Context, f func(*TaskList) error) error {
  5377  	c.ctx_ = ctx
  5378  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5379  	for {
  5380  		x, err := c.Do()
  5381  		if err != nil {
  5382  			return err
  5383  		}
  5384  		if err := f(x); err != nil {
  5385  			return err
  5386  		}
  5387  		if x.NextPageToken == "" {
  5388  			return nil
  5389  		}
  5390  		c.PageToken(x.NextPageToken)
  5391  	}
  5392  }
  5393  
  5394  // method id "fusiontables.template.delete":
  5395  
  5396  type TemplateDeleteCall struct {
  5397  	s          *Service
  5398  	tableId    string
  5399  	templateId int64
  5400  	urlParams_ gensupport.URLParams
  5401  	ctx_       context.Context
  5402  	header_    http.Header
  5403  }
  5404  
  5405  // Delete: Deletes a template
  5406  func (r *TemplateService) Delete(tableId string, templateId int64) *TemplateDeleteCall {
  5407  	c := &TemplateDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5408  	c.tableId = tableId
  5409  	c.templateId = templateId
  5410  	return c
  5411  }
  5412  
  5413  // Fields allows partial responses to be retrieved. See
  5414  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5415  // for more information.
  5416  func (c *TemplateDeleteCall) Fields(s ...googleapi.Field) *TemplateDeleteCall {
  5417  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5418  	return c
  5419  }
  5420  
  5421  // Context sets the context to be used in this call's Do method. Any
  5422  // pending HTTP request will be aborted if the provided context is
  5423  // canceled.
  5424  func (c *TemplateDeleteCall) Context(ctx context.Context) *TemplateDeleteCall {
  5425  	c.ctx_ = ctx
  5426  	return c
  5427  }
  5428  
  5429  // Header returns an http.Header that can be modified by the caller to
  5430  // add HTTP headers to the request.
  5431  func (c *TemplateDeleteCall) Header() http.Header {
  5432  	if c.header_ == nil {
  5433  		c.header_ = make(http.Header)
  5434  	}
  5435  	return c.header_
  5436  }
  5437  
  5438  func (c *TemplateDeleteCall) doRequest(alt string) (*http.Response, error) {
  5439  	reqHeaders := make(http.Header)
  5440  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5441  	for k, v := range c.header_ {
  5442  		reqHeaders[k] = v
  5443  	}
  5444  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5445  	var body io.Reader = nil
  5446  	c.urlParams_.Set("alt", alt)
  5447  	c.urlParams_.Set("prettyPrint", "false")
  5448  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/templates/{templateId}")
  5449  	urls += "?" + c.urlParams_.Encode()
  5450  	req, err := http.NewRequest("DELETE", urls, body)
  5451  	if err != nil {
  5452  		return nil, err
  5453  	}
  5454  	req.Header = reqHeaders
  5455  	googleapi.Expand(req.URL, map[string]string{
  5456  		"tableId":    c.tableId,
  5457  		"templateId": strconv.FormatInt(c.templateId, 10),
  5458  	})
  5459  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5460  }
  5461  
  5462  // Do executes the "fusiontables.template.delete" call.
  5463  func (c *TemplateDeleteCall) Do(opts ...googleapi.CallOption) error {
  5464  	gensupport.SetOptions(c.urlParams_, opts...)
  5465  	res, err := c.doRequest("json")
  5466  	if err != nil {
  5467  		return err
  5468  	}
  5469  	defer googleapi.CloseBody(res)
  5470  	if err := googleapi.CheckResponse(res); err != nil {
  5471  		return err
  5472  	}
  5473  	return nil
  5474  	// {
  5475  	//   "description": "Deletes a template",
  5476  	//   "httpMethod": "DELETE",
  5477  	//   "id": "fusiontables.template.delete",
  5478  	//   "parameterOrder": [
  5479  	//     "tableId",
  5480  	//     "templateId"
  5481  	//   ],
  5482  	//   "parameters": {
  5483  	//     "tableId": {
  5484  	//       "description": "Table from which the template is being deleted",
  5485  	//       "location": "path",
  5486  	//       "required": true,
  5487  	//       "type": "string"
  5488  	//     },
  5489  	//     "templateId": {
  5490  	//       "description": "Identifier for the template which is being deleted",
  5491  	//       "format": "int32",
  5492  	//       "location": "path",
  5493  	//       "required": true,
  5494  	//       "type": "integer"
  5495  	//     }
  5496  	//   },
  5497  	//   "path": "tables/{tableId}/templates/{templateId}",
  5498  	//   "scopes": [
  5499  	//     "https://www.googleapis.com/auth/fusiontables"
  5500  	//   ]
  5501  	// }
  5502  
  5503  }
  5504  
  5505  // method id "fusiontables.template.get":
  5506  
  5507  type TemplateGetCall struct {
  5508  	s            *Service
  5509  	tableId      string
  5510  	templateId   int64
  5511  	urlParams_   gensupport.URLParams
  5512  	ifNoneMatch_ string
  5513  	ctx_         context.Context
  5514  	header_      http.Header
  5515  }
  5516  
  5517  // Get: Retrieves a specific template by its id
  5518  func (r *TemplateService) Get(tableId string, templateId int64) *TemplateGetCall {
  5519  	c := &TemplateGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5520  	c.tableId = tableId
  5521  	c.templateId = templateId
  5522  	return c
  5523  }
  5524  
  5525  // Fields allows partial responses to be retrieved. See
  5526  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5527  // for more information.
  5528  func (c *TemplateGetCall) Fields(s ...googleapi.Field) *TemplateGetCall {
  5529  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5530  	return c
  5531  }
  5532  
  5533  // IfNoneMatch sets the optional parameter which makes the operation
  5534  // fail if the object's ETag matches the given value. This is useful for
  5535  // getting updates only after the object has changed since the last
  5536  // request. Use googleapi.IsNotModified to check whether the response
  5537  // error from Do is the result of In-None-Match.
  5538  func (c *TemplateGetCall) IfNoneMatch(entityTag string) *TemplateGetCall {
  5539  	c.ifNoneMatch_ = entityTag
  5540  	return c
  5541  }
  5542  
  5543  // Context sets the context to be used in this call's Do method. Any
  5544  // pending HTTP request will be aborted if the provided context is
  5545  // canceled.
  5546  func (c *TemplateGetCall) Context(ctx context.Context) *TemplateGetCall {
  5547  	c.ctx_ = ctx
  5548  	return c
  5549  }
  5550  
  5551  // Header returns an http.Header that can be modified by the caller to
  5552  // add HTTP headers to the request.
  5553  func (c *TemplateGetCall) Header() http.Header {
  5554  	if c.header_ == nil {
  5555  		c.header_ = make(http.Header)
  5556  	}
  5557  	return c.header_
  5558  }
  5559  
  5560  func (c *TemplateGetCall) doRequest(alt string) (*http.Response, error) {
  5561  	reqHeaders := make(http.Header)
  5562  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5563  	for k, v := range c.header_ {
  5564  		reqHeaders[k] = v
  5565  	}
  5566  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5567  	if c.ifNoneMatch_ != "" {
  5568  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5569  	}
  5570  	var body io.Reader = nil
  5571  	c.urlParams_.Set("alt", alt)
  5572  	c.urlParams_.Set("prettyPrint", "false")
  5573  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/templates/{templateId}")
  5574  	urls += "?" + c.urlParams_.Encode()
  5575  	req, err := http.NewRequest("GET", urls, body)
  5576  	if err != nil {
  5577  		return nil, err
  5578  	}
  5579  	req.Header = reqHeaders
  5580  	googleapi.Expand(req.URL, map[string]string{
  5581  		"tableId":    c.tableId,
  5582  		"templateId": strconv.FormatInt(c.templateId, 10),
  5583  	})
  5584  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5585  }
  5586  
  5587  // Do executes the "fusiontables.template.get" call.
  5588  // Exactly one of *Template or error will be non-nil. Any non-2xx status
  5589  // code is an error. Response headers are in either
  5590  // *Template.ServerResponse.Header or (if a response was returned at
  5591  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5592  // to check whether the returned error was because
  5593  // http.StatusNotModified was returned.
  5594  func (c *TemplateGetCall) Do(opts ...googleapi.CallOption) (*Template, error) {
  5595  	gensupport.SetOptions(c.urlParams_, opts...)
  5596  	res, err := c.doRequest("json")
  5597  	if res != nil && res.StatusCode == http.StatusNotModified {
  5598  		if res.Body != nil {
  5599  			res.Body.Close()
  5600  		}
  5601  		return nil, &googleapi.Error{
  5602  			Code:   res.StatusCode,
  5603  			Header: res.Header,
  5604  		}
  5605  	}
  5606  	if err != nil {
  5607  		return nil, err
  5608  	}
  5609  	defer googleapi.CloseBody(res)
  5610  	if err := googleapi.CheckResponse(res); err != nil {
  5611  		return nil, err
  5612  	}
  5613  	ret := &Template{
  5614  		ServerResponse: googleapi.ServerResponse{
  5615  			Header:         res.Header,
  5616  			HTTPStatusCode: res.StatusCode,
  5617  		},
  5618  	}
  5619  	target := &ret
  5620  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5621  		return nil, err
  5622  	}
  5623  	return ret, nil
  5624  	// {
  5625  	//   "description": "Retrieves a specific template by its id",
  5626  	//   "httpMethod": "GET",
  5627  	//   "id": "fusiontables.template.get",
  5628  	//   "parameterOrder": [
  5629  	//     "tableId",
  5630  	//     "templateId"
  5631  	//   ],
  5632  	//   "parameters": {
  5633  	//     "tableId": {
  5634  	//       "description": "Table to which the template belongs",
  5635  	//       "location": "path",
  5636  	//       "required": true,
  5637  	//       "type": "string"
  5638  	//     },
  5639  	//     "templateId": {
  5640  	//       "description": "Identifier for the template that is being requested",
  5641  	//       "format": "int32",
  5642  	//       "location": "path",
  5643  	//       "required": true,
  5644  	//       "type": "integer"
  5645  	//     }
  5646  	//   },
  5647  	//   "path": "tables/{tableId}/templates/{templateId}",
  5648  	//   "response": {
  5649  	//     "$ref": "Template"
  5650  	//   },
  5651  	//   "scopes": [
  5652  	//     "https://www.googleapis.com/auth/fusiontables",
  5653  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  5654  	//   ]
  5655  	// }
  5656  
  5657  }
  5658  
  5659  // method id "fusiontables.template.insert":
  5660  
  5661  type TemplateInsertCall struct {
  5662  	s          *Service
  5663  	tableId    string
  5664  	template   *Template
  5665  	urlParams_ gensupport.URLParams
  5666  	ctx_       context.Context
  5667  	header_    http.Header
  5668  }
  5669  
  5670  // Insert: Creates a new template for the table.
  5671  func (r *TemplateService) Insert(tableId string, template *Template) *TemplateInsertCall {
  5672  	c := &TemplateInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5673  	c.tableId = tableId
  5674  	c.template = template
  5675  	return c
  5676  }
  5677  
  5678  // Fields allows partial responses to be retrieved. See
  5679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5680  // for more information.
  5681  func (c *TemplateInsertCall) Fields(s ...googleapi.Field) *TemplateInsertCall {
  5682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5683  	return c
  5684  }
  5685  
  5686  // Context sets the context to be used in this call's Do method. Any
  5687  // pending HTTP request will be aborted if the provided context is
  5688  // canceled.
  5689  func (c *TemplateInsertCall) Context(ctx context.Context) *TemplateInsertCall {
  5690  	c.ctx_ = ctx
  5691  	return c
  5692  }
  5693  
  5694  // Header returns an http.Header that can be modified by the caller to
  5695  // add HTTP headers to the request.
  5696  func (c *TemplateInsertCall) Header() http.Header {
  5697  	if c.header_ == nil {
  5698  		c.header_ = make(http.Header)
  5699  	}
  5700  	return c.header_
  5701  }
  5702  
  5703  func (c *TemplateInsertCall) doRequest(alt string) (*http.Response, error) {
  5704  	reqHeaders := make(http.Header)
  5705  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5706  	for k, v := range c.header_ {
  5707  		reqHeaders[k] = v
  5708  	}
  5709  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5710  	var body io.Reader = nil
  5711  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
  5712  	if err != nil {
  5713  		return nil, err
  5714  	}
  5715  	reqHeaders.Set("Content-Type", "application/json")
  5716  	c.urlParams_.Set("alt", alt)
  5717  	c.urlParams_.Set("prettyPrint", "false")
  5718  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/templates")
  5719  	urls += "?" + c.urlParams_.Encode()
  5720  	req, err := http.NewRequest("POST", urls, body)
  5721  	if err != nil {
  5722  		return nil, err
  5723  	}
  5724  	req.Header = reqHeaders
  5725  	googleapi.Expand(req.URL, map[string]string{
  5726  		"tableId": c.tableId,
  5727  	})
  5728  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5729  }
  5730  
  5731  // Do executes the "fusiontables.template.insert" call.
  5732  // Exactly one of *Template or error will be non-nil. Any non-2xx status
  5733  // code is an error. Response headers are in either
  5734  // *Template.ServerResponse.Header or (if a response was returned at
  5735  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5736  // to check whether the returned error was because
  5737  // http.StatusNotModified was returned.
  5738  func (c *TemplateInsertCall) Do(opts ...googleapi.CallOption) (*Template, error) {
  5739  	gensupport.SetOptions(c.urlParams_, opts...)
  5740  	res, err := c.doRequest("json")
  5741  	if res != nil && res.StatusCode == http.StatusNotModified {
  5742  		if res.Body != nil {
  5743  			res.Body.Close()
  5744  		}
  5745  		return nil, &googleapi.Error{
  5746  			Code:   res.StatusCode,
  5747  			Header: res.Header,
  5748  		}
  5749  	}
  5750  	if err != nil {
  5751  		return nil, err
  5752  	}
  5753  	defer googleapi.CloseBody(res)
  5754  	if err := googleapi.CheckResponse(res); err != nil {
  5755  		return nil, err
  5756  	}
  5757  	ret := &Template{
  5758  		ServerResponse: googleapi.ServerResponse{
  5759  			Header:         res.Header,
  5760  			HTTPStatusCode: res.StatusCode,
  5761  		},
  5762  	}
  5763  	target := &ret
  5764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5765  		return nil, err
  5766  	}
  5767  	return ret, nil
  5768  	// {
  5769  	//   "description": "Creates a new template for the table.",
  5770  	//   "httpMethod": "POST",
  5771  	//   "id": "fusiontables.template.insert",
  5772  	//   "parameterOrder": [
  5773  	//     "tableId"
  5774  	//   ],
  5775  	//   "parameters": {
  5776  	//     "tableId": {
  5777  	//       "description": "Table for which a new template is being created",
  5778  	//       "location": "path",
  5779  	//       "required": true,
  5780  	//       "type": "string"
  5781  	//     }
  5782  	//   },
  5783  	//   "path": "tables/{tableId}/templates",
  5784  	//   "request": {
  5785  	//     "$ref": "Template"
  5786  	//   },
  5787  	//   "response": {
  5788  	//     "$ref": "Template"
  5789  	//   },
  5790  	//   "scopes": [
  5791  	//     "https://www.googleapis.com/auth/fusiontables"
  5792  	//   ]
  5793  	// }
  5794  
  5795  }
  5796  
  5797  // method id "fusiontables.template.list":
  5798  
  5799  type TemplateListCall struct {
  5800  	s            *Service
  5801  	tableId      string
  5802  	urlParams_   gensupport.URLParams
  5803  	ifNoneMatch_ string
  5804  	ctx_         context.Context
  5805  	header_      http.Header
  5806  }
  5807  
  5808  // List: Retrieves a list of templates.
  5809  func (r *TemplateService) List(tableId string) *TemplateListCall {
  5810  	c := &TemplateListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5811  	c.tableId = tableId
  5812  	return c
  5813  }
  5814  
  5815  // MaxResults sets the optional parameter "maxResults": Maximum number
  5816  // of templates to return.  Default is 5.
  5817  func (c *TemplateListCall) MaxResults(maxResults int64) *TemplateListCall {
  5818  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5819  	return c
  5820  }
  5821  
  5822  // PageToken sets the optional parameter "pageToken": Continuation token
  5823  // specifying which results page to return.
  5824  func (c *TemplateListCall) PageToken(pageToken string) *TemplateListCall {
  5825  	c.urlParams_.Set("pageToken", pageToken)
  5826  	return c
  5827  }
  5828  
  5829  // Fields allows partial responses to be retrieved. See
  5830  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5831  // for more information.
  5832  func (c *TemplateListCall) Fields(s ...googleapi.Field) *TemplateListCall {
  5833  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5834  	return c
  5835  }
  5836  
  5837  // IfNoneMatch sets the optional parameter which makes the operation
  5838  // fail if the object's ETag matches the given value. This is useful for
  5839  // getting updates only after the object has changed since the last
  5840  // request. Use googleapi.IsNotModified to check whether the response
  5841  // error from Do is the result of In-None-Match.
  5842  func (c *TemplateListCall) IfNoneMatch(entityTag string) *TemplateListCall {
  5843  	c.ifNoneMatch_ = entityTag
  5844  	return c
  5845  }
  5846  
  5847  // Context sets the context to be used in this call's Do method. Any
  5848  // pending HTTP request will be aborted if the provided context is
  5849  // canceled.
  5850  func (c *TemplateListCall) Context(ctx context.Context) *TemplateListCall {
  5851  	c.ctx_ = ctx
  5852  	return c
  5853  }
  5854  
  5855  // Header returns an http.Header that can be modified by the caller to
  5856  // add HTTP headers to the request.
  5857  func (c *TemplateListCall) Header() http.Header {
  5858  	if c.header_ == nil {
  5859  		c.header_ = make(http.Header)
  5860  	}
  5861  	return c.header_
  5862  }
  5863  
  5864  func (c *TemplateListCall) doRequest(alt string) (*http.Response, error) {
  5865  	reqHeaders := make(http.Header)
  5866  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5867  	for k, v := range c.header_ {
  5868  		reqHeaders[k] = v
  5869  	}
  5870  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5871  	if c.ifNoneMatch_ != "" {
  5872  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5873  	}
  5874  	var body io.Reader = nil
  5875  	c.urlParams_.Set("alt", alt)
  5876  	c.urlParams_.Set("prettyPrint", "false")
  5877  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/templates")
  5878  	urls += "?" + c.urlParams_.Encode()
  5879  	req, err := http.NewRequest("GET", urls, body)
  5880  	if err != nil {
  5881  		return nil, err
  5882  	}
  5883  	req.Header = reqHeaders
  5884  	googleapi.Expand(req.URL, map[string]string{
  5885  		"tableId": c.tableId,
  5886  	})
  5887  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5888  }
  5889  
  5890  // Do executes the "fusiontables.template.list" call.
  5891  // Exactly one of *TemplateList or error will be non-nil. Any non-2xx
  5892  // status code is an error. Response headers are in either
  5893  // *TemplateList.ServerResponse.Header or (if a response was returned at
  5894  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5895  // to check whether the returned error was because
  5896  // http.StatusNotModified was returned.
  5897  func (c *TemplateListCall) Do(opts ...googleapi.CallOption) (*TemplateList, error) {
  5898  	gensupport.SetOptions(c.urlParams_, opts...)
  5899  	res, err := c.doRequest("json")
  5900  	if res != nil && res.StatusCode == http.StatusNotModified {
  5901  		if res.Body != nil {
  5902  			res.Body.Close()
  5903  		}
  5904  		return nil, &googleapi.Error{
  5905  			Code:   res.StatusCode,
  5906  			Header: res.Header,
  5907  		}
  5908  	}
  5909  	if err != nil {
  5910  		return nil, err
  5911  	}
  5912  	defer googleapi.CloseBody(res)
  5913  	if err := googleapi.CheckResponse(res); err != nil {
  5914  		return nil, err
  5915  	}
  5916  	ret := &TemplateList{
  5917  		ServerResponse: googleapi.ServerResponse{
  5918  			Header:         res.Header,
  5919  			HTTPStatusCode: res.StatusCode,
  5920  		},
  5921  	}
  5922  	target := &ret
  5923  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5924  		return nil, err
  5925  	}
  5926  	return ret, nil
  5927  	// {
  5928  	//   "description": "Retrieves a list of templates.",
  5929  	//   "httpMethod": "GET",
  5930  	//   "id": "fusiontables.template.list",
  5931  	//   "parameterOrder": [
  5932  	//     "tableId"
  5933  	//   ],
  5934  	//   "parameters": {
  5935  	//     "maxResults": {
  5936  	//       "description": "Maximum number of templates to return. Optional. Default is 5.",
  5937  	//       "format": "uint32",
  5938  	//       "location": "query",
  5939  	//       "minimum": "0",
  5940  	//       "type": "integer"
  5941  	//     },
  5942  	//     "pageToken": {
  5943  	//       "description": "Continuation token specifying which results page to return. Optional.",
  5944  	//       "location": "query",
  5945  	//       "type": "string"
  5946  	//     },
  5947  	//     "tableId": {
  5948  	//       "description": "Identifier for the table whose templates are being requested",
  5949  	//       "location": "path",
  5950  	//       "required": true,
  5951  	//       "type": "string"
  5952  	//     }
  5953  	//   },
  5954  	//   "path": "tables/{tableId}/templates",
  5955  	//   "response": {
  5956  	//     "$ref": "TemplateList"
  5957  	//   },
  5958  	//   "scopes": [
  5959  	//     "https://www.googleapis.com/auth/fusiontables",
  5960  	//     "https://www.googleapis.com/auth/fusiontables.readonly"
  5961  	//   ]
  5962  	// }
  5963  
  5964  }
  5965  
  5966  // Pages invokes f for each page of results.
  5967  // A non-nil error returned from f will halt the iteration.
  5968  // The provided context supersedes any context provided to the Context method.
  5969  func (c *TemplateListCall) Pages(ctx context.Context, f func(*TemplateList) error) error {
  5970  	c.ctx_ = ctx
  5971  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5972  	for {
  5973  		x, err := c.Do()
  5974  		if err != nil {
  5975  			return err
  5976  		}
  5977  		if err := f(x); err != nil {
  5978  			return err
  5979  		}
  5980  		if x.NextPageToken == "" {
  5981  			return nil
  5982  		}
  5983  		c.PageToken(x.NextPageToken)
  5984  	}
  5985  }
  5986  
  5987  // method id "fusiontables.template.patch":
  5988  
  5989  type TemplatePatchCall struct {
  5990  	s          *Service
  5991  	tableId    string
  5992  	templateId int64
  5993  	template   *Template
  5994  	urlParams_ gensupport.URLParams
  5995  	ctx_       context.Context
  5996  	header_    http.Header
  5997  }
  5998  
  5999  // Patch: Updates an existing template. This method supports patch
  6000  // semantics.
  6001  func (r *TemplateService) Patch(tableId string, templateId int64, template *Template) *TemplatePatchCall {
  6002  	c := &TemplatePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6003  	c.tableId = tableId
  6004  	c.templateId = templateId
  6005  	c.template = template
  6006  	return c
  6007  }
  6008  
  6009  // Fields allows partial responses to be retrieved. See
  6010  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6011  // for more information.
  6012  func (c *TemplatePatchCall) Fields(s ...googleapi.Field) *TemplatePatchCall {
  6013  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6014  	return c
  6015  }
  6016  
  6017  // Context sets the context to be used in this call's Do method. Any
  6018  // pending HTTP request will be aborted if the provided context is
  6019  // canceled.
  6020  func (c *TemplatePatchCall) Context(ctx context.Context) *TemplatePatchCall {
  6021  	c.ctx_ = ctx
  6022  	return c
  6023  }
  6024  
  6025  // Header returns an http.Header that can be modified by the caller to
  6026  // add HTTP headers to the request.
  6027  func (c *TemplatePatchCall) Header() http.Header {
  6028  	if c.header_ == nil {
  6029  		c.header_ = make(http.Header)
  6030  	}
  6031  	return c.header_
  6032  }
  6033  
  6034  func (c *TemplatePatchCall) doRequest(alt string) (*http.Response, error) {
  6035  	reqHeaders := make(http.Header)
  6036  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6037  	for k, v := range c.header_ {
  6038  		reqHeaders[k] = v
  6039  	}
  6040  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6041  	var body io.Reader = nil
  6042  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
  6043  	if err != nil {
  6044  		return nil, err
  6045  	}
  6046  	reqHeaders.Set("Content-Type", "application/json")
  6047  	c.urlParams_.Set("alt", alt)
  6048  	c.urlParams_.Set("prettyPrint", "false")
  6049  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/templates/{templateId}")
  6050  	urls += "?" + c.urlParams_.Encode()
  6051  	req, err := http.NewRequest("PATCH", urls, body)
  6052  	if err != nil {
  6053  		return nil, err
  6054  	}
  6055  	req.Header = reqHeaders
  6056  	googleapi.Expand(req.URL, map[string]string{
  6057  		"tableId":    c.tableId,
  6058  		"templateId": strconv.FormatInt(c.templateId, 10),
  6059  	})
  6060  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6061  }
  6062  
  6063  // Do executes the "fusiontables.template.patch" call.
  6064  // Exactly one of *Template or error will be non-nil. Any non-2xx status
  6065  // code is an error. Response headers are in either
  6066  // *Template.ServerResponse.Header or (if a response was returned at
  6067  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6068  // to check whether the returned error was because
  6069  // http.StatusNotModified was returned.
  6070  func (c *TemplatePatchCall) Do(opts ...googleapi.CallOption) (*Template, error) {
  6071  	gensupport.SetOptions(c.urlParams_, opts...)
  6072  	res, err := c.doRequest("json")
  6073  	if res != nil && res.StatusCode == http.StatusNotModified {
  6074  		if res.Body != nil {
  6075  			res.Body.Close()
  6076  		}
  6077  		return nil, &googleapi.Error{
  6078  			Code:   res.StatusCode,
  6079  			Header: res.Header,
  6080  		}
  6081  	}
  6082  	if err != nil {
  6083  		return nil, err
  6084  	}
  6085  	defer googleapi.CloseBody(res)
  6086  	if err := googleapi.CheckResponse(res); err != nil {
  6087  		return nil, err
  6088  	}
  6089  	ret := &Template{
  6090  		ServerResponse: googleapi.ServerResponse{
  6091  			Header:         res.Header,
  6092  			HTTPStatusCode: res.StatusCode,
  6093  		},
  6094  	}
  6095  	target := &ret
  6096  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6097  		return nil, err
  6098  	}
  6099  	return ret, nil
  6100  	// {
  6101  	//   "description": "Updates an existing template. This method supports patch semantics.",
  6102  	//   "httpMethod": "PATCH",
  6103  	//   "id": "fusiontables.template.patch",
  6104  	//   "parameterOrder": [
  6105  	//     "tableId",
  6106  	//     "templateId"
  6107  	//   ],
  6108  	//   "parameters": {
  6109  	//     "tableId": {
  6110  	//       "description": "Table to which the updated template belongs",
  6111  	//       "location": "path",
  6112  	//       "required": true,
  6113  	//       "type": "string"
  6114  	//     },
  6115  	//     "templateId": {
  6116  	//       "description": "Identifier for the template that is being updated",
  6117  	//       "format": "int32",
  6118  	//       "location": "path",
  6119  	//       "required": true,
  6120  	//       "type": "integer"
  6121  	//     }
  6122  	//   },
  6123  	//   "path": "tables/{tableId}/templates/{templateId}",
  6124  	//   "request": {
  6125  	//     "$ref": "Template"
  6126  	//   },
  6127  	//   "response": {
  6128  	//     "$ref": "Template"
  6129  	//   },
  6130  	//   "scopes": [
  6131  	//     "https://www.googleapis.com/auth/fusiontables"
  6132  	//   ]
  6133  	// }
  6134  
  6135  }
  6136  
  6137  // method id "fusiontables.template.update":
  6138  
  6139  type TemplateUpdateCall struct {
  6140  	s          *Service
  6141  	tableId    string
  6142  	templateId int64
  6143  	template   *Template
  6144  	urlParams_ gensupport.URLParams
  6145  	ctx_       context.Context
  6146  	header_    http.Header
  6147  }
  6148  
  6149  // Update: Updates an existing template
  6150  func (r *TemplateService) Update(tableId string, templateId int64, template *Template) *TemplateUpdateCall {
  6151  	c := &TemplateUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6152  	c.tableId = tableId
  6153  	c.templateId = templateId
  6154  	c.template = template
  6155  	return c
  6156  }
  6157  
  6158  // Fields allows partial responses to be retrieved. See
  6159  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6160  // for more information.
  6161  func (c *TemplateUpdateCall) Fields(s ...googleapi.Field) *TemplateUpdateCall {
  6162  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6163  	return c
  6164  }
  6165  
  6166  // Context sets the context to be used in this call's Do method. Any
  6167  // pending HTTP request will be aborted if the provided context is
  6168  // canceled.
  6169  func (c *TemplateUpdateCall) Context(ctx context.Context) *TemplateUpdateCall {
  6170  	c.ctx_ = ctx
  6171  	return c
  6172  }
  6173  
  6174  // Header returns an http.Header that can be modified by the caller to
  6175  // add HTTP headers to the request.
  6176  func (c *TemplateUpdateCall) Header() http.Header {
  6177  	if c.header_ == nil {
  6178  		c.header_ = make(http.Header)
  6179  	}
  6180  	return c.header_
  6181  }
  6182  
  6183  func (c *TemplateUpdateCall) doRequest(alt string) (*http.Response, error) {
  6184  	reqHeaders := make(http.Header)
  6185  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6186  	for k, v := range c.header_ {
  6187  		reqHeaders[k] = v
  6188  	}
  6189  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6190  	var body io.Reader = nil
  6191  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
  6192  	if err != nil {
  6193  		return nil, err
  6194  	}
  6195  	reqHeaders.Set("Content-Type", "application/json")
  6196  	c.urlParams_.Set("alt", alt)
  6197  	c.urlParams_.Set("prettyPrint", "false")
  6198  	urls := googleapi.ResolveRelative(c.s.BasePath, "tables/{tableId}/templates/{templateId}")
  6199  	urls += "?" + c.urlParams_.Encode()
  6200  	req, err := http.NewRequest("PUT", urls, body)
  6201  	if err != nil {
  6202  		return nil, err
  6203  	}
  6204  	req.Header = reqHeaders
  6205  	googleapi.Expand(req.URL, map[string]string{
  6206  		"tableId":    c.tableId,
  6207  		"templateId": strconv.FormatInt(c.templateId, 10),
  6208  	})
  6209  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6210  }
  6211  
  6212  // Do executes the "fusiontables.template.update" call.
  6213  // Exactly one of *Template or error will be non-nil. Any non-2xx status
  6214  // code is an error. Response headers are in either
  6215  // *Template.ServerResponse.Header or (if a response was returned at
  6216  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6217  // to check whether the returned error was because
  6218  // http.StatusNotModified was returned.
  6219  func (c *TemplateUpdateCall) Do(opts ...googleapi.CallOption) (*Template, error) {
  6220  	gensupport.SetOptions(c.urlParams_, opts...)
  6221  	res, err := c.doRequest("json")
  6222  	if res != nil && res.StatusCode == http.StatusNotModified {
  6223  		if res.Body != nil {
  6224  			res.Body.Close()
  6225  		}
  6226  		return nil, &googleapi.Error{
  6227  			Code:   res.StatusCode,
  6228  			Header: res.Header,
  6229  		}
  6230  	}
  6231  	if err != nil {
  6232  		return nil, err
  6233  	}
  6234  	defer googleapi.CloseBody(res)
  6235  	if err := googleapi.CheckResponse(res); err != nil {
  6236  		return nil, err
  6237  	}
  6238  	ret := &Template{
  6239  		ServerResponse: googleapi.ServerResponse{
  6240  			Header:         res.Header,
  6241  			HTTPStatusCode: res.StatusCode,
  6242  		},
  6243  	}
  6244  	target := &ret
  6245  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6246  		return nil, err
  6247  	}
  6248  	return ret, nil
  6249  	// {
  6250  	//   "description": "Updates an existing template",
  6251  	//   "httpMethod": "PUT",
  6252  	//   "id": "fusiontables.template.update",
  6253  	//   "parameterOrder": [
  6254  	//     "tableId",
  6255  	//     "templateId"
  6256  	//   ],
  6257  	//   "parameters": {
  6258  	//     "tableId": {
  6259  	//       "description": "Table to which the updated template belongs",
  6260  	//       "location": "path",
  6261  	//       "required": true,
  6262  	//       "type": "string"
  6263  	//     },
  6264  	//     "templateId": {
  6265  	//       "description": "Identifier for the template that is being updated",
  6266  	//       "format": "int32",
  6267  	//       "location": "path",
  6268  	//       "required": true,
  6269  	//       "type": "integer"
  6270  	//     }
  6271  	//   },
  6272  	//   "path": "tables/{tableId}/templates/{templateId}",
  6273  	//   "request": {
  6274  	//     "$ref": "Template"
  6275  	//   },
  6276  	//   "response": {
  6277  	//     "$ref": "Template"
  6278  	//   },
  6279  	//   "scopes": [
  6280  	//     "https://www.googleapis.com/auth/fusiontables"
  6281  	//   ]
  6282  	// }
  6283  
  6284  }
  6285  

View as plain text