...

Source file src/google.golang.org/api/area120tables/v1alpha1/area120tables-gen.go

Documentation: google.golang.org/api/area120tables/v1alpha1

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

View as plain text