...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package firestore provides access to the Cloud Firestore API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/firestore instead.
    10  //
    11  // For product documentation, see: https://cloud.google.com/firestore
    12  //
    13  // # Library status
    14  //
    15  // These client libraries are officially supported by Google. However, this
    16  // library is considered complete and is in maintenance mode. This means
    17  // that we will address critical bugs and security issues but will not add
    18  // any new features.
    19  //
    20  // When possible, we recommend using our newer
    21  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    22  // that are still actively being worked and iterated on.
    23  //
    24  // # Creating a client
    25  //
    26  // Usage example:
    27  //
    28  //	import "google.golang.org/api/firestore/v1"
    29  //	...
    30  //	ctx := context.Background()
    31  //	firestoreService, err := firestore.NewService(ctx)
    32  //
    33  // In this example, Google Application Default Credentials are used for
    34  // authentication. For information on how to create and obtain Application
    35  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    36  //
    37  // # Other authentication options
    38  //
    39  // By default, all available scopes (see "Constants") are used to authenticate.
    40  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    41  //
    42  //	firestoreService, err := firestore.NewService(ctx, option.WithScopes(firestore.DatastoreScope))
    43  //
    44  // To use an API key for authentication (note: some APIs do not support API
    45  // keys), use [google.golang.org/api/option.WithAPIKey]:
    46  //
    47  //	firestoreService, err := firestore.NewService(ctx, option.WithAPIKey("AIza..."))
    48  //
    49  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    50  // flow, use [google.golang.org/api/option.WithTokenSource]:
    51  //
    52  //	config := &oauth2.Config{...}
    53  //	// ...
    54  //	token, err := config.Exchange(ctx, ...)
    55  //	firestoreService, err := firestore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    56  //
    57  // See [google.golang.org/api/option.ClientOption] for details on options.
    58  package firestore // import "google.golang.org/api/firestore/v1"
    59  
    60  import (
    61  	"bytes"
    62  	"context"
    63  	"encoding/json"
    64  	"errors"
    65  	"fmt"
    66  	"io"
    67  	"net/http"
    68  	"net/url"
    69  	"strconv"
    70  	"strings"
    71  
    72  	googleapi "google.golang.org/api/googleapi"
    73  	internal "google.golang.org/api/internal"
    74  	gensupport "google.golang.org/api/internal/gensupport"
    75  	option "google.golang.org/api/option"
    76  	internaloption "google.golang.org/api/option/internaloption"
    77  	htransport "google.golang.org/api/transport/http"
    78  )
    79  
    80  // Always reference these packages, just in case the auto-generated code
    81  // below doesn't.
    82  var _ = bytes.NewBuffer
    83  var _ = strconv.Itoa
    84  var _ = fmt.Sprintf
    85  var _ = json.NewDecoder
    86  var _ = io.Copy
    87  var _ = url.Parse
    88  var _ = gensupport.MarshalJSON
    89  var _ = googleapi.Version
    90  var _ = errors.New
    91  var _ = strings.Replace
    92  var _ = context.Canceled
    93  var _ = internaloption.WithDefaultEndpoint
    94  var _ = internal.Version
    95  
    96  const apiId = "firestore:v1"
    97  const apiName = "firestore"
    98  const apiVersion = "v1"
    99  const basePath = "https://firestore.googleapis.com/"
   100  const basePathTemplate = "https://firestore.UNIVERSE_DOMAIN/"
   101  const mtlsBasePath = "https://firestore.mtls.googleapis.com/"
   102  
   103  // OAuth2 scopes used by this API.
   104  const (
   105  	// See, edit, configure, and delete your Google Cloud data and see the email
   106  	// address for your Google Account.
   107  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   108  
   109  	// View and manage your Google Cloud Datastore data
   110  	DatastoreScope = "https://www.googleapis.com/auth/datastore"
   111  )
   112  
   113  // NewService creates a new Service.
   114  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   115  	scopesOption := internaloption.WithDefaultScopes(
   116  		"https://www.googleapis.com/auth/cloud-platform",
   117  		"https://www.googleapis.com/auth/datastore",
   118  	)
   119  	// NOTE: prepend, so we don't override user-specified scopes.
   120  	opts = append([]option.ClientOption{scopesOption}, opts...)
   121  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   122  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   123  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   124  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   125  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   126  	if err != nil {
   127  		return nil, err
   128  	}
   129  	s, err := New(client)
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	if endpoint != "" {
   134  		s.BasePath = endpoint
   135  	}
   136  	return s, nil
   137  }
   138  
   139  // New creates a new Service. It uses the provided http.Client for requests.
   140  //
   141  // Deprecated: please use NewService instead.
   142  // To provide a custom HTTP client, use option.WithHTTPClient.
   143  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   144  func New(client *http.Client) (*Service, error) {
   145  	if client == nil {
   146  		return nil, errors.New("client is nil")
   147  	}
   148  	s := &Service{client: client, BasePath: basePath}
   149  	s.Projects = NewProjectsService(s)
   150  	return s, nil
   151  }
   152  
   153  type Service struct {
   154  	client    *http.Client
   155  	BasePath  string // API endpoint base URL
   156  	UserAgent string // optional additional User-Agent fragment
   157  
   158  	Projects *ProjectsService
   159  }
   160  
   161  func (s *Service) userAgent() string {
   162  	if s.UserAgent == "" {
   163  		return googleapi.UserAgent
   164  	}
   165  	return googleapi.UserAgent + " " + s.UserAgent
   166  }
   167  
   168  func NewProjectsService(s *Service) *ProjectsService {
   169  	rs := &ProjectsService{s: s}
   170  	rs.Databases = NewProjectsDatabasesService(s)
   171  	rs.Locations = NewProjectsLocationsService(s)
   172  	return rs
   173  }
   174  
   175  type ProjectsService struct {
   176  	s *Service
   177  
   178  	Databases *ProjectsDatabasesService
   179  
   180  	Locations *ProjectsLocationsService
   181  }
   182  
   183  func NewProjectsDatabasesService(s *Service) *ProjectsDatabasesService {
   184  	rs := &ProjectsDatabasesService{s: s}
   185  	rs.BackupSchedules = NewProjectsDatabasesBackupSchedulesService(s)
   186  	rs.CollectionGroups = NewProjectsDatabasesCollectionGroupsService(s)
   187  	rs.Documents = NewProjectsDatabasesDocumentsService(s)
   188  	rs.Operations = NewProjectsDatabasesOperationsService(s)
   189  	return rs
   190  }
   191  
   192  type ProjectsDatabasesService struct {
   193  	s *Service
   194  
   195  	BackupSchedules *ProjectsDatabasesBackupSchedulesService
   196  
   197  	CollectionGroups *ProjectsDatabasesCollectionGroupsService
   198  
   199  	Documents *ProjectsDatabasesDocumentsService
   200  
   201  	Operations *ProjectsDatabasesOperationsService
   202  }
   203  
   204  func NewProjectsDatabasesBackupSchedulesService(s *Service) *ProjectsDatabasesBackupSchedulesService {
   205  	rs := &ProjectsDatabasesBackupSchedulesService{s: s}
   206  	return rs
   207  }
   208  
   209  type ProjectsDatabasesBackupSchedulesService struct {
   210  	s *Service
   211  }
   212  
   213  func NewProjectsDatabasesCollectionGroupsService(s *Service) *ProjectsDatabasesCollectionGroupsService {
   214  	rs := &ProjectsDatabasesCollectionGroupsService{s: s}
   215  	rs.Fields = NewProjectsDatabasesCollectionGroupsFieldsService(s)
   216  	rs.Indexes = NewProjectsDatabasesCollectionGroupsIndexesService(s)
   217  	return rs
   218  }
   219  
   220  type ProjectsDatabasesCollectionGroupsService struct {
   221  	s *Service
   222  
   223  	Fields *ProjectsDatabasesCollectionGroupsFieldsService
   224  
   225  	Indexes *ProjectsDatabasesCollectionGroupsIndexesService
   226  }
   227  
   228  func NewProjectsDatabasesCollectionGroupsFieldsService(s *Service) *ProjectsDatabasesCollectionGroupsFieldsService {
   229  	rs := &ProjectsDatabasesCollectionGroupsFieldsService{s: s}
   230  	return rs
   231  }
   232  
   233  type ProjectsDatabasesCollectionGroupsFieldsService struct {
   234  	s *Service
   235  }
   236  
   237  func NewProjectsDatabasesCollectionGroupsIndexesService(s *Service) *ProjectsDatabasesCollectionGroupsIndexesService {
   238  	rs := &ProjectsDatabasesCollectionGroupsIndexesService{s: s}
   239  	return rs
   240  }
   241  
   242  type ProjectsDatabasesCollectionGroupsIndexesService struct {
   243  	s *Service
   244  }
   245  
   246  func NewProjectsDatabasesDocumentsService(s *Service) *ProjectsDatabasesDocumentsService {
   247  	rs := &ProjectsDatabasesDocumentsService{s: s}
   248  	return rs
   249  }
   250  
   251  type ProjectsDatabasesDocumentsService struct {
   252  	s *Service
   253  }
   254  
   255  func NewProjectsDatabasesOperationsService(s *Service) *ProjectsDatabasesOperationsService {
   256  	rs := &ProjectsDatabasesOperationsService{s: s}
   257  	return rs
   258  }
   259  
   260  type ProjectsDatabasesOperationsService struct {
   261  	s *Service
   262  }
   263  
   264  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   265  	rs := &ProjectsLocationsService{s: s}
   266  	rs.Backups = NewProjectsLocationsBackupsService(s)
   267  	return rs
   268  }
   269  
   270  type ProjectsLocationsService struct {
   271  	s *Service
   272  
   273  	Backups *ProjectsLocationsBackupsService
   274  }
   275  
   276  func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService {
   277  	rs := &ProjectsLocationsBackupsService{s: s}
   278  	return rs
   279  }
   280  
   281  type ProjectsLocationsBackupsService struct {
   282  	s *Service
   283  }
   284  
   285  // Aggregation: Defines an aggregation that produces a single result.
   286  type Aggregation struct {
   287  	// Alias: Optional. Optional name of the field to store the result of the
   288  	// aggregation into. If not provided, Firestore will pick a default name
   289  	// following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS
   290  	// count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*)
   291  	// OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1,
   292  	// COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS
   293  	// field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation
   294  	// aliases. * Conform to document field name limitations.
   295  	Alias string `json:"alias,omitempty"`
   296  	// Avg: Average aggregator.
   297  	Avg *Avg `json:"avg,omitempty"`
   298  	// Count: Count aggregator.
   299  	Count *Count `json:"count,omitempty"`
   300  	// Sum: Sum aggregator.
   301  	Sum *Sum `json:"sum,omitempty"`
   302  	// ForceSendFields is a list of field names (e.g. "Alias") to unconditionally
   303  	// include in API requests. By default, fields with empty or default values are
   304  	// omitted from API requests. See
   305  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   306  	// details.
   307  	ForceSendFields []string `json:"-"`
   308  	// NullFields is a list of field names (e.g. "Alias") to include in API
   309  	// requests with the JSON null value. By default, fields with empty values are
   310  	// omitted from API requests. See
   311  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   312  	NullFields []string `json:"-"`
   313  }
   314  
   315  func (s *Aggregation) MarshalJSON() ([]byte, error) {
   316  	type NoMethod Aggregation
   317  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   318  }
   319  
   320  // AggregationResult: The result of a single bucket from a Firestore
   321  // aggregation query. The keys of `aggregate_fields` are the same for all
   322  // results in an aggregation query, unlike document queries which can have
   323  // different fields present for each result.
   324  type AggregationResult struct {
   325  	// AggregateFields: The result of the aggregation functions, ex: `COUNT(*) AS
   326  	// total_docs`. The key is the alias assigned to the aggregation function on
   327  	// input and the size of this map equals the number of aggregation functions in
   328  	// the query.
   329  	AggregateFields map[string]Value `json:"aggregateFields,omitempty"`
   330  	// ForceSendFields is a list of field names (e.g. "AggregateFields") to
   331  	// unconditionally include in API requests. By default, fields with empty or
   332  	// default values are omitted from API requests. See
   333  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   334  	// details.
   335  	ForceSendFields []string `json:"-"`
   336  	// NullFields is a list of field names (e.g. "AggregateFields") to include in
   337  	// API requests with the JSON null value. By default, fields with empty values
   338  	// are omitted from API requests. See
   339  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   340  	NullFields []string `json:"-"`
   341  }
   342  
   343  func (s *AggregationResult) MarshalJSON() ([]byte, error) {
   344  	type NoMethod AggregationResult
   345  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   346  }
   347  
   348  // ArrayValue: An array value.
   349  type ArrayValue struct {
   350  	// Values: Values in the array.
   351  	Values []*Value `json:"values,omitempty"`
   352  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   353  	// include in API requests. By default, fields with empty or default values are
   354  	// omitted from API requests. See
   355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   356  	// details.
   357  	ForceSendFields []string `json:"-"`
   358  	// NullFields is a list of field names (e.g. "Values") to include in API
   359  	// requests with the JSON null value. By default, fields with empty values are
   360  	// omitted from API requests. See
   361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   362  	NullFields []string `json:"-"`
   363  }
   364  
   365  func (s *ArrayValue) MarshalJSON() ([]byte, error) {
   366  	type NoMethod ArrayValue
   367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   368  }
   369  
   370  // Avg: Average of the values of the requested field. * Only numeric values
   371  // will be aggregated. All non-numeric values including `NULL` are skipped. *
   372  // If the aggregated values contain `NaN`, returns `NaN`. Infinity math follows
   373  // IEEE-754 standards. * If the aggregated value set is empty, returns `NULL`.
   374  // * Always returns the result as a double.
   375  type Avg struct {
   376  	// Field: The field to aggregate on.
   377  	Field *FieldReference `json:"field,omitempty"`
   378  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
   379  	// include in API requests. By default, fields with empty or default values are
   380  	// omitted from API requests. See
   381  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   382  	// details.
   383  	ForceSendFields []string `json:"-"`
   384  	// NullFields is a list of field names (e.g. "Field") to include in API
   385  	// requests with the JSON null value. By default, fields with empty values are
   386  	// omitted from API requests. See
   387  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   388  	NullFields []string `json:"-"`
   389  }
   390  
   391  func (s *Avg) MarshalJSON() ([]byte, error) {
   392  	type NoMethod Avg
   393  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   394  }
   395  
   396  // BatchGetDocumentsRequest: The request for Firestore.BatchGetDocuments.
   397  type BatchGetDocumentsRequest struct {
   398  	// Documents: The names of the documents to retrieve. In the format:
   399  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
   400  	// The request will fail if any of the document is not a child resource of the
   401  	// given `database`. Duplicate names will be elided.
   402  	Documents []string `json:"documents,omitempty"`
   403  	// Mask: The fields to return. If not set, returns all fields. If a document
   404  	// has a field that is not present in this mask, that field will not be
   405  	// returned in the response.
   406  	Mask *DocumentMask `json:"mask,omitempty"`
   407  	// NewTransaction: Starts a new transaction and reads the documents. Defaults
   408  	// to a read-only transaction. The new transaction ID will be returned as the
   409  	// first response in the stream.
   410  	NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
   411  	// ReadTime: Reads documents as they were at the given time. This must be a
   412  	// microsecond precision timestamp within the past one hour, or if
   413  	// Point-in-Time Recovery is enabled, can additionally be a whole minute
   414  	// timestamp within the past 7 days.
   415  	ReadTime string `json:"readTime,omitempty"`
   416  	// Transaction: Reads documents in a transaction.
   417  	Transaction string `json:"transaction,omitempty"`
   418  	// ForceSendFields is a list of field names (e.g. "Documents") to
   419  	// unconditionally include in API requests. By default, fields with empty or
   420  	// default values are omitted from API requests. See
   421  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   422  	// details.
   423  	ForceSendFields []string `json:"-"`
   424  	// NullFields is a list of field names (e.g. "Documents") to include in API
   425  	// requests with the JSON null value. By default, fields with empty values are
   426  	// omitted from API requests. See
   427  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   428  	NullFields []string `json:"-"`
   429  }
   430  
   431  func (s *BatchGetDocumentsRequest) MarshalJSON() ([]byte, error) {
   432  	type NoMethod BatchGetDocumentsRequest
   433  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   434  }
   435  
   436  // BatchGetDocumentsResponse: The streamed response for
   437  // Firestore.BatchGetDocuments.
   438  type BatchGetDocumentsResponse struct {
   439  	// Found: A document that was requested.
   440  	Found *Document `json:"found,omitempty"`
   441  	// Missing: A document name that was requested but does not exist. In the
   442  	// format:
   443  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
   444  	Missing string `json:"missing,omitempty"`
   445  	// ReadTime: The time at which the document was read. This may be monotically
   446  	// increasing, in this case the previous documents in the result stream are
   447  	// guaranteed not to have changed between their read_time and this one.
   448  	ReadTime string `json:"readTime,omitempty"`
   449  	// Transaction: The transaction that was started as part of this request. Will
   450  	// only be set in the first response, and only if
   451  	// BatchGetDocumentsRequest.new_transaction was set in the request.
   452  	Transaction string `json:"transaction,omitempty"`
   453  
   454  	// ServerResponse contains the HTTP response code and headers from the server.
   455  	googleapi.ServerResponse `json:"-"`
   456  	// ForceSendFields is a list of field names (e.g. "Found") 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. "Found") to include in API
   463  	// requests with the JSON null value. By default, fields with empty values are
   464  	// omitted 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 *BatchGetDocumentsResponse) MarshalJSON() ([]byte, error) {
   470  	type NoMethod BatchGetDocumentsResponse
   471  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   472  }
   473  
   474  // BatchWriteRequest: The request for Firestore.BatchWrite.
   475  type BatchWriteRequest struct {
   476  	// Labels: Labels associated with this batch write.
   477  	Labels map[string]string `json:"labels,omitempty"`
   478  	// Writes: The writes to apply. Method does not apply writes atomically and
   479  	// does not guarantee ordering. Each write succeeds or fails independently. You
   480  	// cannot write to the same document more than once per request.
   481  	Writes []*Write `json:"writes,omitempty"`
   482  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
   483  	// include in API requests. By default, fields with empty or default values are
   484  	// omitted from API requests. See
   485  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   486  	// details.
   487  	ForceSendFields []string `json:"-"`
   488  	// NullFields is a list of field names (e.g. "Labels") to include in API
   489  	// requests with the JSON null value. By default, fields with empty values are
   490  	// omitted from API requests. See
   491  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   492  	NullFields []string `json:"-"`
   493  }
   494  
   495  func (s *BatchWriteRequest) MarshalJSON() ([]byte, error) {
   496  	type NoMethod BatchWriteRequest
   497  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   498  }
   499  
   500  // BatchWriteResponse: The response from Firestore.BatchWrite.
   501  type BatchWriteResponse struct {
   502  	// Status: The status of applying the writes. This i-th write status
   503  	// corresponds to the i-th write in the request.
   504  	Status []*Status `json:"status,omitempty"`
   505  	// WriteResults: The result of applying the writes. This i-th write result
   506  	// corresponds to the i-th write in the request.
   507  	WriteResults []*WriteResult `json:"writeResults,omitempty"`
   508  
   509  	// ServerResponse contains the HTTP response code and headers from the server.
   510  	googleapi.ServerResponse `json:"-"`
   511  	// ForceSendFields is a list of field names (e.g. "Status") to unconditionally
   512  	// include in API requests. By default, fields with empty or default values are
   513  	// omitted from API requests. See
   514  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   515  	// details.
   516  	ForceSendFields []string `json:"-"`
   517  	// NullFields is a list of field names (e.g. "Status") to include in API
   518  	// requests with the JSON null value. By default, fields with empty values are
   519  	// omitted from API requests. See
   520  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   521  	NullFields []string `json:"-"`
   522  }
   523  
   524  func (s *BatchWriteResponse) MarshalJSON() ([]byte, error) {
   525  	type NoMethod BatchWriteResponse
   526  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   527  }
   528  
   529  // BeginTransactionRequest: The request for Firestore.BeginTransaction.
   530  type BeginTransactionRequest struct {
   531  	// Options: The options for the transaction. Defaults to a read-write
   532  	// transaction.
   533  	Options *TransactionOptions `json:"options,omitempty"`
   534  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
   535  	// include in API requests. By default, fields with empty or default values are
   536  	// omitted from API requests. See
   537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   538  	// details.
   539  	ForceSendFields []string `json:"-"`
   540  	// NullFields is a list of field names (e.g. "Options") to include in API
   541  	// requests with the JSON null value. By default, fields with empty values are
   542  	// omitted from API requests. See
   543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   544  	NullFields []string `json:"-"`
   545  }
   546  
   547  func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
   548  	type NoMethod BeginTransactionRequest
   549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   550  }
   551  
   552  // BeginTransactionResponse: The response for Firestore.BeginTransaction.
   553  type BeginTransactionResponse struct {
   554  	// Transaction: The transaction that was started.
   555  	Transaction string `json:"transaction,omitempty"`
   556  
   557  	// ServerResponse contains the HTTP response code and headers from the server.
   558  	googleapi.ServerResponse `json:"-"`
   559  	// ForceSendFields is a list of field names (e.g. "Transaction") to
   560  	// unconditionally include in API requests. By default, fields with empty or
   561  	// default values are omitted from API requests. See
   562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   563  	// details.
   564  	ForceSendFields []string `json:"-"`
   565  	// NullFields is a list of field names (e.g. "Transaction") to include in API
   566  	// requests with the JSON null value. By default, fields with empty values are
   567  	// omitted from API requests. See
   568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   569  	NullFields []string `json:"-"`
   570  }
   571  
   572  func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) {
   573  	type NoMethod BeginTransactionResponse
   574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   575  }
   576  
   577  // BitSequence: A sequence of bits, encoded in a byte array. Each byte in the
   578  // `bitmap` byte array stores 8 bits of the sequence. The only exception is the
   579  // last byte, which may store 8 _or fewer_ bits. The `padding` defines the
   580  // number of bits of the last byte to be ignored as "padding". The values of
   581  // these "padding" bits are unspecified and must be ignored. To retrieve the
   582  // first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. To retrieve the
   583  // second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. To retrieve the
   584  // third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. To retrieve the
   585  // fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. To retrieve bit n,
   586  // calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. The "size" of a
   587  // `BitSequence` (the number of bits it contains) is calculated by this
   588  // formula: `(bitmap.length * 8) - padding`.
   589  type BitSequence struct {
   590  	// Bitmap: The bytes that encode the bit sequence. May have a length of zero.
   591  	Bitmap string `json:"bitmap,omitempty"`
   592  	// Padding: The number of bits of the last byte in `bitmap` to ignore as
   593  	// "padding". If the length of `bitmap` is zero, then this value must be `0`.
   594  	// Otherwise, this value must be between 0 and 7, inclusive.
   595  	Padding int64 `json:"padding,omitempty"`
   596  	// ForceSendFields is a list of field names (e.g. "Bitmap") to unconditionally
   597  	// include in API requests. By default, fields with empty or default values are
   598  	// omitted from API requests. See
   599  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   600  	// details.
   601  	ForceSendFields []string `json:"-"`
   602  	// NullFields is a list of field names (e.g. "Bitmap") to include in API
   603  	// requests with the JSON null value. By default, fields with empty values are
   604  	// omitted from API requests. See
   605  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   606  	NullFields []string `json:"-"`
   607  }
   608  
   609  func (s *BitSequence) MarshalJSON() ([]byte, error) {
   610  	type NoMethod BitSequence
   611  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   612  }
   613  
   614  // BloomFilter: A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter).
   615  // The bloom filter hashes the entries with MD5 and treats the resulting
   616  // 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned
   617  // integers using 2's complement encoding. These two hash values, named `h1`
   618  // and `h2`, are then used to compute the `hash_count` hash values using the
   619  // formula, starting at `i=0`: h(i) = h1 + (i * h2) These resulting values are
   620  // then taken modulo the number of bits in the bloom filter to get the bits of
   621  // the bloom filter to test for the given entry.
   622  type BloomFilter struct {
   623  	// Bits: The bloom filter data.
   624  	Bits *BitSequence `json:"bits,omitempty"`
   625  	// HashCount: The number of hashes used by the algorithm.
   626  	HashCount int64 `json:"hashCount,omitempty"`
   627  	// ForceSendFields is a list of field names (e.g. "Bits") to unconditionally
   628  	// include in API requests. By default, fields with empty or default values are
   629  	// omitted from API requests. See
   630  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   631  	// details.
   632  	ForceSendFields []string `json:"-"`
   633  	// NullFields is a list of field names (e.g. "Bits") to include in API requests
   634  	// with the JSON null value. By default, fields with empty values are omitted
   635  	// from API requests. See
   636  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   637  	NullFields []string `json:"-"`
   638  }
   639  
   640  func (s *BloomFilter) MarshalJSON() ([]byte, error) {
   641  	type NoMethod BloomFilter
   642  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   643  }
   644  
   645  // CollectionSelector: A selection of a collection, such as `messages as m1`.
   646  type CollectionSelector struct {
   647  	// AllDescendants: When false, selects only collections that are immediate
   648  	// children of the `parent` specified in the containing `RunQueryRequest`. When
   649  	// true, selects all descendant collections.
   650  	AllDescendants bool `json:"allDescendants,omitempty"`
   651  	// CollectionId: The collection ID. When set, selects only collections with
   652  	// this ID.
   653  	CollectionId string `json:"collectionId,omitempty"`
   654  	// ForceSendFields is a list of field names (e.g. "AllDescendants") to
   655  	// unconditionally include in API requests. By default, fields with empty or
   656  	// default values are omitted from API requests. See
   657  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   658  	// details.
   659  	ForceSendFields []string `json:"-"`
   660  	// NullFields is a list of field names (e.g. "AllDescendants") to include in
   661  	// API requests with the JSON null value. By default, fields with empty values
   662  	// are omitted from API requests. See
   663  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   664  	NullFields []string `json:"-"`
   665  }
   666  
   667  func (s *CollectionSelector) MarshalJSON() ([]byte, error) {
   668  	type NoMethod CollectionSelector
   669  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   670  }
   671  
   672  // CommitRequest: The request for Firestore.Commit.
   673  type CommitRequest struct {
   674  	// Transaction: If set, applies all writes in this transaction, and commits it.
   675  	Transaction string `json:"transaction,omitempty"`
   676  	// Writes: The writes to apply. Always executed atomically and in order.
   677  	Writes []*Write `json:"writes,omitempty"`
   678  	// ForceSendFields is a list of field names (e.g. "Transaction") to
   679  	// unconditionally include in API requests. By default, fields with empty or
   680  	// default values are omitted from API requests. See
   681  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   682  	// details.
   683  	ForceSendFields []string `json:"-"`
   684  	// NullFields is a list of field names (e.g. "Transaction") to include in API
   685  	// requests with the JSON null value. By default, fields with empty values are
   686  	// omitted from API requests. See
   687  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   688  	NullFields []string `json:"-"`
   689  }
   690  
   691  func (s *CommitRequest) MarshalJSON() ([]byte, error) {
   692  	type NoMethod CommitRequest
   693  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   694  }
   695  
   696  // CommitResponse: The response for Firestore.Commit.
   697  type CommitResponse struct {
   698  	// CommitTime: The time at which the commit occurred. Any read with an equal or
   699  	// greater `read_time` is guaranteed to see the effects of the commit.
   700  	CommitTime string `json:"commitTime,omitempty"`
   701  	// WriteResults: The result of applying the writes. This i-th write result
   702  	// corresponds to the i-th write in the request.
   703  	WriteResults []*WriteResult `json:"writeResults,omitempty"`
   704  
   705  	// ServerResponse contains the HTTP response code and headers from the server.
   706  	googleapi.ServerResponse `json:"-"`
   707  	// ForceSendFields is a list of field names (e.g. "CommitTime") to
   708  	// unconditionally include in API requests. By default, fields with empty or
   709  	// default values are omitted from API requests. See
   710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   711  	// details.
   712  	ForceSendFields []string `json:"-"`
   713  	// NullFields is a list of field names (e.g. "CommitTime") to include in API
   714  	// requests with the JSON null value. By default, fields with empty values are
   715  	// omitted from API requests. See
   716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   717  	NullFields []string `json:"-"`
   718  }
   719  
   720  func (s *CommitResponse) MarshalJSON() ([]byte, error) {
   721  	type NoMethod CommitResponse
   722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   723  }
   724  
   725  // CompositeFilter: A filter that merges multiple other filters using the given
   726  // operator.
   727  type CompositeFilter struct {
   728  	// Filters: The list of filters to combine. Requires: * At least one filter is
   729  	// present.
   730  	Filters []*Filter `json:"filters,omitempty"`
   731  	// Op: The operator for combining multiple filters.
   732  	//
   733  	// Possible values:
   734  	//   "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
   735  	//   "AND" - Documents are required to satisfy all of the combined filters.
   736  	//   "OR" - Documents are required to satisfy at least one of the combined
   737  	// filters.
   738  	Op string `json:"op,omitempty"`
   739  	// ForceSendFields is a list of field names (e.g. "Filters") to unconditionally
   740  	// include in API requests. By default, fields with empty or default values are
   741  	// omitted from API requests. See
   742  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   743  	// details.
   744  	ForceSendFields []string `json:"-"`
   745  	// NullFields is a list of field names (e.g. "Filters") to include in API
   746  	// requests with the JSON null value. By default, fields with empty values are
   747  	// omitted from API requests. See
   748  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   749  	NullFields []string `json:"-"`
   750  }
   751  
   752  func (s *CompositeFilter) MarshalJSON() ([]byte, error) {
   753  	type NoMethod CompositeFilter
   754  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   755  }
   756  
   757  // Count: Count of documents that match the query. The `COUNT(*)` aggregation
   758  // function operates on the entire document so it does not require a field
   759  // reference.
   760  type Count struct {
   761  	// UpTo: Optional. Optional constraint on the maximum number of documents to
   762  	// count. This provides a way to set an upper bound on the number of documents
   763  	// to scan, limiting latency, and cost. Unspecified is interpreted as no bound.
   764  	// High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k
   765  	// ); ``` Requires: * Must be greater than zero when present.
   766  	UpTo int64 `json:"upTo,omitempty,string"`
   767  	// ForceSendFields is a list of field names (e.g. "UpTo") to unconditionally
   768  	// include in API requests. By default, fields with empty or default values are
   769  	// omitted from API requests. See
   770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   771  	// details.
   772  	ForceSendFields []string `json:"-"`
   773  	// NullFields is a list of field names (e.g. "UpTo") to include in API requests
   774  	// with the JSON null value. By default, fields with empty values are omitted
   775  	// from API requests. See
   776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   777  	NullFields []string `json:"-"`
   778  }
   779  
   780  func (s *Count) MarshalJSON() ([]byte, error) {
   781  	type NoMethod Count
   782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   783  }
   784  
   785  // Cursor: A position in a query result set.
   786  type Cursor struct {
   787  	// Before: If the position is just before or just after the given values,
   788  	// relative to the sort order defined by the query.
   789  	Before bool `json:"before,omitempty"`
   790  	// Values: The values that represent a position, in the order they appear in
   791  	// the order by clause of a query. Can contain fewer values than specified in
   792  	// the order by clause.
   793  	Values []*Value `json:"values,omitempty"`
   794  	// ForceSendFields is a list of field names (e.g. "Before") to unconditionally
   795  	// include in API requests. By default, fields with empty or default values are
   796  	// omitted from API requests. See
   797  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   798  	// details.
   799  	ForceSendFields []string `json:"-"`
   800  	// NullFields is a list of field names (e.g. "Before") to include in API
   801  	// requests with the JSON null value. By default, fields with empty values are
   802  	// omitted from API requests. See
   803  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   804  	NullFields []string `json:"-"`
   805  }
   806  
   807  func (s *Cursor) MarshalJSON() ([]byte, error) {
   808  	type NoMethod Cursor
   809  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   810  }
   811  
   812  // Document: A Firestore document. Must not exceed 1 MiB - 4 bytes.
   813  type Document struct {
   814  	// CreateTime: Output only. The time at which the document was created. This
   815  	// value increases monotonically when a document is deleted then recreated. It
   816  	// can also be compared to values from other documents and the `read_time` of a
   817  	// query.
   818  	CreateTime string `json:"createTime,omitempty"`
   819  	// Fields: The document's fields. The map keys represent field names. Field
   820  	// names matching the regular expression `__.*__` are reserved. Reserved field
   821  	// names are forbidden except in certain documented contexts. The field names,
   822  	// represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field
   823  	// paths may be used in other contexts to refer to structured fields defined
   824  	// here. For `map_value`, the field path is represented by a dot-delimited
   825  	// (`.`) string of segments. Each segment is either a simple field name
   826  	// (defined below) or a quoted field name. For example, the structured field
   827  	// "foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
   828  	// represented by the field path `` foo.`x&y` ``. A simple field name contains
   829  	// only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not
   830  	// start with `0` to `9`. For example, `foo_bar_17`. A quoted field name starts
   831  	// and ends with `` ` `` and may contain any character. Some characters,
   832  	// including `` ` ``, must be escaped using a `\`. For example, `` `x&y` ``
   833  	// represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``.
   834  	Fields map[string]Value `json:"fields,omitempty"`
   835  	// Name: The resource name of the document, for example
   836  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
   837  	Name string `json:"name,omitempty"`
   838  	// UpdateTime: Output only. The time at which the document was last changed.
   839  	// This value is initially set to the `create_time` then increases
   840  	// monotonically with each change to the document. It can also be compared to
   841  	// values from other documents and the `read_time` of a query.
   842  	UpdateTime string `json:"updateTime,omitempty"`
   843  
   844  	// ServerResponse contains the HTTP response code and headers from the server.
   845  	googleapi.ServerResponse `json:"-"`
   846  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   847  	// unconditionally include in API requests. By default, fields with empty or
   848  	// default values are omitted from API requests. See
   849  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   850  	// details.
   851  	ForceSendFields []string `json:"-"`
   852  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   853  	// requests with the JSON null value. By default, fields with empty values are
   854  	// omitted from API requests. See
   855  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   856  	NullFields []string `json:"-"`
   857  }
   858  
   859  func (s *Document) MarshalJSON() ([]byte, error) {
   860  	type NoMethod Document
   861  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   862  }
   863  
   864  // DocumentChange: A Document has changed. May be the result of multiple
   865  // writes, including deletes, that ultimately resulted in a new value for the
   866  // Document. Multiple DocumentChange messages may be returned for the same
   867  // logical change, if multiple targets are affected. For PipelineQueryTargets,
   868  // `document` will be in the new pipeline format, For a Listen stream with both
   869  // QueryTargets and PipelineQueryTargets present, if a document matches both
   870  // types of queries, then a separate DocumentChange messages will be sent out
   871  // one for each set.
   872  type DocumentChange struct {
   873  	// Document: The new state of the Document. If `mask` is set, contains only
   874  	// fields that were updated or added.
   875  	Document *Document `json:"document,omitempty"`
   876  	// RemovedTargetIds: A set of target IDs for targets that no longer match this
   877  	// document.
   878  	RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
   879  	// TargetIds: A set of target IDs of targets that match this document.
   880  	TargetIds []int64 `json:"targetIds,omitempty"`
   881  	// ForceSendFields is a list of field names (e.g. "Document") to
   882  	// unconditionally include in API requests. By default, fields with empty or
   883  	// default values are omitted from API requests. See
   884  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   885  	// details.
   886  	ForceSendFields []string `json:"-"`
   887  	// NullFields is a list of field names (e.g. "Document") to include in API
   888  	// requests with the JSON null value. By default, fields with empty values are
   889  	// omitted from API requests. See
   890  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   891  	NullFields []string `json:"-"`
   892  }
   893  
   894  func (s *DocumentChange) MarshalJSON() ([]byte, error) {
   895  	type NoMethod DocumentChange
   896  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   897  }
   898  
   899  // DocumentDelete: A Document has been deleted. May be the result of multiple
   900  // writes, including updates, the last of which deleted the Document. Multiple
   901  // DocumentDelete messages may be returned for the same logical delete, if
   902  // multiple targets are affected.
   903  type DocumentDelete struct {
   904  	// Document: The resource name of the Document that was deleted.
   905  	Document string `json:"document,omitempty"`
   906  	// ReadTime: The read timestamp at which the delete was observed. Greater or
   907  	// equal to the `commit_time` of the delete.
   908  	ReadTime string `json:"readTime,omitempty"`
   909  	// RemovedTargetIds: A set of target IDs for targets that previously matched
   910  	// this entity.
   911  	RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
   912  	// ForceSendFields is a list of field names (e.g. "Document") to
   913  	// unconditionally include in API requests. By default, fields with empty or
   914  	// default values are omitted from API requests. See
   915  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   916  	// details.
   917  	ForceSendFields []string `json:"-"`
   918  	// NullFields is a list of field names (e.g. "Document") to include in API
   919  	// requests with the JSON null value. By default, fields with empty values are
   920  	// omitted from API requests. See
   921  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   922  	NullFields []string `json:"-"`
   923  }
   924  
   925  func (s *DocumentDelete) MarshalJSON() ([]byte, error) {
   926  	type NoMethod DocumentDelete
   927  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   928  }
   929  
   930  // DocumentMask: A set of field paths on a document. Used to restrict a get or
   931  // update operation on a document to a subset of its fields. This is different
   932  // from standard field masks, as this is always scoped to a Document, and takes
   933  // in account the dynamic nature of Value.
   934  type DocumentMask struct {
   935  	// FieldPaths: The list of field paths in the mask. See Document.fields for a
   936  	// field path syntax reference.
   937  	FieldPaths []string `json:"fieldPaths,omitempty"`
   938  	// ForceSendFields is a list of field names (e.g. "FieldPaths") to
   939  	// unconditionally include in API requests. By default, fields with empty or
   940  	// default values are omitted from API requests. See
   941  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   942  	// details.
   943  	ForceSendFields []string `json:"-"`
   944  	// NullFields is a list of field names (e.g. "FieldPaths") to include in API
   945  	// requests with the JSON null value. By default, fields with empty values are
   946  	// omitted from API requests. See
   947  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   948  	NullFields []string `json:"-"`
   949  }
   950  
   951  func (s *DocumentMask) MarshalJSON() ([]byte, error) {
   952  	type NoMethod DocumentMask
   953  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   954  }
   955  
   956  // DocumentRemove: A Document has been removed from the view of the targets.
   957  // Sent if the document is no longer relevant to a target and is out of view.
   958  // Can be sent instead of a DocumentDelete or a DocumentChange if the server
   959  // can not send the new value of the document. Multiple DocumentRemove messages
   960  // may be returned for the same logical write or delete, if multiple targets
   961  // are affected.
   962  type DocumentRemove struct {
   963  	// Document: The resource name of the Document that has gone out of view.
   964  	Document string `json:"document,omitempty"`
   965  	// ReadTime: The read timestamp at which the remove was observed. Greater or
   966  	// equal to the `commit_time` of the change/delete/remove.
   967  	ReadTime string `json:"readTime,omitempty"`
   968  	// RemovedTargetIds: A set of target IDs for targets that previously matched
   969  	// this document.
   970  	RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
   971  	// ForceSendFields is a list of field names (e.g. "Document") to
   972  	// unconditionally include in API requests. By default, fields with empty or
   973  	// default values are omitted from API requests. See
   974  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   975  	// details.
   976  	ForceSendFields []string `json:"-"`
   977  	// NullFields is a list of field names (e.g. "Document") to include in API
   978  	// requests with the JSON null value. By default, fields with empty values are
   979  	// omitted from API requests. See
   980  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   981  	NullFields []string `json:"-"`
   982  }
   983  
   984  func (s *DocumentRemove) MarshalJSON() ([]byte, error) {
   985  	type NoMethod DocumentRemove
   986  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   987  }
   988  
   989  // DocumentTransform: A transformation of a document.
   990  type DocumentTransform struct {
   991  	// Document: The name of the document to transform.
   992  	Document string `json:"document,omitempty"`
   993  	// FieldTransforms: The list of transformations to apply to the fields of the
   994  	// document, in order. This must not be empty.
   995  	FieldTransforms []*FieldTransform `json:"fieldTransforms,omitempty"`
   996  	// ForceSendFields is a list of field names (e.g. "Document") to
   997  	// unconditionally include in API requests. By default, fields with empty or
   998  	// default values are omitted from API requests. See
   999  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1000  	// details.
  1001  	ForceSendFields []string `json:"-"`
  1002  	// NullFields is a list of field names (e.g. "Document") to include in API
  1003  	// requests with the JSON null value. By default, fields with empty values are
  1004  	// omitted from API requests. See
  1005  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1006  	NullFields []string `json:"-"`
  1007  }
  1008  
  1009  func (s *DocumentTransform) MarshalJSON() ([]byte, error) {
  1010  	type NoMethod DocumentTransform
  1011  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1012  }
  1013  
  1014  // DocumentsTarget: A target specified by a set of documents names.
  1015  type DocumentsTarget struct {
  1016  	// Documents: The names of the documents to retrieve. In the format:
  1017  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  1018  	// The request will fail if any of the document is not a child resource of the
  1019  	// given `database`. Duplicate names will be elided.
  1020  	Documents []string `json:"documents,omitempty"`
  1021  	// ForceSendFields is a list of field names (e.g. "Documents") to
  1022  	// unconditionally include in API requests. By default, fields with empty or
  1023  	// default values are omitted from API requests. See
  1024  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1025  	// details.
  1026  	ForceSendFields []string `json:"-"`
  1027  	// NullFields is a list of field names (e.g. "Documents") to include in API
  1028  	// requests with the JSON null value. By default, fields with empty values are
  1029  	// omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1031  	NullFields []string `json:"-"`
  1032  }
  1033  
  1034  func (s *DocumentsTarget) MarshalJSON() ([]byte, error) {
  1035  	type NoMethod DocumentsTarget
  1036  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1037  }
  1038  
  1039  // Empty: A generic empty message that you can re-use to avoid defining
  1040  // duplicated empty messages in your APIs. A typical example is to use it as
  1041  // the request or the response type of an API method. For instance: service Foo
  1042  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1043  type Empty struct {
  1044  	// ServerResponse contains the HTTP response code and headers from the server.
  1045  	googleapi.ServerResponse `json:"-"`
  1046  }
  1047  
  1048  // ExecutionStats: Execution statistics for the query.
  1049  type ExecutionStats struct {
  1050  	// DebugStats: Debugging statistics from the execution of the query. Note that
  1051  	// the debugging stats are subject to change as Firestore evolves. It could
  1052  	// include: { "indexes_entries_scanned": "1000", "documents_scanned": "20",
  1053  	// "billing_details" : { "documents_billable": "20", "index_entries_billable":
  1054  	// "1000", "min_query_cost": "0" } }
  1055  	DebugStats googleapi.RawMessage `json:"debugStats,omitempty"`
  1056  	// ExecutionDuration: Total time to execute the query in the backend.
  1057  	ExecutionDuration string `json:"executionDuration,omitempty"`
  1058  	// ReadOperations: Total billable read operations.
  1059  	ReadOperations int64 `json:"readOperations,omitempty,string"`
  1060  	// ResultsReturned: Total number of results returned, including documents,
  1061  	// projections, aggregation results, keys.
  1062  	ResultsReturned int64 `json:"resultsReturned,omitempty,string"`
  1063  	// ForceSendFields is a list of field names (e.g. "DebugStats") to
  1064  	// unconditionally include in API requests. By default, fields with empty or
  1065  	// default values are omitted from API requests. See
  1066  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1067  	// details.
  1068  	ForceSendFields []string `json:"-"`
  1069  	// NullFields is a list of field names (e.g. "DebugStats") to include in API
  1070  	// requests with the JSON null value. By default, fields with empty values are
  1071  	// omitted from API requests. See
  1072  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1073  	NullFields []string `json:"-"`
  1074  }
  1075  
  1076  func (s *ExecutionStats) MarshalJSON() ([]byte, error) {
  1077  	type NoMethod ExecutionStats
  1078  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1079  }
  1080  
  1081  // ExistenceFilter: A digest of all the documents that match a given target.
  1082  type ExistenceFilter struct {
  1083  	// Count: The total count of documents that match target_id. If different from
  1084  	// the count of documents in the client that match, the client must manually
  1085  	// determine which documents no longer match the target. The client can use the
  1086  	// `unchanged_names` bloom filter to assist with this determination by testing
  1087  	// ALL the document names against the filter; if the document name is NOT in
  1088  	// the filter, it means the document no longer matches the target.
  1089  	Count int64 `json:"count,omitempty"`
  1090  	// TargetId: The target ID to which this filter applies.
  1091  	TargetId int64 `json:"targetId,omitempty"`
  1092  	// UnchangedNames: A bloom filter that, despite its name, contains the UTF-8
  1093  	// byte encodings of the resource names of ALL the documents that match
  1094  	// target_id, in the form
  1095  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  1096  	// This bloom filter may be omitted at the server's discretion, such as if it
  1097  	// is deemed that the client will not make use of it or if it is too
  1098  	// computationally expensive to calculate or transmit. Clients must gracefully
  1099  	// handle this field being absent by falling back to the logic used before this
  1100  	// field existed; that is, re-add the target without a resume token to figure
  1101  	// out which documents in the client's cache are out of sync.
  1102  	UnchangedNames *BloomFilter `json:"unchangedNames,omitempty"`
  1103  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  1104  	// include in API requests. By default, fields with empty or default values are
  1105  	// omitted from API requests. See
  1106  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1107  	// details.
  1108  	ForceSendFields []string `json:"-"`
  1109  	// NullFields is a list of field names (e.g. "Count") to include in API
  1110  	// requests with the JSON null value. By default, fields with empty values are
  1111  	// omitted from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1113  	NullFields []string `json:"-"`
  1114  }
  1115  
  1116  func (s *ExistenceFilter) MarshalJSON() ([]byte, error) {
  1117  	type NoMethod ExistenceFilter
  1118  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1119  }
  1120  
  1121  // ExplainMetrics: Explain metrics for the query.
  1122  type ExplainMetrics struct {
  1123  	// ExecutionStats: Aggregated stats from the execution of the query. Only
  1124  	// present when ExplainOptions.analyze is set to true.
  1125  	ExecutionStats *ExecutionStats `json:"executionStats,omitempty"`
  1126  	// PlanSummary: Planning phase information for the query.
  1127  	PlanSummary *PlanSummary `json:"planSummary,omitempty"`
  1128  	// ForceSendFields is a list of field names (e.g. "ExecutionStats") to
  1129  	// unconditionally include in API requests. By default, fields with empty or
  1130  	// default values are omitted from API requests. See
  1131  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1132  	// details.
  1133  	ForceSendFields []string `json:"-"`
  1134  	// NullFields is a list of field names (e.g. "ExecutionStats") to include in
  1135  	// API requests with the JSON null value. By default, fields with empty values
  1136  	// are omitted from API requests. See
  1137  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1138  	NullFields []string `json:"-"`
  1139  }
  1140  
  1141  func (s *ExplainMetrics) MarshalJSON() ([]byte, error) {
  1142  	type NoMethod ExplainMetrics
  1143  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1144  }
  1145  
  1146  // ExplainOptions: Explain options for the query.
  1147  type ExplainOptions struct {
  1148  	// Analyze: Optional. Whether to execute this query. When false (the default),
  1149  	// the query will be planned, returning only metrics from the planning stages.
  1150  	// When true, the query will be planned and executed, returning the full query
  1151  	// results along with both planning and execution stage metrics.
  1152  	Analyze bool `json:"analyze,omitempty"`
  1153  	// ForceSendFields is a list of field names (e.g. "Analyze") to unconditionally
  1154  	// include in API requests. By default, fields with empty or default values are
  1155  	// omitted from API requests. See
  1156  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1157  	// details.
  1158  	ForceSendFields []string `json:"-"`
  1159  	// NullFields is a list of field names (e.g. "Analyze") to include in API
  1160  	// requests with the JSON null value. By default, fields with empty values are
  1161  	// omitted from API requests. See
  1162  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1163  	NullFields []string `json:"-"`
  1164  }
  1165  
  1166  func (s *ExplainOptions) MarshalJSON() ([]byte, error) {
  1167  	type NoMethod ExplainOptions
  1168  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1169  }
  1170  
  1171  // FieldFilter: A filter on a specific field.
  1172  type FieldFilter struct {
  1173  	// Field: The field to filter by.
  1174  	Field *FieldReference `json:"field,omitempty"`
  1175  	// Op: The operator to filter by.
  1176  	//
  1177  	// Possible values:
  1178  	//   "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
  1179  	//   "LESS_THAN" - The given `field` is less than the given `value`. Requires:
  1180  	// * That `field` come first in `order_by`.
  1181  	//   "LESS_THAN_OR_EQUAL" - The given `field` is less than or equal to the
  1182  	// given `value`. Requires: * That `field` come first in `order_by`.
  1183  	//   "GREATER_THAN" - The given `field` is greater than the given `value`.
  1184  	// Requires: * That `field` come first in `order_by`.
  1185  	//   "GREATER_THAN_OR_EQUAL" - The given `field` is greater than or equal to
  1186  	// the given `value`. Requires: * That `field` come first in `order_by`.
  1187  	//   "EQUAL" - The given `field` is equal to the given `value`.
  1188  	//   "NOT_EQUAL" - The given `field` is not equal to the given `value`.
  1189  	// Requires: * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
  1190  	// * That `field` comes first in the `order_by`.
  1191  	//   "ARRAY_CONTAINS" - The given `field` is an array that contains the given
  1192  	// `value`.
  1193  	//   "IN" - The given `field` is equal to at least one value in the given
  1194  	// array. Requires: * That `value` is a non-empty `ArrayValue`, subject to
  1195  	// disjunction limits. * No `NOT_IN` filters in the same query.
  1196  	//   "ARRAY_CONTAINS_ANY" - The given `field` is an array that contains any of
  1197  	// the values in the given array. Requires: * That `value` is a non-empty
  1198  	// `ArrayValue`, subject to disjunction limits. * No other `ARRAY_CONTAINS_ANY`
  1199  	// filters within the same disjunction. * No `NOT_IN` filters in the same
  1200  	// query.
  1201  	//   "NOT_IN" - The value of the `field` is not in the given array. Requires: *
  1202  	// That `value` is a non-empty `ArrayValue` with at most 10 values. * No other
  1203  	// `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, `IS_NOT_NULL`, or
  1204  	// `IS_NOT_NAN`. * That `field` comes first in the `order_by`.
  1205  	Op string `json:"op,omitempty"`
  1206  	// Value: The value to compare to.
  1207  	Value *Value `json:"value,omitempty"`
  1208  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
  1209  	// include in API requests. By default, fields with empty or default values are
  1210  	// omitted from API requests. See
  1211  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1212  	// details.
  1213  	ForceSendFields []string `json:"-"`
  1214  	// NullFields is a list of field names (e.g. "Field") to include in API
  1215  	// requests with the JSON null value. By default, fields with empty values are
  1216  	// omitted from API requests. See
  1217  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1218  	NullFields []string `json:"-"`
  1219  }
  1220  
  1221  func (s *FieldFilter) MarshalJSON() ([]byte, error) {
  1222  	type NoMethod FieldFilter
  1223  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1224  }
  1225  
  1226  // FieldReference: A reference to a field in a document, ex:
  1227  // `stats.operations`.
  1228  type FieldReference struct {
  1229  	// FieldPath: A reference to a field in a document. Requires: * MUST be a
  1230  	// dot-delimited (`.`) string of segments, where each segment conforms to
  1231  	// document field name limitations.
  1232  	FieldPath string `json:"fieldPath,omitempty"`
  1233  	// ForceSendFields is a list of field names (e.g. "FieldPath") to
  1234  	// unconditionally include in API requests. By default, fields with empty or
  1235  	// default values are omitted from API requests. See
  1236  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1237  	// details.
  1238  	ForceSendFields []string `json:"-"`
  1239  	// NullFields is a list of field names (e.g. "FieldPath") to include in API
  1240  	// requests with the JSON null value. By default, fields with empty values are
  1241  	// omitted from API requests. See
  1242  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1243  	NullFields []string `json:"-"`
  1244  }
  1245  
  1246  func (s *FieldReference) MarshalJSON() ([]byte, error) {
  1247  	type NoMethod FieldReference
  1248  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1249  }
  1250  
  1251  // FieldTransform: A transformation of a field of the document.
  1252  type FieldTransform struct {
  1253  	// AppendMissingElements: Append the given elements in order if they are not
  1254  	// already present in the current field value. If the field is not an array, or
  1255  	// if the field does not yet exist, it is first set to the empty array.
  1256  	// Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal
  1257  	// when checking if a value is missing. NaN is equal to NaN, and Null is equal
  1258  	// to Null. If the input contains multiple equivalent values, only the first
  1259  	// will be considered. The corresponding transform_result will be the null
  1260  	// value.
  1261  	AppendMissingElements *ArrayValue `json:"appendMissingElements,omitempty"`
  1262  	// FieldPath: The path of the field. See Document.fields for the field path
  1263  	// syntax reference.
  1264  	FieldPath string `json:"fieldPath,omitempty"`
  1265  	// Increment: Adds the given value to the field's current value. This must be
  1266  	// an integer or a double value. If the field is not an integer or double, or
  1267  	// if the field does not yet exist, the transformation will set the field to
  1268  	// the given value. If either of the given value or the current field value are
  1269  	// doubles, both values will be interpreted as doubles. Double arithmetic and
  1270  	// representation of double values follow IEEE 754 semantics. If there is
  1271  	// positive/negative integer overflow, the field is resolved to the largest
  1272  	// magnitude positive/negative integer.
  1273  	Increment *Value `json:"increment,omitempty"`
  1274  	// Maximum: Sets the field to the maximum of its current value and the given
  1275  	// value. This must be an integer or a double value. If the field is not an
  1276  	// integer or double, or if the field does not yet exist, the transformation
  1277  	// will set the field to the given value. If a maximum operation is applied
  1278  	// where the field and the input value are of mixed types (that is - one is an
  1279  	// integer and one is a double) the field takes on the type of the larger
  1280  	// operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not
  1281  	// change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value
  1282  	// and zero input value is always the stored value. The maximum of any numeric
  1283  	// value x and NaN is NaN.
  1284  	Maximum *Value `json:"maximum,omitempty"`
  1285  	// Minimum: Sets the field to the minimum of its current value and the given
  1286  	// value. This must be an integer or a double value. If the field is not an
  1287  	// integer or double, or if the field does not yet exist, the transformation
  1288  	// will set the field to the input value. If a minimum operation is applied
  1289  	// where the field and the input value are of mixed types (that is - one is an
  1290  	// integer and one is a double) the field takes on the type of the smaller
  1291  	// operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not
  1292  	// change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value
  1293  	// and zero input value is always the stored value. The minimum of any numeric
  1294  	// value x and NaN is NaN.
  1295  	Minimum *Value `json:"minimum,omitempty"`
  1296  	// RemoveAllFromArray: Remove all of the given elements from the array in the
  1297  	// field. If the field is not an array, or if the field does not yet exist, it
  1298  	// is set to the empty array. Equivalent numbers of the different types (e.g.
  1299  	// 3L and 3.0) are considered equal when deciding whether an element should be
  1300  	// removed. NaN is equal to NaN, and Null is equal to Null. This will remove
  1301  	// all equivalent values if there are duplicates. The corresponding
  1302  	// transform_result will be the null value.
  1303  	RemoveAllFromArray *ArrayValue `json:"removeAllFromArray,omitempty"`
  1304  	// SetToServerValue: Sets the field to the given server value.
  1305  	//
  1306  	// Possible values:
  1307  	//   "SERVER_VALUE_UNSPECIFIED" - Unspecified. This value must not be used.
  1308  	//   "REQUEST_TIME" - The time at which the server processed the request, with
  1309  	// millisecond precision. If used on multiple fields (same or different
  1310  	// documents) in a transaction, all the fields will get the same server
  1311  	// timestamp.
  1312  	SetToServerValue string `json:"setToServerValue,omitempty"`
  1313  	// ForceSendFields is a list of field names (e.g. "AppendMissingElements") to
  1314  	// unconditionally include in API requests. By default, fields with empty or
  1315  	// default values are omitted from API requests. See
  1316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1317  	// details.
  1318  	ForceSendFields []string `json:"-"`
  1319  	// NullFields is a list of field names (e.g. "AppendMissingElements") to
  1320  	// include in API requests with the JSON null value. By default, fields with
  1321  	// empty values are omitted from API requests. See
  1322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1323  	NullFields []string `json:"-"`
  1324  }
  1325  
  1326  func (s *FieldTransform) MarshalJSON() ([]byte, error) {
  1327  	type NoMethod FieldTransform
  1328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1329  }
  1330  
  1331  // Filter: A filter.
  1332  type Filter struct {
  1333  	// CompositeFilter: A composite filter.
  1334  	CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"`
  1335  	// FieldFilter: A filter on a document field.
  1336  	FieldFilter *FieldFilter `json:"fieldFilter,omitempty"`
  1337  	// UnaryFilter: A filter that takes exactly one argument.
  1338  	UnaryFilter *UnaryFilter `json:"unaryFilter,omitempty"`
  1339  	// ForceSendFields is a list of field names (e.g. "CompositeFilter") to
  1340  	// unconditionally include in API requests. By default, fields with empty or
  1341  	// default values are omitted from API requests. See
  1342  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1343  	// details.
  1344  	ForceSendFields []string `json:"-"`
  1345  	// NullFields is a list of field names (e.g. "CompositeFilter") to include in
  1346  	// API requests with the JSON null value. By default, fields with empty values
  1347  	// are omitted from API requests. See
  1348  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1349  	NullFields []string `json:"-"`
  1350  }
  1351  
  1352  func (s *Filter) MarshalJSON() ([]byte, error) {
  1353  	type NoMethod Filter
  1354  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1355  }
  1356  
  1357  // FindNearest: Nearest Neighbors search config.
  1358  type FindNearest struct {
  1359  	// DistanceMeasure: Required. The distance measure to use, required.
  1360  	//
  1361  	// Possible values:
  1362  	//   "DISTANCE_MEASURE_UNSPECIFIED" - Should not be set.
  1363  	//   "EUCLIDEAN" - Measures the EUCLIDEAN distance between the vectors. See
  1364  	// [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn more
  1365  	//   "COSINE" - Compares vectors based on the angle between them, which allows
  1366  	// you to measure similarity that isn't based on the vectors magnitude. We
  1367  	// recommend using DOT_PRODUCT with unit normalized vectors instead of COSINE
  1368  	// distance, which is mathematically equivalent with better performance. See
  1369  	// [Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to
  1370  	// learn more.
  1371  	//   "DOT_PRODUCT" - Similar to cosine but is affected by the magnitude of the
  1372  	// vectors. See [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to
  1373  	// learn more.
  1374  	DistanceMeasure string `json:"distanceMeasure,omitempty"`
  1375  	// Limit: Required. The number of nearest neighbors to return. Must be a
  1376  	// positive integer of no more than 1000.
  1377  	Limit int64 `json:"limit,omitempty"`
  1378  	// QueryVector: Required. The query vector that we are searching on. Must be a
  1379  	// vector of no more than 2048 dimensions.
  1380  	QueryVector *Value `json:"queryVector,omitempty"`
  1381  	// VectorField: Required. An indexed vector field to search upon. Only
  1382  	// documents which contain vectors whose dimensionality match the query_vector
  1383  	// can be returned.
  1384  	VectorField *FieldReference `json:"vectorField,omitempty"`
  1385  	// ForceSendFields is a list of field names (e.g. "DistanceMeasure") to
  1386  	// unconditionally include in API requests. By default, fields with empty or
  1387  	// default values are omitted from API requests. See
  1388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1389  	// details.
  1390  	ForceSendFields []string `json:"-"`
  1391  	// NullFields is a list of field names (e.g. "DistanceMeasure") to include in
  1392  	// API requests with the JSON null value. By default, fields with empty values
  1393  	// are omitted from API requests. See
  1394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1395  	NullFields []string `json:"-"`
  1396  }
  1397  
  1398  func (s *FindNearest) MarshalJSON() ([]byte, error) {
  1399  	type NoMethod FindNearest
  1400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1401  }
  1402  
  1403  // GoogleFirestoreAdminV1Backup: A Backup of a Cloud Firestore Database. The
  1404  // backup contains all documents and index configurations for the given
  1405  // database at a specific point in time.
  1406  type GoogleFirestoreAdminV1Backup struct {
  1407  	// Database: Output only. Name of the Firestore database that the backup is
  1408  	// from. Format is `projects/{project}/databases/{database}`.
  1409  	Database string `json:"database,omitempty"`
  1410  	// DatabaseUid: Output only. The system-generated UUID4 for the Firestore
  1411  	// database that the backup is from.
  1412  	DatabaseUid string `json:"databaseUid,omitempty"`
  1413  	// ExpireTime: Output only. The timestamp at which this backup expires.
  1414  	ExpireTime string `json:"expireTime,omitempty"`
  1415  	// Name: Output only. The unique resource name of the Backup. Format is
  1416  	// `projects/{project}/locations/{location}/backups/{backup}`.
  1417  	Name string `json:"name,omitempty"`
  1418  	// SnapshotTime: Output only. The backup contains an externally consistent copy
  1419  	// of the database at this time.
  1420  	SnapshotTime string `json:"snapshotTime,omitempty"`
  1421  	// State: Output only. The current state of the backup.
  1422  	//
  1423  	// Possible values:
  1424  	//   "STATE_UNSPECIFIED" - The state is unspecified.
  1425  	//   "CREATING" - The pending backup is still being created. Operations on the
  1426  	// backup will be rejected in this state.
  1427  	//   "READY" - The backup is complete and ready to use.
  1428  	//   "NOT_AVAILABLE" - The backup is not available at this moment.
  1429  	State string `json:"state,omitempty"`
  1430  	// Stats: Output only. Statistics about the backup. This data only becomes
  1431  	// available after the backup is fully materialized to secondary storage. This
  1432  	// field will be empty till then.
  1433  	Stats *GoogleFirestoreAdminV1Stats `json:"stats,omitempty"`
  1434  
  1435  	// ServerResponse contains the HTTP response code and headers from the server.
  1436  	googleapi.ServerResponse `json:"-"`
  1437  	// ForceSendFields is a list of field names (e.g. "Database") to
  1438  	// unconditionally include in API requests. By default, fields with empty or
  1439  	// default values are omitted from API requests. See
  1440  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1441  	// details.
  1442  	ForceSendFields []string `json:"-"`
  1443  	// NullFields is a list of field names (e.g. "Database") to include in API
  1444  	// requests with the JSON null value. By default, fields with empty values are
  1445  	// omitted from API requests. See
  1446  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1447  	NullFields []string `json:"-"`
  1448  }
  1449  
  1450  func (s *GoogleFirestoreAdminV1Backup) MarshalJSON() ([]byte, error) {
  1451  	type NoMethod GoogleFirestoreAdminV1Backup
  1452  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1453  }
  1454  
  1455  // GoogleFirestoreAdminV1BackupSchedule: A backup schedule for a Cloud
  1456  // Firestore Database. This resource is owned by the database it is backing up,
  1457  // and is deleted along with the database. The actual backups are not though.
  1458  type GoogleFirestoreAdminV1BackupSchedule struct {
  1459  	// CreateTime: Output only. The timestamp at which this backup schedule was
  1460  	// created and effective since. No backups will be created for this schedule
  1461  	// before this time.
  1462  	CreateTime string `json:"createTime,omitempty"`
  1463  	// DailyRecurrence: For a schedule that runs daily.
  1464  	DailyRecurrence *GoogleFirestoreAdminV1DailyRecurrence `json:"dailyRecurrence,omitempty"`
  1465  	// Name: Output only. The unique backup schedule identifier across all
  1466  	// locations and databases for the given project. This will be auto-assigned.
  1467  	// Format is
  1468  	// `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
  1469  	Name string `json:"name,omitempty"`
  1470  	// Retention: At what relative time in the future, compared to its creation
  1471  	// time, the backup should be deleted, e.g. keep backups for 7 days.
  1472  	Retention string `json:"retention,omitempty"`
  1473  	// UpdateTime: Output only. The timestamp at which this backup schedule was
  1474  	// most recently updated. When a backup schedule is first created, this is the
  1475  	// same as create_time.
  1476  	UpdateTime string `json:"updateTime,omitempty"`
  1477  	// WeeklyRecurrence: For a schedule that runs weekly on a specific day.
  1478  	WeeklyRecurrence *GoogleFirestoreAdminV1WeeklyRecurrence `json:"weeklyRecurrence,omitempty"`
  1479  
  1480  	// ServerResponse contains the HTTP response code and headers from the server.
  1481  	googleapi.ServerResponse `json:"-"`
  1482  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1483  	// unconditionally include in API requests. By default, fields with empty or
  1484  	// default values are omitted from API requests. See
  1485  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1486  	// details.
  1487  	ForceSendFields []string `json:"-"`
  1488  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1489  	// requests with the JSON null value. By default, fields with empty values are
  1490  	// omitted from API requests. See
  1491  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1492  	NullFields []string `json:"-"`
  1493  }
  1494  
  1495  func (s *GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) {
  1496  	type NoMethod GoogleFirestoreAdminV1BackupSchedule
  1497  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1498  }
  1499  
  1500  // GoogleFirestoreAdminV1CmekConfig: The CMEK (Customer Managed Encryption Key)
  1501  // configuration for a Firestore database. If not present, the database is
  1502  // secured by the default Google encryption key.
  1503  type GoogleFirestoreAdminV1CmekConfig struct {
  1504  	// ActiveKeyVersion: Output only. Currently in-use KMS key versions
  1505  	// (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During
  1506  	// key rotation (https://cloud.google.com/kms/docs/key-rotation), there can be
  1507  	// multiple in-use key versions. The expected format is
  1508  	// `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKey
  1509  	// s/{crypto_key}/cryptoKeyVersions/{key_version}`.
  1510  	ActiveKeyVersion []string `json:"activeKeyVersion,omitempty"`
  1511  	// KmsKeyName: Required. Only keys in the same location as this database are
  1512  	// allowed to be used for encryption. For Firestore's nam5 multi-region, this
  1513  	// corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region,
  1514  	// this corresponds to Cloud KMS multi-region europe. See
  1515  	// https://cloud.google.com/kms/docs/locations. The expected format is
  1516  	// `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKey
  1517  	// s/{crypto_key}`.
  1518  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  1519  	// ForceSendFields is a list of field names (e.g. "ActiveKeyVersion") to
  1520  	// unconditionally include in API requests. By default, fields with empty or
  1521  	// default values are omitted from API requests. See
  1522  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1523  	// details.
  1524  	ForceSendFields []string `json:"-"`
  1525  	// NullFields is a list of field names (e.g. "ActiveKeyVersion") to include in
  1526  	// API requests with the JSON null value. By default, fields with empty values
  1527  	// are omitted from API requests. See
  1528  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1529  	NullFields []string `json:"-"`
  1530  }
  1531  
  1532  func (s *GoogleFirestoreAdminV1CmekConfig) MarshalJSON() ([]byte, error) {
  1533  	type NoMethod GoogleFirestoreAdminV1CmekConfig
  1534  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1535  }
  1536  
  1537  // GoogleFirestoreAdminV1CreateDatabaseMetadata: Metadata related to the create
  1538  // database operation.
  1539  type GoogleFirestoreAdminV1CreateDatabaseMetadata struct {
  1540  }
  1541  
  1542  // GoogleFirestoreAdminV1DailyRecurrence: Represents a recurring schedule that
  1543  // runs every day. The time zone is UTC.
  1544  type GoogleFirestoreAdminV1DailyRecurrence struct {
  1545  }
  1546  
  1547  // GoogleFirestoreAdminV1Database: A Cloud Firestore Database.
  1548  type GoogleFirestoreAdminV1Database struct {
  1549  	// AppEngineIntegrationMode: The App Engine integration mode to use for this
  1550  	// database.
  1551  	//
  1552  	// Possible values:
  1553  	//   "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED" - Not used.
  1554  	//   "ENABLED" - If an App Engine application exists in the same region as this
  1555  	// database, App Engine configuration will impact this database. This includes
  1556  	// disabling of the application & database, as well as disabling writes to the
  1557  	// database.
  1558  	//   "DISABLED" - App Engine has no effect on the ability of this database to
  1559  	// serve requests. This is the default setting for databases created with the
  1560  	// Firestore API.
  1561  	AppEngineIntegrationMode string `json:"appEngineIntegrationMode,omitempty"`
  1562  	// CmekConfig: Optional. Presence indicates CMEK is enabled for this database.
  1563  	CmekConfig *GoogleFirestoreAdminV1CmekConfig `json:"cmekConfig,omitempty"`
  1564  	// ConcurrencyMode: The concurrency control mode to use for this database.
  1565  	//
  1566  	// Possible values:
  1567  	//   "CONCURRENCY_MODE_UNSPECIFIED" - Not used.
  1568  	//   "OPTIMISTIC" - Use optimistic concurrency control by default. This mode is
  1569  	// available for Cloud Firestore databases.
  1570  	//   "PESSIMISTIC" - Use pessimistic concurrency control by default. This mode
  1571  	// is available for Cloud Firestore databases. This is the default setting for
  1572  	// Cloud Firestore.
  1573  	//   "OPTIMISTIC_WITH_ENTITY_GROUPS" - Use optimistic concurrency control with
  1574  	// entity groups by default. This is the only available mode for Cloud
  1575  	// Datastore. This mode is also available for Cloud Firestore with Datastore
  1576  	// Mode but is not recommended.
  1577  	ConcurrencyMode string `json:"concurrencyMode,omitempty"`
  1578  	// CreateTime: Output only. The timestamp at which this database was created.
  1579  	// Databases created before 2016 do not populate create_time.
  1580  	CreateTime string `json:"createTime,omitempty"`
  1581  	// DeleteProtectionState: State of delete protection for the database.
  1582  	//
  1583  	// Possible values:
  1584  	//   "DELETE_PROTECTION_STATE_UNSPECIFIED" - The default value. Delete
  1585  	// protection type is not specified
  1586  	//   "DELETE_PROTECTION_DISABLED" - Delete protection is disabled
  1587  	//   "DELETE_PROTECTION_ENABLED" - Delete protection is enabled
  1588  	DeleteProtectionState string `json:"deleteProtectionState,omitempty"`
  1589  	// DeleteTime: Output only. The timestamp at which this database was soft
  1590  	// deleted. Only set if the database has been soft deleted.
  1591  	DeleteTime string `json:"deleteTime,omitempty"`
  1592  	// EarliestVersionTime: Output only. The earliest timestamp at which older
  1593  	// versions of the data can be read from the database. See
  1594  	// [version_retention_period] above; this field is populated with `now -
  1595  	// version_retention_period`. This value is continuously updated, and becomes
  1596  	// stale the moment it is queried. If you are using this value to recover data,
  1597  	// make sure to account for the time from the moment when the value is queried
  1598  	// to the moment when you initiate the recovery.
  1599  	EarliestVersionTime string `json:"earliestVersionTime,omitempty"`
  1600  	// Etag: This checksum is computed by the server based on the value of other
  1601  	// fields, and may be sent on update and delete requests to ensure the client
  1602  	// has an up-to-date value before proceeding.
  1603  	Etag string `json:"etag,omitempty"`
  1604  	// KeyPrefix: Output only. The key_prefix for this database. This key_prefix is
  1605  	// used, in combination with the project id ("~") to construct the application
  1606  	// id that is returned from the Cloud Datastore APIs in Google App Engine first
  1607  	// generation runtimes. This value may be empty in which case the appid to use
  1608  	// for URL-encoded keys is the project_id (eg: foo instead of v~foo).
  1609  	KeyPrefix string `json:"keyPrefix,omitempty"`
  1610  	// LocationId: The location of the database. Available locations are listed at
  1611  	// https://cloud.google.com/firestore/docs/locations.
  1612  	LocationId string `json:"locationId,omitempty"`
  1613  	// Name: The resource name of the Database. Format:
  1614  	// `projects/{project}/databases/{database}`
  1615  	Name string `json:"name,omitempty"`
  1616  	// PointInTimeRecoveryEnablement: Whether to enable the PITR feature on this
  1617  	// database.
  1618  	//
  1619  	// Possible values:
  1620  	//   "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED" - Not used.
  1621  	//   "POINT_IN_TIME_RECOVERY_ENABLED" - Reads are supported on selected
  1622  	// versions of the data from within the past 7 days: * Reads against any
  1623  	// timestamp within the past hour * Reads against 1-minute snapshots beyond 1
  1624  	// hour and within 7 days `version_retention_period` and
  1625  	// `earliest_version_time` can be used to determine the supported versions.
  1626  	//   "POINT_IN_TIME_RECOVERY_DISABLED" - Reads are supported on any version of
  1627  	// the data from within the past 1 hour.
  1628  	PointInTimeRecoveryEnablement string `json:"pointInTimeRecoveryEnablement,omitempty"`
  1629  	// Type: The type of the database. See
  1630  	// https://cloud.google.com/datastore/docs/firestore-or-datastore for
  1631  	// information about how to choose.
  1632  	//
  1633  	// Possible values:
  1634  	//   "DATABASE_TYPE_UNSPECIFIED" - The default value. This value is used if the
  1635  	// database type is omitted.
  1636  	//   "FIRESTORE_NATIVE" - Firestore Native Mode
  1637  	//   "DATASTORE_MODE" - Firestore in Datastore Mode.
  1638  	Type string `json:"type,omitempty"`
  1639  	// Uid: Output only. The system-generated UUID4 for this Database.
  1640  	Uid string `json:"uid,omitempty"`
  1641  	// UpdateTime: Output only. The timestamp at which this database was most
  1642  	// recently updated. Note this only includes updates to the database resource
  1643  	// and not data contained by the database.
  1644  	UpdateTime string `json:"updateTime,omitempty"`
  1645  	// VersionRetentionPeriod: Output only. The period during which past versions
  1646  	// of data are retained in the database. Any read or query can specify a
  1647  	// `read_time` within this window, and will read the state of the database at
  1648  	// that time. If the PITR feature is enabled, the retention period is 7 days.
  1649  	// Otherwise, the retention period is 1 hour.
  1650  	VersionRetentionPeriod string `json:"versionRetentionPeriod,omitempty"`
  1651  
  1652  	// ServerResponse contains the HTTP response code and headers from the server.
  1653  	googleapi.ServerResponse `json:"-"`
  1654  	// ForceSendFields is a list of field names (e.g. "AppEngineIntegrationMode")
  1655  	// to unconditionally include in API requests. By default, fields with empty or
  1656  	// default values are omitted from API requests. See
  1657  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1658  	// details.
  1659  	ForceSendFields []string `json:"-"`
  1660  	// NullFields is a list of field names (e.g. "AppEngineIntegrationMode") to
  1661  	// include in API requests with the JSON null value. By default, fields with
  1662  	// empty values are omitted from API requests. See
  1663  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1664  	NullFields []string `json:"-"`
  1665  }
  1666  
  1667  func (s *GoogleFirestoreAdminV1Database) MarshalJSON() ([]byte, error) {
  1668  	type NoMethod GoogleFirestoreAdminV1Database
  1669  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1670  }
  1671  
  1672  // GoogleFirestoreAdminV1DatabaseSnapshot: A consistent snapshot of a database
  1673  // at a specific point in time.
  1674  type GoogleFirestoreAdminV1DatabaseSnapshot struct {
  1675  	// Database: Required. A name of the form
  1676  	// `projects/{project_id}/databases/{database_id}`
  1677  	Database string `json:"database,omitempty"`
  1678  	// SnapshotTime: Required. The timestamp at which the database snapshot is
  1679  	// taken. The requested timestamp must be a whole minute within the PITR
  1680  	// window.
  1681  	SnapshotTime string `json:"snapshotTime,omitempty"`
  1682  	// ForceSendFields is a list of field names (e.g. "Database") to
  1683  	// unconditionally include in API requests. By default, fields with empty or
  1684  	// default values are omitted from API requests. See
  1685  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1686  	// details.
  1687  	ForceSendFields []string `json:"-"`
  1688  	// NullFields is a list of field names (e.g. "Database") to include in API
  1689  	// requests with the JSON null value. By default, fields with empty values are
  1690  	// omitted from API requests. See
  1691  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1692  	NullFields []string `json:"-"`
  1693  }
  1694  
  1695  func (s *GoogleFirestoreAdminV1DatabaseSnapshot) MarshalJSON() ([]byte, error) {
  1696  	type NoMethod GoogleFirestoreAdminV1DatabaseSnapshot
  1697  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1698  }
  1699  
  1700  // GoogleFirestoreAdminV1DeleteDatabaseMetadata: Metadata related to the delete
  1701  // database operation.
  1702  type GoogleFirestoreAdminV1DeleteDatabaseMetadata struct {
  1703  }
  1704  
  1705  // GoogleFirestoreAdminV1ExportDocumentsMetadata: Metadata for
  1706  // google.longrunning.Operation results from FirestoreAdmin.ExportDocuments.
  1707  type GoogleFirestoreAdminV1ExportDocumentsMetadata struct {
  1708  	// CollectionIds: Which collection ids are being exported.
  1709  	CollectionIds []string `json:"collectionIds,omitempty"`
  1710  	// EndTime: The time this operation completed. Will be unset if operation still
  1711  	// in progress.
  1712  	EndTime string `json:"endTime,omitempty"`
  1713  	// NamespaceIds: Which namespace ids are being exported.
  1714  	NamespaceIds []string `json:"namespaceIds,omitempty"`
  1715  	// OperationState: The state of the export operation.
  1716  	//
  1717  	// Possible values:
  1718  	//   "OPERATION_STATE_UNSPECIFIED" - Unspecified.
  1719  	//   "INITIALIZING" - Request is being prepared for processing.
  1720  	//   "PROCESSING" - Request is actively being processed.
  1721  	//   "CANCELLING" - Request is in the process of being cancelled after user
  1722  	// called google.longrunning.Operations.CancelOperation on the operation.
  1723  	//   "FINALIZING" - Request has been processed and is in its finalization
  1724  	// stage.
  1725  	//   "SUCCESSFUL" - Request has completed successfully.
  1726  	//   "FAILED" - Request has finished being processed, but encountered an error.
  1727  	//   "CANCELLED" - Request has finished being cancelled after user called
  1728  	// google.longrunning.Operations.CancelOperation.
  1729  	OperationState string `json:"operationState,omitempty"`
  1730  	// OutputUriPrefix: Where the documents are being exported to.
  1731  	OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
  1732  	// ProgressBytes: The progress, in bytes, of this operation.
  1733  	ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
  1734  	// ProgressDocuments: The progress, in documents, of this operation.
  1735  	ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
  1736  	// SnapshotTime: The timestamp that corresponds to the version of the database
  1737  	// that is being exported. If unspecified, there are no guarantees about the
  1738  	// consistency of the documents being exported.
  1739  	SnapshotTime string `json:"snapshotTime,omitempty"`
  1740  	// StartTime: The time this operation started.
  1741  	StartTime string `json:"startTime,omitempty"`
  1742  	// ForceSendFields is a list of field names (e.g. "CollectionIds") to
  1743  	// unconditionally include in API requests. By default, fields with empty or
  1744  	// default values are omitted from API requests. See
  1745  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1746  	// details.
  1747  	ForceSendFields []string `json:"-"`
  1748  	// NullFields is a list of field names (e.g. "CollectionIds") to include in API
  1749  	// requests with the JSON null value. By default, fields with empty values are
  1750  	// omitted from API requests. See
  1751  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1752  	NullFields []string `json:"-"`
  1753  }
  1754  
  1755  func (s *GoogleFirestoreAdminV1ExportDocumentsMetadata) MarshalJSON() ([]byte, error) {
  1756  	type NoMethod GoogleFirestoreAdminV1ExportDocumentsMetadata
  1757  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1758  }
  1759  
  1760  // GoogleFirestoreAdminV1ExportDocumentsRequest: The request for
  1761  // FirestoreAdmin.ExportDocuments.
  1762  type GoogleFirestoreAdminV1ExportDocumentsRequest struct {
  1763  	// CollectionIds: Which collection ids to export. Unspecified means all
  1764  	// collections.
  1765  	CollectionIds []string `json:"collectionIds,omitempty"`
  1766  	// NamespaceIds: An empty list represents all namespaces. This is the preferred
  1767  	// usage for databases that don't use namespaces. An empty string element
  1768  	// represents the default namespace. This should be used if the database has
  1769  	// data in non-default namespaces, but doesn't want to include them. Each
  1770  	// namespace in this list must be unique.
  1771  	NamespaceIds []string `json:"namespaceIds,omitempty"`
  1772  	// OutputUriPrefix: The output URI. Currently only supports Google Cloud
  1773  	// Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where
  1774  	// `BUCKET_NAME` is the name of the Google Cloud Storage bucket and
  1775  	// `NAMESPACE_PATH` is an optional Google Cloud Storage namespace path. When
  1776  	// choosing a name, be sure to consider Google Cloud Storage naming guidelines:
  1777  	// https://cloud.google.com/storage/docs/naming. If the URI is a bucket
  1778  	// (without a namespace path), a prefix will be generated based on the start
  1779  	// time.
  1780  	OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
  1781  	// SnapshotTime: The timestamp that corresponds to the version of the database
  1782  	// to be exported. The timestamp must be in the past, rounded to the minute and
  1783  	// not older than earliestVersionTime. If specified, then the exported
  1784  	// documents will represent a consistent view of the database at the provided
  1785  	// time. Otherwise, there are no guarantees about the consistency of the
  1786  	// exported documents.
  1787  	SnapshotTime string `json:"snapshotTime,omitempty"`
  1788  	// ForceSendFields is a list of field names (e.g. "CollectionIds") to
  1789  	// unconditionally include in API requests. By default, fields with empty or
  1790  	// default values are omitted from API requests. See
  1791  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1792  	// details.
  1793  	ForceSendFields []string `json:"-"`
  1794  	// NullFields is a list of field names (e.g. "CollectionIds") to include in API
  1795  	// requests with the JSON null value. By default, fields with empty values are
  1796  	// omitted from API requests. See
  1797  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1798  	NullFields []string `json:"-"`
  1799  }
  1800  
  1801  func (s *GoogleFirestoreAdminV1ExportDocumentsRequest) MarshalJSON() ([]byte, error) {
  1802  	type NoMethod GoogleFirestoreAdminV1ExportDocumentsRequest
  1803  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1804  }
  1805  
  1806  // GoogleFirestoreAdminV1ExportDocumentsResponse: Returned in the
  1807  // google.longrunning.Operation response field.
  1808  type GoogleFirestoreAdminV1ExportDocumentsResponse struct {
  1809  	// OutputUriPrefix: Location of the output files. This can be used to begin an
  1810  	// import into Cloud Firestore (this project or another project) after the
  1811  	// operation completes successfully.
  1812  	OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
  1813  	// ForceSendFields is a list of field names (e.g. "OutputUriPrefix") to
  1814  	// unconditionally include in API requests. By default, fields with empty or
  1815  	// default values are omitted from API requests. See
  1816  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1817  	// details.
  1818  	ForceSendFields []string `json:"-"`
  1819  	// NullFields is a list of field names (e.g. "OutputUriPrefix") to include in
  1820  	// API requests with the JSON null value. By default, fields with empty values
  1821  	// are omitted from API requests. See
  1822  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1823  	NullFields []string `json:"-"`
  1824  }
  1825  
  1826  func (s *GoogleFirestoreAdminV1ExportDocumentsResponse) MarshalJSON() ([]byte, error) {
  1827  	type NoMethod GoogleFirestoreAdminV1ExportDocumentsResponse
  1828  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1829  }
  1830  
  1831  // GoogleFirestoreAdminV1Field: Represents a single field in the database.
  1832  // Fields are grouped by their "Collection Group", which represent all
  1833  // collections in the database with the same id.
  1834  type GoogleFirestoreAdminV1Field struct {
  1835  	// IndexConfig: The index configuration for this field. If unset, field
  1836  	// indexing will revert to the configuration defined by the `ancestor_field`.
  1837  	// To explicitly remove all indexes for this field, specify an index config
  1838  	// with an empty list of indexes.
  1839  	IndexConfig *GoogleFirestoreAdminV1IndexConfig `json:"indexConfig,omitempty"`
  1840  	// Name: Required. A field name of the form
  1841  	// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_i
  1842  	// d}/fields/{field_path}` A field path may be a simple field name, e.g.
  1843  	// `address` or a path to fields within map_value , e.g. `address.city`, or a
  1844  	// special field path. The only valid special field is `*`, which represents
  1845  	// any field. Field paths may be quoted using ` (backtick). The only character
  1846  	// that needs to be escaped within a quoted field path is the backtick
  1847  	// character itself, escaped using a backslash. Special characters in field
  1848  	// paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as
  1849  	// well as any ascii symbolic characters. Examples: (Note: Comments here are
  1850  	// written in markdown syntax, so there is an additional layer of backticks to
  1851  	// represent a code block) `\`address.city\`` represents a field named
  1852  	// `address.city`, not the map key `city` in the field `address`. `\`*\``
  1853  	// represents a field named `*`, not any field. A special `Field` contains the
  1854  	// default indexing settings for all fields. This field's resource name is:
  1855  	// `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/f
  1856  	// ields/*` Indexes defined on this `Field` will be applied to all fields which
  1857  	// do not have their own `Field` index configuration.
  1858  	Name string `json:"name,omitempty"`
  1859  	// TtlConfig: The TTL configuration for this `Field`. Setting or unsetting this
  1860  	// will enable or disable the TTL for documents that have this `Field`.
  1861  	TtlConfig *GoogleFirestoreAdminV1TtlConfig `json:"ttlConfig,omitempty"`
  1862  
  1863  	// ServerResponse contains the HTTP response code and headers from the server.
  1864  	googleapi.ServerResponse `json:"-"`
  1865  	// ForceSendFields is a list of field names (e.g. "IndexConfig") to
  1866  	// unconditionally include in API requests. By default, fields with empty or
  1867  	// default values are omitted from API requests. See
  1868  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1869  	// details.
  1870  	ForceSendFields []string `json:"-"`
  1871  	// NullFields is a list of field names (e.g. "IndexConfig") to include in API
  1872  	// requests with the JSON null value. By default, fields with empty values are
  1873  	// omitted from API requests. See
  1874  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1875  	NullFields []string `json:"-"`
  1876  }
  1877  
  1878  func (s *GoogleFirestoreAdminV1Field) MarshalJSON() ([]byte, error) {
  1879  	type NoMethod GoogleFirestoreAdminV1Field
  1880  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1881  }
  1882  
  1883  // GoogleFirestoreAdminV1FieldOperationMetadata: Metadata for
  1884  // google.longrunning.Operation results from FirestoreAdmin.UpdateField.
  1885  type GoogleFirestoreAdminV1FieldOperationMetadata struct {
  1886  	// EndTime: The time this operation completed. Will be unset if operation still
  1887  	// in progress.
  1888  	EndTime string `json:"endTime,omitempty"`
  1889  	// Field: The field resource that this operation is acting on. For example:
  1890  	// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_i
  1891  	// d}/fields/{field_path}`
  1892  	Field string `json:"field,omitempty"`
  1893  	// IndexConfigDeltas: A list of IndexConfigDelta, which describe the intent of
  1894  	// this operation.
  1895  	IndexConfigDeltas []*GoogleFirestoreAdminV1IndexConfigDelta `json:"indexConfigDeltas,omitempty"`
  1896  	// ProgressBytes: The progress, in bytes, of this operation.
  1897  	ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
  1898  	// ProgressDocuments: The progress, in documents, of this operation.
  1899  	ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
  1900  	// StartTime: The time this operation started.
  1901  	StartTime string `json:"startTime,omitempty"`
  1902  	// State: The state of the operation.
  1903  	//
  1904  	// Possible values:
  1905  	//   "OPERATION_STATE_UNSPECIFIED" - Unspecified.
  1906  	//   "INITIALIZING" - Request is being prepared for processing.
  1907  	//   "PROCESSING" - Request is actively being processed.
  1908  	//   "CANCELLING" - Request is in the process of being cancelled after user
  1909  	// called google.longrunning.Operations.CancelOperation on the operation.
  1910  	//   "FINALIZING" - Request has been processed and is in its finalization
  1911  	// stage.
  1912  	//   "SUCCESSFUL" - Request has completed successfully.
  1913  	//   "FAILED" - Request has finished being processed, but encountered an error.
  1914  	//   "CANCELLED" - Request has finished being cancelled after user called
  1915  	// google.longrunning.Operations.CancelOperation.
  1916  	State string `json:"state,omitempty"`
  1917  	// TtlConfigDelta: Describes the deltas of TTL configuration.
  1918  	TtlConfigDelta *GoogleFirestoreAdminV1TtlConfigDelta `json:"ttlConfigDelta,omitempty"`
  1919  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1920  	// include in API requests. By default, fields with empty or default values are
  1921  	// omitted from API requests. See
  1922  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1923  	// details.
  1924  	ForceSendFields []string `json:"-"`
  1925  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1926  	// requests with the JSON null value. By default, fields with empty values are
  1927  	// omitted from API requests. See
  1928  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1929  	NullFields []string `json:"-"`
  1930  }
  1931  
  1932  func (s *GoogleFirestoreAdminV1FieldOperationMetadata) MarshalJSON() ([]byte, error) {
  1933  	type NoMethod GoogleFirestoreAdminV1FieldOperationMetadata
  1934  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1935  }
  1936  
  1937  // GoogleFirestoreAdminV1FlatIndex: An index that stores vectors in a flat data
  1938  // structure, and supports exhaustive search.
  1939  type GoogleFirestoreAdminV1FlatIndex struct {
  1940  }
  1941  
  1942  // GoogleFirestoreAdminV1ImportDocumentsMetadata: Metadata for
  1943  // google.longrunning.Operation results from FirestoreAdmin.ImportDocuments.
  1944  type GoogleFirestoreAdminV1ImportDocumentsMetadata struct {
  1945  	// CollectionIds: Which collection ids are being imported.
  1946  	CollectionIds []string `json:"collectionIds,omitempty"`
  1947  	// EndTime: The time this operation completed. Will be unset if operation still
  1948  	// in progress.
  1949  	EndTime string `json:"endTime,omitempty"`
  1950  	// InputUriPrefix: The location of the documents being imported.
  1951  	InputUriPrefix string `json:"inputUriPrefix,omitempty"`
  1952  	// NamespaceIds: Which namespace ids are being imported.
  1953  	NamespaceIds []string `json:"namespaceIds,omitempty"`
  1954  	// OperationState: The state of the import operation.
  1955  	//
  1956  	// Possible values:
  1957  	//   "OPERATION_STATE_UNSPECIFIED" - Unspecified.
  1958  	//   "INITIALIZING" - Request is being prepared for processing.
  1959  	//   "PROCESSING" - Request is actively being processed.
  1960  	//   "CANCELLING" - Request is in the process of being cancelled after user
  1961  	// called google.longrunning.Operations.CancelOperation on the operation.
  1962  	//   "FINALIZING" - Request has been processed and is in its finalization
  1963  	// stage.
  1964  	//   "SUCCESSFUL" - Request has completed successfully.
  1965  	//   "FAILED" - Request has finished being processed, but encountered an error.
  1966  	//   "CANCELLED" - Request has finished being cancelled after user called
  1967  	// google.longrunning.Operations.CancelOperation.
  1968  	OperationState string `json:"operationState,omitempty"`
  1969  	// ProgressBytes: The progress, in bytes, of this operation.
  1970  	ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
  1971  	// ProgressDocuments: The progress, in documents, of this operation.
  1972  	ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
  1973  	// StartTime: The time this operation started.
  1974  	StartTime string `json:"startTime,omitempty"`
  1975  	// ForceSendFields is a list of field names (e.g. "CollectionIds") to
  1976  	// unconditionally include in API requests. By default, fields with empty or
  1977  	// default values are omitted from API requests. See
  1978  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1979  	// details.
  1980  	ForceSendFields []string `json:"-"`
  1981  	// NullFields is a list of field names (e.g. "CollectionIds") to include in API
  1982  	// requests with the JSON null value. By default, fields with empty values are
  1983  	// omitted from API requests. See
  1984  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1985  	NullFields []string `json:"-"`
  1986  }
  1987  
  1988  func (s *GoogleFirestoreAdminV1ImportDocumentsMetadata) MarshalJSON() ([]byte, error) {
  1989  	type NoMethod GoogleFirestoreAdminV1ImportDocumentsMetadata
  1990  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1991  }
  1992  
  1993  // GoogleFirestoreAdminV1ImportDocumentsRequest: The request for
  1994  // FirestoreAdmin.ImportDocuments.
  1995  type GoogleFirestoreAdminV1ImportDocumentsRequest struct {
  1996  	// CollectionIds: Which collection ids to import. Unspecified means all
  1997  	// collections included in the import.
  1998  	CollectionIds []string `json:"collectionIds,omitempty"`
  1999  	// InputUriPrefix: Location of the exported files. This must match the
  2000  	// output_uri_prefix of an ExportDocumentsResponse from an export that has
  2001  	// completed successfully. See:
  2002  	// google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix.
  2003  	InputUriPrefix string `json:"inputUriPrefix,omitempty"`
  2004  	// NamespaceIds: An empty list represents all namespaces. This is the preferred
  2005  	// usage for databases that don't use namespaces. An empty string element
  2006  	// represents the default namespace. This should be used if the database has
  2007  	// data in non-default namespaces, but doesn't want to include them. Each
  2008  	// namespace in this list must be unique.
  2009  	NamespaceIds []string `json:"namespaceIds,omitempty"`
  2010  	// ForceSendFields is a list of field names (e.g. "CollectionIds") to
  2011  	// unconditionally include in API requests. By default, fields with empty or
  2012  	// default values are omitted from API requests. See
  2013  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2014  	// details.
  2015  	ForceSendFields []string `json:"-"`
  2016  	// NullFields is a list of field names (e.g. "CollectionIds") to include in API
  2017  	// requests with the JSON null value. By default, fields with empty values are
  2018  	// omitted from API requests. See
  2019  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2020  	NullFields []string `json:"-"`
  2021  }
  2022  
  2023  func (s *GoogleFirestoreAdminV1ImportDocumentsRequest) MarshalJSON() ([]byte, error) {
  2024  	type NoMethod GoogleFirestoreAdminV1ImportDocumentsRequest
  2025  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2026  }
  2027  
  2028  // GoogleFirestoreAdminV1Index: Cloud Firestore indexes enable simple and
  2029  // complex queries against documents in a database.
  2030  type GoogleFirestoreAdminV1Index struct {
  2031  	// ApiScope: The API scope supported by this index.
  2032  	//
  2033  	// Possible values:
  2034  	//   "ANY_API" - The index can only be used by the Firestore Native query API.
  2035  	// This is the default.
  2036  	//   "DATASTORE_MODE_API" - The index can only be used by the Firestore in
  2037  	// Datastore Mode query API.
  2038  	ApiScope string `json:"apiScope,omitempty"`
  2039  	// Fields: The fields supported by this index. For composite indexes, this
  2040  	// requires a minimum of 2 and a maximum of 100 fields. The last field entry is
  2041  	// always for the field path `__name__`. If, on creation, `__name__` was not
  2042  	// specified as the last field, it will be added automatically with the same
  2043  	// direction as that of the last field defined. If the final field in a
  2044  	// composite index is not directional, the `__name__` will be ordered ASCENDING
  2045  	// (unless explicitly specified). For single field indexes, this will always be
  2046  	// exactly one entry with a field path equal to the field path of the
  2047  	// associated field.
  2048  	Fields []*GoogleFirestoreAdminV1IndexField `json:"fields,omitempty"`
  2049  	// Name: Output only. A server defined name for this index. The form of this
  2050  	// name for composite indexes will be:
  2051  	// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_i
  2052  	// d}/indexes/{composite_index_id}` For single field indexes, this field will
  2053  	// be empty.
  2054  	Name string `json:"name,omitempty"`
  2055  	// QueryScope: Indexes with a collection query scope specified allow queries
  2056  	// against a collection that is the child of a specific document, specified at
  2057  	// query time, and that has the same collection id. Indexes with a collection
  2058  	// group query scope specified allow queries against all collections descended
  2059  	// from a specific document, specified at query time, and that have the same
  2060  	// collection id as this index.
  2061  	//
  2062  	// Possible values:
  2063  	//   "QUERY_SCOPE_UNSPECIFIED" - The query scope is unspecified. Not a valid
  2064  	// option.
  2065  	//   "COLLECTION" - Indexes with a collection query scope specified allow
  2066  	// queries against a collection that is the child of a specific document,
  2067  	// specified at query time, and that has the collection id specified by the
  2068  	// index.
  2069  	//   "COLLECTION_GROUP" - Indexes with a collection group query scope specified
  2070  	// allow queries against all collections that has the collection id specified
  2071  	// by the index.
  2072  	//   "COLLECTION_RECURSIVE" - Include all the collections's ancestor in the
  2073  	// index. Only available for Datastore Mode databases.
  2074  	QueryScope string `json:"queryScope,omitempty"`
  2075  	// State: Output only. The serving state of the index.
  2076  	//
  2077  	// Possible values:
  2078  	//   "STATE_UNSPECIFIED" - The state is unspecified.
  2079  	//   "CREATING" - The index is being created. There is an active long-running
  2080  	// operation for the index. The index is updated when writing a document. Some
  2081  	// index data may exist.
  2082  	//   "READY" - The index is ready to be used. The index is updated when writing
  2083  	// a document. The index is fully populated from all stored documents it
  2084  	// applies to.
  2085  	//   "NEEDS_REPAIR" - The index was being created, but something went wrong.
  2086  	// There is no active long-running operation for the index, and the most
  2087  	// recently finished long-running operation failed. The index is not updated
  2088  	// when writing a document. Some index data may exist. Use the
  2089  	// google.longrunning.Operations API to determine why the operation that last
  2090  	// attempted to create this index failed, then re-create the index.
  2091  	State string `json:"state,omitempty"`
  2092  
  2093  	// ServerResponse contains the HTTP response code and headers from the server.
  2094  	googleapi.ServerResponse `json:"-"`
  2095  	// ForceSendFields is a list of field names (e.g. "ApiScope") to
  2096  	// unconditionally include in API requests. By default, fields with empty or
  2097  	// default values are omitted from API requests. See
  2098  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2099  	// details.
  2100  	ForceSendFields []string `json:"-"`
  2101  	// NullFields is a list of field names (e.g. "ApiScope") to include in API
  2102  	// requests with the JSON null value. By default, fields with empty values are
  2103  	// omitted from API requests. See
  2104  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2105  	NullFields []string `json:"-"`
  2106  }
  2107  
  2108  func (s *GoogleFirestoreAdminV1Index) MarshalJSON() ([]byte, error) {
  2109  	type NoMethod GoogleFirestoreAdminV1Index
  2110  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2111  }
  2112  
  2113  // GoogleFirestoreAdminV1IndexConfig: The index configuration for this field.
  2114  type GoogleFirestoreAdminV1IndexConfig struct {
  2115  	// AncestorField: Output only. Specifies the resource name of the `Field` from
  2116  	// which this field's index configuration is set (when `uses_ancestor_config`
  2117  	// is true), or from which it *would* be set if this field had no index
  2118  	// configuration (when `uses_ancestor_config` is false).
  2119  	AncestorField string `json:"ancestorField,omitempty"`
  2120  	// Indexes: The indexes supported for this field.
  2121  	Indexes []*GoogleFirestoreAdminV1Index `json:"indexes,omitempty"`
  2122  	// Reverting: Output only When true, the `Field`'s index configuration is in
  2123  	// the process of being reverted. Once complete, the index config will
  2124  	// transition to the same state as the field specified by `ancestor_field`, at
  2125  	// which point `uses_ancestor_config` will be `true` and `reverting` will be
  2126  	// `false`.
  2127  	Reverting bool `json:"reverting,omitempty"`
  2128  	// UsesAncestorConfig: Output only. When true, the `Field`'s index
  2129  	// configuration is set from the configuration specified by the
  2130  	// `ancestor_field`. When false, the `Field`'s index configuration is defined
  2131  	// explicitly.
  2132  	UsesAncestorConfig bool `json:"usesAncestorConfig,omitempty"`
  2133  	// ForceSendFields is a list of field names (e.g. "AncestorField") to
  2134  	// unconditionally include in API requests. By default, fields with empty or
  2135  	// default values are omitted from API requests. See
  2136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2137  	// details.
  2138  	ForceSendFields []string `json:"-"`
  2139  	// NullFields is a list of field names (e.g. "AncestorField") to include in API
  2140  	// requests with the JSON null value. By default, fields with empty values are
  2141  	// omitted from API requests. See
  2142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2143  	NullFields []string `json:"-"`
  2144  }
  2145  
  2146  func (s *GoogleFirestoreAdminV1IndexConfig) MarshalJSON() ([]byte, error) {
  2147  	type NoMethod GoogleFirestoreAdminV1IndexConfig
  2148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2149  }
  2150  
  2151  // GoogleFirestoreAdminV1IndexConfigDelta: Information about an index
  2152  // configuration change.
  2153  type GoogleFirestoreAdminV1IndexConfigDelta struct {
  2154  	// ChangeType: Specifies how the index is changing.
  2155  	//
  2156  	// Possible values:
  2157  	//   "CHANGE_TYPE_UNSPECIFIED" - The type of change is not specified or known.
  2158  	//   "ADD" - The single field index is being added.
  2159  	//   "REMOVE" - The single field index is being removed.
  2160  	ChangeType string `json:"changeType,omitempty"`
  2161  	// Index: The index being changed.
  2162  	Index *GoogleFirestoreAdminV1Index `json:"index,omitempty"`
  2163  	// ForceSendFields is a list of field names (e.g. "ChangeType") to
  2164  	// unconditionally include in API requests. By default, fields with empty or
  2165  	// default values are omitted from API requests. See
  2166  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2167  	// details.
  2168  	ForceSendFields []string `json:"-"`
  2169  	// NullFields is a list of field names (e.g. "ChangeType") to include in API
  2170  	// requests with the JSON null value. By default, fields with empty values are
  2171  	// omitted from API requests. See
  2172  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2173  	NullFields []string `json:"-"`
  2174  }
  2175  
  2176  func (s *GoogleFirestoreAdminV1IndexConfigDelta) MarshalJSON() ([]byte, error) {
  2177  	type NoMethod GoogleFirestoreAdminV1IndexConfigDelta
  2178  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2179  }
  2180  
  2181  // GoogleFirestoreAdminV1IndexField: A field in an index. The field_path
  2182  // describes which field is indexed, the value_mode describes how the field
  2183  // value is indexed.
  2184  type GoogleFirestoreAdminV1IndexField struct {
  2185  	// ArrayConfig: Indicates that this field supports operations on
  2186  	// `array_value`s.
  2187  	//
  2188  	// Possible values:
  2189  	//   "ARRAY_CONFIG_UNSPECIFIED" - The index does not support additional array
  2190  	// queries.
  2191  	//   "CONTAINS" - The index supports array containment queries.
  2192  	ArrayConfig string `json:"arrayConfig,omitempty"`
  2193  	// FieldPath: Can be __name__. For single field indexes, this must match the
  2194  	// name of the field or may be omitted.
  2195  	FieldPath string `json:"fieldPath,omitempty"`
  2196  	// Order: Indicates that this field supports ordering by the specified order or
  2197  	// comparing using =, !=, <, <=, >, >=.
  2198  	//
  2199  	// Possible values:
  2200  	//   "ORDER_UNSPECIFIED" - The ordering is unspecified. Not a valid option.
  2201  	//   "ASCENDING" - The field is ordered by ascending field value.
  2202  	//   "DESCENDING" - The field is ordered by descending field value.
  2203  	Order string `json:"order,omitempty"`
  2204  	// VectorConfig: Indicates that this field supports nearest neighbor and
  2205  	// distance operations on vector.
  2206  	VectorConfig *GoogleFirestoreAdminV1VectorConfig `json:"vectorConfig,omitempty"`
  2207  	// ForceSendFields is a list of field names (e.g. "ArrayConfig") to
  2208  	// unconditionally include in API requests. By default, fields with empty or
  2209  	// default values are omitted from API requests. See
  2210  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2211  	// details.
  2212  	ForceSendFields []string `json:"-"`
  2213  	// NullFields is a list of field names (e.g. "ArrayConfig") to include in API
  2214  	// requests with the JSON null value. By default, fields with empty values are
  2215  	// omitted from API requests. See
  2216  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2217  	NullFields []string `json:"-"`
  2218  }
  2219  
  2220  func (s *GoogleFirestoreAdminV1IndexField) MarshalJSON() ([]byte, error) {
  2221  	type NoMethod GoogleFirestoreAdminV1IndexField
  2222  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2223  }
  2224  
  2225  // GoogleFirestoreAdminV1IndexOperationMetadata: Metadata for
  2226  // google.longrunning.Operation results from FirestoreAdmin.CreateIndex.
  2227  type GoogleFirestoreAdminV1IndexOperationMetadata struct {
  2228  	// EndTime: The time this operation completed. Will be unset if operation still
  2229  	// in progress.
  2230  	EndTime string `json:"endTime,omitempty"`
  2231  	// Index: The index resource that this operation is acting on. For example:
  2232  	// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_i
  2233  	// d}/indexes/{index_id}`
  2234  	Index string `json:"index,omitempty"`
  2235  	// ProgressBytes: The progress, in bytes, of this operation.
  2236  	ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
  2237  	// ProgressDocuments: The progress, in documents, of this operation.
  2238  	ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
  2239  	// StartTime: The time this operation started.
  2240  	StartTime string `json:"startTime,omitempty"`
  2241  	// State: The state of the operation.
  2242  	//
  2243  	// Possible values:
  2244  	//   "OPERATION_STATE_UNSPECIFIED" - Unspecified.
  2245  	//   "INITIALIZING" - Request is being prepared for processing.
  2246  	//   "PROCESSING" - Request is actively being processed.
  2247  	//   "CANCELLING" - Request is in the process of being cancelled after user
  2248  	// called google.longrunning.Operations.CancelOperation on the operation.
  2249  	//   "FINALIZING" - Request has been processed and is in its finalization
  2250  	// stage.
  2251  	//   "SUCCESSFUL" - Request has completed successfully.
  2252  	//   "FAILED" - Request has finished being processed, but encountered an error.
  2253  	//   "CANCELLED" - Request has finished being cancelled after user called
  2254  	// google.longrunning.Operations.CancelOperation.
  2255  	State string `json:"state,omitempty"`
  2256  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  2257  	// include in API requests. By default, fields with empty or default values are
  2258  	// omitted from API requests. See
  2259  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2260  	// details.
  2261  	ForceSendFields []string `json:"-"`
  2262  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  2263  	// requests with the JSON null value. By default, fields with empty values are
  2264  	// omitted from API requests. See
  2265  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2266  	NullFields []string `json:"-"`
  2267  }
  2268  
  2269  func (s *GoogleFirestoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, error) {
  2270  	type NoMethod GoogleFirestoreAdminV1IndexOperationMetadata
  2271  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2272  }
  2273  
  2274  // GoogleFirestoreAdminV1ListBackupSchedulesResponse: The response for
  2275  // FirestoreAdmin.ListBackupSchedules.
  2276  type GoogleFirestoreAdminV1ListBackupSchedulesResponse struct {
  2277  	// BackupSchedules: List of all backup schedules.
  2278  	BackupSchedules []*GoogleFirestoreAdminV1BackupSchedule `json:"backupSchedules,omitempty"`
  2279  
  2280  	// ServerResponse contains the HTTP response code and headers from the server.
  2281  	googleapi.ServerResponse `json:"-"`
  2282  	// ForceSendFields is a list of field names (e.g. "BackupSchedules") to
  2283  	// unconditionally include in API requests. By default, fields with empty or
  2284  	// default values are omitted from API requests. See
  2285  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2286  	// details.
  2287  	ForceSendFields []string `json:"-"`
  2288  	// NullFields is a list of field names (e.g. "BackupSchedules") to include in
  2289  	// API requests with the JSON null value. By default, fields with empty values
  2290  	// are omitted from API requests. See
  2291  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2292  	NullFields []string `json:"-"`
  2293  }
  2294  
  2295  func (s *GoogleFirestoreAdminV1ListBackupSchedulesResponse) MarshalJSON() ([]byte, error) {
  2296  	type NoMethod GoogleFirestoreAdminV1ListBackupSchedulesResponse
  2297  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2298  }
  2299  
  2300  // GoogleFirestoreAdminV1ListBackupsResponse: The response for
  2301  // FirestoreAdmin.ListBackups.
  2302  type GoogleFirestoreAdminV1ListBackupsResponse struct {
  2303  	// Backups: List of all backups for the project.
  2304  	Backups []*GoogleFirestoreAdminV1Backup `json:"backups,omitempty"`
  2305  	// Unreachable: List of locations that existing backups were not able to be
  2306  	// fetched from. Instead of failing the entire requests when a single location
  2307  	// is unreachable, this response returns a partial result set and list of
  2308  	// locations unable to be reached here. The request can be retried against a
  2309  	// single location to get a concrete error.
  2310  	Unreachable []string `json:"unreachable,omitempty"`
  2311  
  2312  	// ServerResponse contains the HTTP response code and headers from the server.
  2313  	googleapi.ServerResponse `json:"-"`
  2314  	// ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
  2315  	// include in API requests. By default, fields with empty or default values are
  2316  	// omitted from API requests. See
  2317  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2318  	// details.
  2319  	ForceSendFields []string `json:"-"`
  2320  	// NullFields is a list of field names (e.g. "Backups") to include in API
  2321  	// requests with the JSON null value. By default, fields with empty values are
  2322  	// omitted from API requests. See
  2323  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2324  	NullFields []string `json:"-"`
  2325  }
  2326  
  2327  func (s *GoogleFirestoreAdminV1ListBackupsResponse) MarshalJSON() ([]byte, error) {
  2328  	type NoMethod GoogleFirestoreAdminV1ListBackupsResponse
  2329  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2330  }
  2331  
  2332  // GoogleFirestoreAdminV1ListDatabasesResponse: The list of databases for a
  2333  // project.
  2334  type GoogleFirestoreAdminV1ListDatabasesResponse struct {
  2335  	// Databases: The databases in the project.
  2336  	Databases []*GoogleFirestoreAdminV1Database `json:"databases,omitempty"`
  2337  	// Unreachable: In the event that data about individual databases cannot be
  2338  	// listed they will be recorded here. An example entry might be:
  2339  	// projects/some_project/locations/some_location This can happen if the Cloud
  2340  	// Region that the Database resides in is currently unavailable. In this case
  2341  	// we can't fetch all the details about the database. You may be able to get a
  2342  	// more detailed error message (or possibly fetch the resource) by sending a
  2343  	// 'Get' request for the resource or a 'List' request for the specific
  2344  	// location.
  2345  	Unreachable []string `json:"unreachable,omitempty"`
  2346  
  2347  	// ServerResponse contains the HTTP response code and headers from the server.
  2348  	googleapi.ServerResponse `json:"-"`
  2349  	// ForceSendFields is a list of field names (e.g. "Databases") to
  2350  	// unconditionally include in API requests. By default, fields with empty or
  2351  	// default values are omitted from API requests. See
  2352  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2353  	// details.
  2354  	ForceSendFields []string `json:"-"`
  2355  	// NullFields is a list of field names (e.g. "Databases") to include in API
  2356  	// requests with the JSON null value. By default, fields with empty values are
  2357  	// omitted from API requests. See
  2358  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2359  	NullFields []string `json:"-"`
  2360  }
  2361  
  2362  func (s *GoogleFirestoreAdminV1ListDatabasesResponse) MarshalJSON() ([]byte, error) {
  2363  	type NoMethod GoogleFirestoreAdminV1ListDatabasesResponse
  2364  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2365  }
  2366  
  2367  // GoogleFirestoreAdminV1ListFieldsResponse: The response for
  2368  // FirestoreAdmin.ListFields.
  2369  type GoogleFirestoreAdminV1ListFieldsResponse struct {
  2370  	// Fields: The requested fields.
  2371  	Fields []*GoogleFirestoreAdminV1Field `json:"fields,omitempty"`
  2372  	// NextPageToken: A page token that may be used to request another page of
  2373  	// results. If blank, this is the last page.
  2374  	NextPageToken string `json:"nextPageToken,omitempty"`
  2375  
  2376  	// ServerResponse contains the HTTP response code and headers from the server.
  2377  	googleapi.ServerResponse `json:"-"`
  2378  	// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
  2379  	// include in API requests. By default, fields with empty or default values are
  2380  	// omitted from API requests. See
  2381  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2382  	// details.
  2383  	ForceSendFields []string `json:"-"`
  2384  	// NullFields is a list of field names (e.g. "Fields") to include in API
  2385  	// requests with the JSON null value. By default, fields with empty values are
  2386  	// omitted from API requests. See
  2387  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2388  	NullFields []string `json:"-"`
  2389  }
  2390  
  2391  func (s *GoogleFirestoreAdminV1ListFieldsResponse) MarshalJSON() ([]byte, error) {
  2392  	type NoMethod GoogleFirestoreAdminV1ListFieldsResponse
  2393  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2394  }
  2395  
  2396  // GoogleFirestoreAdminV1ListIndexesResponse: The response for
  2397  // FirestoreAdmin.ListIndexes.
  2398  type GoogleFirestoreAdminV1ListIndexesResponse struct {
  2399  	// Indexes: The requested indexes.
  2400  	Indexes []*GoogleFirestoreAdminV1Index `json:"indexes,omitempty"`
  2401  	// NextPageToken: A page token that may be used to request another page of
  2402  	// results. If blank, this is the last page.
  2403  	NextPageToken string `json:"nextPageToken,omitempty"`
  2404  
  2405  	// ServerResponse contains the HTTP response code and headers from the server.
  2406  	googleapi.ServerResponse `json:"-"`
  2407  	// ForceSendFields is a list of field names (e.g. "Indexes") to unconditionally
  2408  	// include in API requests. By default, fields with empty or default values are
  2409  	// omitted from API requests. See
  2410  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2411  	// details.
  2412  	ForceSendFields []string `json:"-"`
  2413  	// NullFields is a list of field names (e.g. "Indexes") to include in API
  2414  	// requests with the JSON null value. By default, fields with empty values are
  2415  	// omitted from API requests. See
  2416  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2417  	NullFields []string `json:"-"`
  2418  }
  2419  
  2420  func (s *GoogleFirestoreAdminV1ListIndexesResponse) MarshalJSON() ([]byte, error) {
  2421  	type NoMethod GoogleFirestoreAdminV1ListIndexesResponse
  2422  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2423  }
  2424  
  2425  // GoogleFirestoreAdminV1LocationMetadata: The metadata message for
  2426  // google.cloud.location.Location.metadata.
  2427  type GoogleFirestoreAdminV1LocationMetadata struct {
  2428  }
  2429  
  2430  // GoogleFirestoreAdminV1Progress: Describes the progress of the operation.
  2431  // Unit of work is generic and must be interpreted based on where Progress is
  2432  // used.
  2433  type GoogleFirestoreAdminV1Progress struct {
  2434  	// CompletedWork: The amount of work completed.
  2435  	CompletedWork int64 `json:"completedWork,omitempty,string"`
  2436  	// EstimatedWork: The amount of work estimated.
  2437  	EstimatedWork int64 `json:"estimatedWork,omitempty,string"`
  2438  	// ForceSendFields is a list of field names (e.g. "CompletedWork") to
  2439  	// unconditionally include in API requests. By default, fields with empty or
  2440  	// default values are omitted from API requests. See
  2441  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2442  	// details.
  2443  	ForceSendFields []string `json:"-"`
  2444  	// NullFields is a list of field names (e.g. "CompletedWork") to include in API
  2445  	// requests with the JSON null value. By default, fields with empty values are
  2446  	// omitted from API requests. See
  2447  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2448  	NullFields []string `json:"-"`
  2449  }
  2450  
  2451  func (s *GoogleFirestoreAdminV1Progress) MarshalJSON() ([]byte, error) {
  2452  	type NoMethod GoogleFirestoreAdminV1Progress
  2453  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2454  }
  2455  
  2456  // GoogleFirestoreAdminV1RestoreDatabaseMetadata: Metadata for the long-running
  2457  // operation from the RestoreDatabase request.
  2458  type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct {
  2459  	// Backup: The name of the backup restoring from.
  2460  	Backup string `json:"backup,omitempty"`
  2461  	// Database: The name of the database being restored to.
  2462  	Database string `json:"database,omitempty"`
  2463  	// EndTime: The time the restore finished, unset for ongoing restores.
  2464  	EndTime string `json:"endTime,omitempty"`
  2465  	// OperationState: The operation state of the restore.
  2466  	//
  2467  	// Possible values:
  2468  	//   "OPERATION_STATE_UNSPECIFIED" - Unspecified.
  2469  	//   "INITIALIZING" - Request is being prepared for processing.
  2470  	//   "PROCESSING" - Request is actively being processed.
  2471  	//   "CANCELLING" - Request is in the process of being cancelled after user
  2472  	// called google.longrunning.Operations.CancelOperation on the operation.
  2473  	//   "FINALIZING" - Request has been processed and is in its finalization
  2474  	// stage.
  2475  	//   "SUCCESSFUL" - Request has completed successfully.
  2476  	//   "FAILED" - Request has finished being processed, but encountered an error.
  2477  	//   "CANCELLED" - Request has finished being cancelled after user called
  2478  	// google.longrunning.Operations.CancelOperation.
  2479  	OperationState string `json:"operationState,omitempty"`
  2480  	// ProgressPercentage: How far along the restore is as an estimated percentage
  2481  	// of remaining time.
  2482  	ProgressPercentage *GoogleFirestoreAdminV1Progress `json:"progressPercentage,omitempty"`
  2483  	// StartTime: The time the restore was started.
  2484  	StartTime string `json:"startTime,omitempty"`
  2485  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  2486  	// include in API requests. By default, fields with empty or default values are
  2487  	// omitted from API requests. See
  2488  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2489  	// details.
  2490  	ForceSendFields []string `json:"-"`
  2491  	// NullFields is a list of field names (e.g. "Backup") to include in API
  2492  	// requests with the JSON null value. By default, fields with empty values are
  2493  	// omitted from API requests. See
  2494  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2495  	NullFields []string `json:"-"`
  2496  }
  2497  
  2498  func (s *GoogleFirestoreAdminV1RestoreDatabaseMetadata) MarshalJSON() ([]byte, error) {
  2499  	type NoMethod GoogleFirestoreAdminV1RestoreDatabaseMetadata
  2500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2501  }
  2502  
  2503  // GoogleFirestoreAdminV1RestoreDatabaseRequest: The request message for
  2504  // FirestoreAdmin.RestoreDatabase.
  2505  type GoogleFirestoreAdminV1RestoreDatabaseRequest struct {
  2506  	// Backup: Backup to restore from. Must be from the same project as the parent.
  2507  	// Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
  2508  	Backup string `json:"backup,omitempty"`
  2509  	// DatabaseId: Required. The ID to use for the database, which will become the
  2510  	// final component of the database's resource name. This database id must not
  2511  	// be associated with an existing database. This value should be 4-63
  2512  	// characters. Valid characters are /a-z-/ with first character a letter and
  2513  	// the last a letter or a number. Must not be UUID-like
  2514  	// /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also
  2515  	// valid.
  2516  	DatabaseId string `json:"databaseId,omitempty"`
  2517  	// DatabaseSnapshot: Database snapshot to restore from. The source database
  2518  	// must exist and have enabled PITR. The restored database will be created in
  2519  	// the same location as the source database.
  2520  	DatabaseSnapshot *GoogleFirestoreAdminV1DatabaseSnapshot `json:"databaseSnapshot,omitempty"`
  2521  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  2522  	// include in API requests. By default, fields with empty or default values are
  2523  	// omitted from API requests. See
  2524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2525  	// details.
  2526  	ForceSendFields []string `json:"-"`
  2527  	// NullFields is a list of field names (e.g. "Backup") to include in API
  2528  	// requests with the JSON null value. By default, fields with empty values are
  2529  	// omitted from API requests. See
  2530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2531  	NullFields []string `json:"-"`
  2532  }
  2533  
  2534  func (s *GoogleFirestoreAdminV1RestoreDatabaseRequest) MarshalJSON() ([]byte, error) {
  2535  	type NoMethod GoogleFirestoreAdminV1RestoreDatabaseRequest
  2536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2537  }
  2538  
  2539  // GoogleFirestoreAdminV1Stats: Backup specific statistics.
  2540  type GoogleFirestoreAdminV1Stats struct {
  2541  	// DocumentCount: Output only. The total number of documents contained in the
  2542  	// backup.
  2543  	DocumentCount int64 `json:"documentCount,omitempty,string"`
  2544  	// IndexCount: Output only. The total number of index entries contained in the
  2545  	// backup.
  2546  	IndexCount int64 `json:"indexCount,omitempty,string"`
  2547  	// SizeBytes: Output only. Summation of the size of all documents and index
  2548  	// entries in the backup, measured in bytes.
  2549  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
  2550  	// ForceSendFields is a list of field names (e.g. "DocumentCount") to
  2551  	// unconditionally include in API requests. By default, fields with empty or
  2552  	// default values are omitted from API requests. See
  2553  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2554  	// details.
  2555  	ForceSendFields []string `json:"-"`
  2556  	// NullFields is a list of field names (e.g. "DocumentCount") to include in API
  2557  	// requests with the JSON null value. By default, fields with empty values are
  2558  	// omitted from API requests. See
  2559  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2560  	NullFields []string `json:"-"`
  2561  }
  2562  
  2563  func (s *GoogleFirestoreAdminV1Stats) MarshalJSON() ([]byte, error) {
  2564  	type NoMethod GoogleFirestoreAdminV1Stats
  2565  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2566  }
  2567  
  2568  // GoogleFirestoreAdminV1TtlConfig: The TTL (time-to-live) configuration for
  2569  // documents that have this `Field` set. Storing a timestamp value into a
  2570  // TTL-enabled field will be treated as the document's absolute expiration
  2571  // time. Timestamp values in the past indicate that the document is eligible
  2572  // for immediate expiration. Using any other data type or leaving the field
  2573  // absent will disable expiration for the individual document.
  2574  type GoogleFirestoreAdminV1TtlConfig struct {
  2575  	// State: Output only. The state of the TTL configuration.
  2576  	//
  2577  	// Possible values:
  2578  	//   "STATE_UNSPECIFIED" - The state is unspecified or unknown.
  2579  	//   "CREATING" - The TTL is being applied. There is an active long-running
  2580  	// operation to track the change. Newly written documents will have TTLs
  2581  	// applied as requested. Requested TTLs on existing documents are still being
  2582  	// processed. When TTLs on all existing documents have been processed, the
  2583  	// state will move to 'ACTIVE'.
  2584  	//   "ACTIVE" - The TTL is active for all documents.
  2585  	//   "NEEDS_REPAIR" - The TTL configuration could not be enabled for all
  2586  	// existing documents. Newly written documents will continue to have their TTL
  2587  	// applied. The LRO returned when last attempting to enable TTL for this
  2588  	// `Field` has failed, and may have more details.
  2589  	State string `json:"state,omitempty"`
  2590  	// ForceSendFields is a list of field names (e.g. "State") to unconditionally
  2591  	// include in API requests. By default, fields with empty or default values are
  2592  	// omitted from API requests. See
  2593  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2594  	// details.
  2595  	ForceSendFields []string `json:"-"`
  2596  	// NullFields is a list of field names (e.g. "State") to include in API
  2597  	// requests with the JSON null value. By default, fields with empty values are
  2598  	// omitted from API requests. See
  2599  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2600  	NullFields []string `json:"-"`
  2601  }
  2602  
  2603  func (s *GoogleFirestoreAdminV1TtlConfig) MarshalJSON() ([]byte, error) {
  2604  	type NoMethod GoogleFirestoreAdminV1TtlConfig
  2605  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2606  }
  2607  
  2608  // GoogleFirestoreAdminV1TtlConfigDelta: Information about a TTL configuration
  2609  // change.
  2610  type GoogleFirestoreAdminV1TtlConfigDelta struct {
  2611  	// ChangeType: Specifies how the TTL configuration is changing.
  2612  	//
  2613  	// Possible values:
  2614  	//   "CHANGE_TYPE_UNSPECIFIED" - The type of change is not specified or known.
  2615  	//   "ADD" - The TTL config is being added.
  2616  	//   "REMOVE" - The TTL config is being removed.
  2617  	ChangeType string `json:"changeType,omitempty"`
  2618  	// ForceSendFields is a list of field names (e.g. "ChangeType") to
  2619  	// unconditionally include in API requests. By default, fields with empty or
  2620  	// default values are omitted from API requests. See
  2621  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2622  	// details.
  2623  	ForceSendFields []string `json:"-"`
  2624  	// NullFields is a list of field names (e.g. "ChangeType") to include in API
  2625  	// requests with the JSON null value. By default, fields with empty values are
  2626  	// omitted from API requests. See
  2627  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2628  	NullFields []string `json:"-"`
  2629  }
  2630  
  2631  func (s *GoogleFirestoreAdminV1TtlConfigDelta) MarshalJSON() ([]byte, error) {
  2632  	type NoMethod GoogleFirestoreAdminV1TtlConfigDelta
  2633  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2634  }
  2635  
  2636  // GoogleFirestoreAdminV1UpdateDatabaseMetadata: Metadata related to the update
  2637  // database operation.
  2638  type GoogleFirestoreAdminV1UpdateDatabaseMetadata struct {
  2639  }
  2640  
  2641  // GoogleFirestoreAdminV1VectorConfig: The index configuration to support
  2642  // vector search operations
  2643  type GoogleFirestoreAdminV1VectorConfig struct {
  2644  	// Dimension: Required. The vector dimension this configuration applies to. The
  2645  	// resulting index will only include vectors of this dimension, and can be used
  2646  	// for vector search with the same dimension.
  2647  	Dimension int64 `json:"dimension,omitempty"`
  2648  	// Flat: Indicates the vector index is a flat index.
  2649  	Flat *GoogleFirestoreAdminV1FlatIndex `json:"flat,omitempty"`
  2650  	// ForceSendFields is a list of field names (e.g. "Dimension") to
  2651  	// unconditionally include in API requests. By default, fields with empty or
  2652  	// default values are omitted from API requests. See
  2653  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2654  	// details.
  2655  	ForceSendFields []string `json:"-"`
  2656  	// NullFields is a list of field names (e.g. "Dimension") to include in API
  2657  	// requests with the JSON null value. By default, fields with empty values are
  2658  	// omitted from API requests. See
  2659  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2660  	NullFields []string `json:"-"`
  2661  }
  2662  
  2663  func (s *GoogleFirestoreAdminV1VectorConfig) MarshalJSON() ([]byte, error) {
  2664  	type NoMethod GoogleFirestoreAdminV1VectorConfig
  2665  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2666  }
  2667  
  2668  // GoogleFirestoreAdminV1WeeklyRecurrence: Represents a recurring schedule that
  2669  // runs on a specified day of the week. The time zone is UTC.
  2670  type GoogleFirestoreAdminV1WeeklyRecurrence struct {
  2671  	// Day: The day of week to run. DAY_OF_WEEK_UNSPECIFIED is not allowed.
  2672  	//
  2673  	// Possible values:
  2674  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  2675  	//   "MONDAY" - Monday
  2676  	//   "TUESDAY" - Tuesday
  2677  	//   "WEDNESDAY" - Wednesday
  2678  	//   "THURSDAY" - Thursday
  2679  	//   "FRIDAY" - Friday
  2680  	//   "SATURDAY" - Saturday
  2681  	//   "SUNDAY" - Sunday
  2682  	Day string `json:"day,omitempty"`
  2683  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  2684  	// include in API requests. By default, fields with empty or default values are
  2685  	// omitted from API requests. See
  2686  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2687  	// details.
  2688  	ForceSendFields []string `json:"-"`
  2689  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  2690  	// with the JSON null value. By default, fields with empty values are omitted
  2691  	// from API requests. See
  2692  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2693  	NullFields []string `json:"-"`
  2694  }
  2695  
  2696  func (s *GoogleFirestoreAdminV1WeeklyRecurrence) MarshalJSON() ([]byte, error) {
  2697  	type NoMethod GoogleFirestoreAdminV1WeeklyRecurrence
  2698  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2699  }
  2700  
  2701  // GoogleLongrunningCancelOperationRequest: The request message for
  2702  // Operations.CancelOperation.
  2703  type GoogleLongrunningCancelOperationRequest struct {
  2704  }
  2705  
  2706  // GoogleLongrunningListOperationsResponse: The response message for
  2707  // Operations.ListOperations.
  2708  type GoogleLongrunningListOperationsResponse struct {
  2709  	// NextPageToken: The standard List next-page token.
  2710  	NextPageToken string `json:"nextPageToken,omitempty"`
  2711  	// Operations: A list of operations that matches the specified filter in the
  2712  	// request.
  2713  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  2714  
  2715  	// ServerResponse contains the HTTP response code and headers from the server.
  2716  	googleapi.ServerResponse `json:"-"`
  2717  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2718  	// unconditionally include in API requests. By default, fields with empty or
  2719  	// default values are omitted from API requests. See
  2720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2721  	// details.
  2722  	ForceSendFields []string `json:"-"`
  2723  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2724  	// requests with the JSON null value. By default, fields with empty values are
  2725  	// omitted from API requests. See
  2726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2727  	NullFields []string `json:"-"`
  2728  }
  2729  
  2730  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  2731  	type NoMethod GoogleLongrunningListOperationsResponse
  2732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2733  }
  2734  
  2735  // GoogleLongrunningOperation: This resource represents a long-running
  2736  // operation that is the result of a network API call.
  2737  type GoogleLongrunningOperation struct {
  2738  	// Done: If the value is `false`, it means the operation is still in progress.
  2739  	// If `true`, the operation is completed, and either `error` or `response` is
  2740  	// available.
  2741  	Done bool `json:"done,omitempty"`
  2742  	// Error: The error result of the operation in case of failure or cancellation.
  2743  	Error *Status `json:"error,omitempty"`
  2744  	// Metadata: Service-specific metadata associated with the operation. It
  2745  	// typically contains progress information and common metadata such as create
  2746  	// time. Some services might not provide such metadata. Any method that returns
  2747  	// a long-running operation should document the metadata type, if any.
  2748  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2749  	// Name: The server-assigned name, which is only unique within the same service
  2750  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2751  	// should be a resource name ending with `operations/{unique_id}`.
  2752  	Name string `json:"name,omitempty"`
  2753  	// Response: The normal, successful response of the operation. If the original
  2754  	// method returns no data on success, such as `Delete`, the response is
  2755  	// `google.protobuf.Empty`. If the original method is standard
  2756  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2757  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2758  	// original method name. For example, if the original method name is
  2759  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2760  	Response googleapi.RawMessage `json:"response,omitempty"`
  2761  
  2762  	// ServerResponse contains the HTTP response code and headers from the server.
  2763  	googleapi.ServerResponse `json:"-"`
  2764  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2765  	// include in API requests. By default, fields with empty or default values are
  2766  	// omitted from API requests. See
  2767  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2768  	// details.
  2769  	ForceSendFields []string `json:"-"`
  2770  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2771  	// with the JSON null value. By default, fields with empty values are omitted
  2772  	// from API requests. See
  2773  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2774  	NullFields []string `json:"-"`
  2775  }
  2776  
  2777  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  2778  	type NoMethod GoogleLongrunningOperation
  2779  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2780  }
  2781  
  2782  // LatLng: An object that represents a latitude/longitude pair. This is
  2783  // expressed as a pair of doubles to represent degrees latitude and degrees
  2784  // longitude. Unless specified otherwise, this object must conform to the WGS84
  2785  // standard. Values must be within normalized ranges.
  2786  type LatLng struct {
  2787  	// Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0].
  2788  	Latitude float64 `json:"latitude,omitempty"`
  2789  	// Longitude: The longitude in degrees. It must be in the range [-180.0,
  2790  	// +180.0].
  2791  	Longitude float64 `json:"longitude,omitempty"`
  2792  	// ForceSendFields is a list of field names (e.g. "Latitude") to
  2793  	// unconditionally include in API requests. By default, fields with empty or
  2794  	// default values are omitted from API requests. See
  2795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2796  	// details.
  2797  	ForceSendFields []string `json:"-"`
  2798  	// NullFields is a list of field names (e.g. "Latitude") to include in API
  2799  	// requests with the JSON null value. By default, fields with empty values are
  2800  	// omitted from API requests. See
  2801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2802  	NullFields []string `json:"-"`
  2803  }
  2804  
  2805  func (s *LatLng) MarshalJSON() ([]byte, error) {
  2806  	type NoMethod LatLng
  2807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2808  }
  2809  
  2810  func (s *LatLng) UnmarshalJSON(data []byte) error {
  2811  	type NoMethod LatLng
  2812  	var s1 struct {
  2813  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
  2814  		Longitude gensupport.JSONFloat64 `json:"longitude"`
  2815  		*NoMethod
  2816  	}
  2817  	s1.NoMethod = (*NoMethod)(s)
  2818  	if err := json.Unmarshal(data, &s1); err != nil {
  2819  		return err
  2820  	}
  2821  	s.Latitude = float64(s1.Latitude)
  2822  	s.Longitude = float64(s1.Longitude)
  2823  	return nil
  2824  }
  2825  
  2826  // ListCollectionIdsRequest: The request for Firestore.ListCollectionIds.
  2827  type ListCollectionIdsRequest struct {
  2828  	// PageSize: The maximum number of results to return.
  2829  	PageSize int64 `json:"pageSize,omitempty"`
  2830  	// PageToken: A page token. Must be a value from ListCollectionIdsResponse.
  2831  	PageToken string `json:"pageToken,omitempty"`
  2832  	// ReadTime: Reads documents as they were at the given time. This must be a
  2833  	// microsecond precision timestamp within the past one hour, or if
  2834  	// Point-in-Time Recovery is enabled, can additionally be a whole minute
  2835  	// timestamp within the past 7 days.
  2836  	ReadTime string `json:"readTime,omitempty"`
  2837  	// ForceSendFields is a list of field names (e.g. "PageSize") to
  2838  	// unconditionally include in API requests. By default, fields with empty or
  2839  	// default values are omitted from API requests. See
  2840  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2841  	// details.
  2842  	ForceSendFields []string `json:"-"`
  2843  	// NullFields is a list of field names (e.g. "PageSize") to include in API
  2844  	// requests with the JSON null value. By default, fields with empty values are
  2845  	// omitted from API requests. See
  2846  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2847  	NullFields []string `json:"-"`
  2848  }
  2849  
  2850  func (s *ListCollectionIdsRequest) MarshalJSON() ([]byte, error) {
  2851  	type NoMethod ListCollectionIdsRequest
  2852  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2853  }
  2854  
  2855  // ListCollectionIdsResponse: The response from Firestore.ListCollectionIds.
  2856  type ListCollectionIdsResponse struct {
  2857  	// CollectionIds: The collection ids.
  2858  	CollectionIds []string `json:"collectionIds,omitempty"`
  2859  	// NextPageToken: A page token that may be used to continue the list.
  2860  	NextPageToken string `json:"nextPageToken,omitempty"`
  2861  
  2862  	// ServerResponse contains the HTTP response code and headers from the server.
  2863  	googleapi.ServerResponse `json:"-"`
  2864  	// ForceSendFields is a list of field names (e.g. "CollectionIds") to
  2865  	// unconditionally include in API requests. By default, fields with empty or
  2866  	// default values are omitted from API requests. See
  2867  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2868  	// details.
  2869  	ForceSendFields []string `json:"-"`
  2870  	// NullFields is a list of field names (e.g. "CollectionIds") to include in API
  2871  	// requests with the JSON null value. By default, fields with empty values are
  2872  	// omitted from API requests. See
  2873  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2874  	NullFields []string `json:"-"`
  2875  }
  2876  
  2877  func (s *ListCollectionIdsResponse) MarshalJSON() ([]byte, error) {
  2878  	type NoMethod ListCollectionIdsResponse
  2879  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2880  }
  2881  
  2882  // ListDocumentsResponse: The response for Firestore.ListDocuments.
  2883  type ListDocumentsResponse struct {
  2884  	// Documents: The Documents found.
  2885  	Documents []*Document `json:"documents,omitempty"`
  2886  	// NextPageToken: A token to retrieve the next page of documents. If this field
  2887  	// is omitted, there are no subsequent pages.
  2888  	NextPageToken string `json:"nextPageToken,omitempty"`
  2889  
  2890  	// ServerResponse contains the HTTP response code and headers from the server.
  2891  	googleapi.ServerResponse `json:"-"`
  2892  	// ForceSendFields is a list of field names (e.g. "Documents") to
  2893  	// unconditionally include in API requests. By default, fields with empty or
  2894  	// default values are omitted from API requests. See
  2895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2896  	// details.
  2897  	ForceSendFields []string `json:"-"`
  2898  	// NullFields is a list of field names (e.g. "Documents") to include in API
  2899  	// requests with the JSON null value. By default, fields with empty values are
  2900  	// omitted from API requests. See
  2901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2902  	NullFields []string `json:"-"`
  2903  }
  2904  
  2905  func (s *ListDocumentsResponse) MarshalJSON() ([]byte, error) {
  2906  	type NoMethod ListDocumentsResponse
  2907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2908  }
  2909  
  2910  // ListLocationsResponse: The response message for Locations.ListLocations.
  2911  type ListLocationsResponse struct {
  2912  	// Locations: A list of locations that matches the specified filter in the
  2913  	// request.
  2914  	Locations []*Location `json:"locations,omitempty"`
  2915  	// NextPageToken: The standard List next-page token.
  2916  	NextPageToken string `json:"nextPageToken,omitempty"`
  2917  
  2918  	// ServerResponse contains the HTTP response code and headers from the server.
  2919  	googleapi.ServerResponse `json:"-"`
  2920  	// ForceSendFields is a list of field names (e.g. "Locations") to
  2921  	// unconditionally include in API requests. By default, fields with empty or
  2922  	// default values are omitted from API requests. See
  2923  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2924  	// details.
  2925  	ForceSendFields []string `json:"-"`
  2926  	// NullFields is a list of field names (e.g. "Locations") to include in API
  2927  	// requests with the JSON null value. By default, fields with empty values are
  2928  	// omitted from API requests. See
  2929  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2930  	NullFields []string `json:"-"`
  2931  }
  2932  
  2933  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2934  	type NoMethod ListLocationsResponse
  2935  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2936  }
  2937  
  2938  // ListenRequest: A request for Firestore.Listen
  2939  type ListenRequest struct {
  2940  	// AddTarget: A target to add to this stream.
  2941  	AddTarget *Target `json:"addTarget,omitempty"`
  2942  	// Labels: Labels associated with this target change.
  2943  	Labels map[string]string `json:"labels,omitempty"`
  2944  	// RemoveTarget: The ID of a target to remove from this stream.
  2945  	RemoveTarget int64 `json:"removeTarget,omitempty"`
  2946  	// ForceSendFields is a list of field names (e.g. "AddTarget") to
  2947  	// unconditionally include in API requests. By default, fields with empty or
  2948  	// default values are omitted from API requests. See
  2949  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2950  	// details.
  2951  	ForceSendFields []string `json:"-"`
  2952  	// NullFields is a list of field names (e.g. "AddTarget") to include in API
  2953  	// requests with the JSON null value. By default, fields with empty values are
  2954  	// omitted from API requests. See
  2955  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2956  	NullFields []string `json:"-"`
  2957  }
  2958  
  2959  func (s *ListenRequest) MarshalJSON() ([]byte, error) {
  2960  	type NoMethod ListenRequest
  2961  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2962  }
  2963  
  2964  // ListenResponse: The response for Firestore.Listen.
  2965  type ListenResponse struct {
  2966  	// DocumentChange: A Document has changed.
  2967  	DocumentChange *DocumentChange `json:"documentChange,omitempty"`
  2968  	// DocumentDelete: A Document has been deleted.
  2969  	DocumentDelete *DocumentDelete `json:"documentDelete,omitempty"`
  2970  	// DocumentRemove: A Document has been removed from a target (because it is no
  2971  	// longer relevant to that target).
  2972  	DocumentRemove *DocumentRemove `json:"documentRemove,omitempty"`
  2973  	// Filter: A filter to apply to the set of documents previously returned for
  2974  	// the given target. Returned when documents may have been removed from the
  2975  	// given target, but the exact documents are unknown.
  2976  	Filter *ExistenceFilter `json:"filter,omitempty"`
  2977  	// TargetChange: Targets have changed.
  2978  	TargetChange *TargetChange `json:"targetChange,omitempty"`
  2979  
  2980  	// ServerResponse contains the HTTP response code and headers from the server.
  2981  	googleapi.ServerResponse `json:"-"`
  2982  	// ForceSendFields is a list of field names (e.g. "DocumentChange") to
  2983  	// unconditionally include in API requests. By default, fields with empty or
  2984  	// default values are omitted from API requests. See
  2985  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2986  	// details.
  2987  	ForceSendFields []string `json:"-"`
  2988  	// NullFields is a list of field names (e.g. "DocumentChange") to include in
  2989  	// API requests with the JSON null value. By default, fields with empty values
  2990  	// are omitted from API requests. See
  2991  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2992  	NullFields []string `json:"-"`
  2993  }
  2994  
  2995  func (s *ListenResponse) MarshalJSON() ([]byte, error) {
  2996  	type NoMethod ListenResponse
  2997  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2998  }
  2999  
  3000  // Location: A resource that represents a Google Cloud location.
  3001  type Location struct {
  3002  	// DisplayName: The friendly name for this location, typically a nearby city
  3003  	// name. For example, "Tokyo".
  3004  	DisplayName string `json:"displayName,omitempty"`
  3005  	// Labels: Cross-service attributes for the location. For example
  3006  	// {"cloud.googleapis.com/region": "us-east1"}
  3007  	Labels map[string]string `json:"labels,omitempty"`
  3008  	// LocationId: The canonical id for this location. For example: "us-east1".
  3009  	LocationId string `json:"locationId,omitempty"`
  3010  	// Metadata: Service-specific metadata. For example the available capacity at
  3011  	// the given location.
  3012  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3013  	// Name: Resource name for the location, which may vary between
  3014  	// implementations. For example:
  3015  	// "projects/example-project/locations/us-east1"
  3016  	Name string `json:"name,omitempty"`
  3017  
  3018  	// ServerResponse contains the HTTP response code and headers from the server.
  3019  	googleapi.ServerResponse `json:"-"`
  3020  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  3021  	// unconditionally include in API requests. By default, fields with empty or
  3022  	// default values are omitted from API requests. See
  3023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3024  	// details.
  3025  	ForceSendFields []string `json:"-"`
  3026  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  3027  	// requests with the JSON null value. By default, fields with empty values are
  3028  	// omitted from API requests. See
  3029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3030  	NullFields []string `json:"-"`
  3031  }
  3032  
  3033  func (s *Location) MarshalJSON() ([]byte, error) {
  3034  	type NoMethod Location
  3035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3036  }
  3037  
  3038  // MapValue: A map value.
  3039  type MapValue struct {
  3040  	// Fields: The map's fields. The map keys represent field names. Field names
  3041  	// matching the regular expression `__.*__` are reserved. Reserved field names
  3042  	// are forbidden except in certain documented contexts. The map keys,
  3043  	// represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.
  3044  	Fields map[string]Value `json:"fields,omitempty"`
  3045  	// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
  3046  	// include in API requests. By default, fields with empty or default values are
  3047  	// omitted from API requests. See
  3048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3049  	// details.
  3050  	ForceSendFields []string `json:"-"`
  3051  	// NullFields is a list of field names (e.g. "Fields") to include in API
  3052  	// requests with the JSON null value. By default, fields with empty values are
  3053  	// omitted from API requests. See
  3054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3055  	NullFields []string `json:"-"`
  3056  }
  3057  
  3058  func (s *MapValue) MarshalJSON() ([]byte, error) {
  3059  	type NoMethod MapValue
  3060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3061  }
  3062  
  3063  // Order: An order on a field.
  3064  type Order struct {
  3065  	// Direction: The direction to order by. Defaults to `ASCENDING`.
  3066  	//
  3067  	// Possible values:
  3068  	//   "DIRECTION_UNSPECIFIED" - Unspecified.
  3069  	//   "ASCENDING" - Ascending.
  3070  	//   "DESCENDING" - Descending.
  3071  	Direction string `json:"direction,omitempty"`
  3072  	// Field: The field to order by.
  3073  	Field *FieldReference `json:"field,omitempty"`
  3074  	// ForceSendFields is a list of field names (e.g. "Direction") to
  3075  	// unconditionally include in API requests. By default, fields with empty or
  3076  	// default values are omitted from API requests. See
  3077  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3078  	// details.
  3079  	ForceSendFields []string `json:"-"`
  3080  	// NullFields is a list of field names (e.g. "Direction") to include in API
  3081  	// requests with the JSON null value. By default, fields with empty values are
  3082  	// omitted from API requests. See
  3083  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3084  	NullFields []string `json:"-"`
  3085  }
  3086  
  3087  func (s *Order) MarshalJSON() ([]byte, error) {
  3088  	type NoMethod Order
  3089  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3090  }
  3091  
  3092  // PartitionQueryRequest: The request for Firestore.PartitionQuery.
  3093  type PartitionQueryRequest struct {
  3094  	// PageSize: The maximum number of partitions to return in this call, subject
  3095  	// to `partition_count`. For example, if `partition_count` = 10 and `page_size`
  3096  	// = 8, the first call to PartitionQuery will return up to 8 partitions and a
  3097  	// `next_page_token` if more results exist. A second call to PartitionQuery
  3098  	// will return up to 2 partitions, to complete the total of 10 specified in
  3099  	// `partition_count`.
  3100  	PageSize int64 `json:"pageSize,omitempty"`
  3101  	// PageToken: The `next_page_token` value returned from a previous call to
  3102  	// PartitionQuery that may be used to get an additional set of results. There
  3103  	// are no ordering guarantees between sets of results. Thus, using multiple
  3104  	// sets of results will require merging the different result sets. For example,
  3105  	// two subsequent calls using a page_token may return: * cursor B, cursor M,
  3106  	// cursor Q * cursor A, cursor U, cursor W To obtain a complete result set
  3107  	// ordered with respect to the results of the query supplied to PartitionQuery,
  3108  	// the results sets should be merged: cursor A, cursor B, cursor M, cursor Q,
  3109  	// cursor U, cursor W
  3110  	PageToken string `json:"pageToken,omitempty"`
  3111  	// PartitionCount: The desired maximum number of partition points. The
  3112  	// partitions may be returned across multiple pages of results. The number must
  3113  	// be positive. The actual number of partitions returned may be fewer. For
  3114  	// example, this may be set to one fewer than the number of parallel queries to
  3115  	// be run, or in running a data pipeline job, one fewer than the number of
  3116  	// workers or compute instances available.
  3117  	PartitionCount int64 `json:"partitionCount,omitempty,string"`
  3118  	// ReadTime: Reads documents as they were at the given time. This must be a
  3119  	// microsecond precision timestamp within the past one hour, or if
  3120  	// Point-in-Time Recovery is enabled, can additionally be a whole minute
  3121  	// timestamp within the past 7 days.
  3122  	ReadTime string `json:"readTime,omitempty"`
  3123  	// StructuredQuery: A structured query. Query must specify collection with all
  3124  	// descendants and be ordered by name ascending. Other filters, order bys,
  3125  	// limits, offsets, and start/end cursors are not supported.
  3126  	StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
  3127  	// ForceSendFields is a list of field names (e.g. "PageSize") to
  3128  	// unconditionally include in API requests. By default, fields with empty or
  3129  	// default values are omitted from API requests. See
  3130  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3131  	// details.
  3132  	ForceSendFields []string `json:"-"`
  3133  	// NullFields is a list of field names (e.g. "PageSize") to include in API
  3134  	// requests with the JSON null value. By default, fields with empty values are
  3135  	// omitted from API requests. See
  3136  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3137  	NullFields []string `json:"-"`
  3138  }
  3139  
  3140  func (s *PartitionQueryRequest) MarshalJSON() ([]byte, error) {
  3141  	type NoMethod PartitionQueryRequest
  3142  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3143  }
  3144  
  3145  // PartitionQueryResponse: The response for Firestore.PartitionQuery.
  3146  type PartitionQueryResponse struct {
  3147  	// NextPageToken: A page token that may be used to request an additional set of
  3148  	// results, up to the number specified by `partition_count` in the
  3149  	// PartitionQuery request. If blank, there are no more results.
  3150  	NextPageToken string `json:"nextPageToken,omitempty"`
  3151  	// Partitions: Partition results. Each partition is a split point that can be
  3152  	// used by RunQuery as a starting or end point for the query results. The
  3153  	// RunQuery requests must be made with the same query supplied to this
  3154  	// PartitionQuery request. The partition cursors will be ordered according to
  3155  	// same ordering as the results of the query supplied to PartitionQuery. For
  3156  	// example, if a PartitionQuery request returns partition cursors A and B,
  3157  	// running the following three queries will return the entire result set of the
  3158  	// original query: * query, end_at A * query, start_at A, end_at B * query,
  3159  	// start_at B An empty result may indicate that the query has too few results
  3160  	// to be partitioned, or that the query is not yet supported for partitioning.
  3161  	Partitions []*Cursor `json:"partitions,omitempty"`
  3162  
  3163  	// ServerResponse contains the HTTP response code and headers from the server.
  3164  	googleapi.ServerResponse `json:"-"`
  3165  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3166  	// unconditionally include in API requests. By default, fields with empty or
  3167  	// default values are omitted from API requests. See
  3168  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3169  	// details.
  3170  	ForceSendFields []string `json:"-"`
  3171  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3172  	// requests with the JSON null value. By default, fields with empty values are
  3173  	// omitted from API requests. See
  3174  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3175  	NullFields []string `json:"-"`
  3176  }
  3177  
  3178  func (s *PartitionQueryResponse) MarshalJSON() ([]byte, error) {
  3179  	type NoMethod PartitionQueryResponse
  3180  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3181  }
  3182  
  3183  // PlanSummary: Planning phase information for the query.
  3184  type PlanSummary struct {
  3185  	// IndexesUsed: The indexes selected for the query. For example: [
  3186  	// {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
  3187  	// {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} ]
  3188  	IndexesUsed []googleapi.RawMessage `json:"indexesUsed,omitempty"`
  3189  	// ForceSendFields is a list of field names (e.g. "IndexesUsed") to
  3190  	// unconditionally include in API requests. By default, fields with empty or
  3191  	// default values are omitted from API requests. See
  3192  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3193  	// details.
  3194  	ForceSendFields []string `json:"-"`
  3195  	// NullFields is a list of field names (e.g. "IndexesUsed") to include in API
  3196  	// requests with the JSON null value. By default, fields with empty values are
  3197  	// omitted from API requests. See
  3198  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3199  	NullFields []string `json:"-"`
  3200  }
  3201  
  3202  func (s *PlanSummary) MarshalJSON() ([]byte, error) {
  3203  	type NoMethod PlanSummary
  3204  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3205  }
  3206  
  3207  // Precondition: A precondition on a document, used for conditional operations.
  3208  type Precondition struct {
  3209  	// Exists: When set to `true`, the target document must exist. When set to
  3210  	// `false`, the target document must not exist.
  3211  	Exists bool `json:"exists,omitempty"`
  3212  	// UpdateTime: When set, the target document must exist and have been last
  3213  	// updated at that time. Timestamp must be microsecond aligned.
  3214  	UpdateTime string `json:"updateTime,omitempty"`
  3215  	// ForceSendFields is a list of field names (e.g. "Exists") to unconditionally
  3216  	// include in API requests. By default, fields with empty or default values are
  3217  	// omitted from API requests. See
  3218  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3219  	// details.
  3220  	ForceSendFields []string `json:"-"`
  3221  	// NullFields is a list of field names (e.g. "Exists") to include in API
  3222  	// requests with the JSON null value. By default, fields with empty values are
  3223  	// omitted from API requests. See
  3224  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3225  	NullFields []string `json:"-"`
  3226  }
  3227  
  3228  func (s *Precondition) MarshalJSON() ([]byte, error) {
  3229  	type NoMethod Precondition
  3230  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3231  }
  3232  
  3233  // Projection: The projection of document's fields to return.
  3234  type Projection struct {
  3235  	// Fields: The fields to return. If empty, all fields are returned. To only
  3236  	// return the name of the document, use `['__name__']`.
  3237  	Fields []*FieldReference `json:"fields,omitempty"`
  3238  	// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
  3239  	// include in API requests. By default, fields with empty or default values are
  3240  	// omitted from API requests. See
  3241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3242  	// details.
  3243  	ForceSendFields []string `json:"-"`
  3244  	// NullFields is a list of field names (e.g. "Fields") to include in API
  3245  	// requests with the JSON null value. By default, fields with empty values are
  3246  	// omitted from API requests. See
  3247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3248  	NullFields []string `json:"-"`
  3249  }
  3250  
  3251  func (s *Projection) MarshalJSON() ([]byte, error) {
  3252  	type NoMethod Projection
  3253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3254  }
  3255  
  3256  // QueryTarget: A target specified by a query.
  3257  type QueryTarget struct {
  3258  	// Parent: The parent resource name. In the format:
  3259  	// `projects/{project_id}/databases/{database_id}/documents` or
  3260  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  3261  	// For example: `projects/my-project/databases/my-database/documents` or
  3262  	// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  3263  	Parent string `json:"parent,omitempty"`
  3264  	// StructuredQuery: A structured query.
  3265  	StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
  3266  	// ForceSendFields is a list of field names (e.g. "Parent") to unconditionally
  3267  	// include in API requests. By default, fields with empty or default values are
  3268  	// omitted from API requests. See
  3269  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3270  	// details.
  3271  	ForceSendFields []string `json:"-"`
  3272  	// NullFields is a list of field names (e.g. "Parent") to include in API
  3273  	// requests with the JSON null value. By default, fields with empty values are
  3274  	// omitted from API requests. See
  3275  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3276  	NullFields []string `json:"-"`
  3277  }
  3278  
  3279  func (s *QueryTarget) MarshalJSON() ([]byte, error) {
  3280  	type NoMethod QueryTarget
  3281  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3282  }
  3283  
  3284  // ReadOnly: Options for a transaction that can only be used to read documents.
  3285  type ReadOnly struct {
  3286  	// ReadTime: Reads documents at the given time. This must be a microsecond
  3287  	// precision timestamp within the past one hour, or if Point-in-Time Recovery
  3288  	// is enabled, can additionally be a whole minute timestamp within the past 7
  3289  	// days.
  3290  	ReadTime string `json:"readTime,omitempty"`
  3291  	// ForceSendFields is a list of field names (e.g. "ReadTime") to
  3292  	// unconditionally include in API requests. By default, fields with empty or
  3293  	// default values are omitted from API requests. See
  3294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3295  	// details.
  3296  	ForceSendFields []string `json:"-"`
  3297  	// NullFields is a list of field names (e.g. "ReadTime") to include in API
  3298  	// requests with the JSON null value. By default, fields with empty values are
  3299  	// omitted from API requests. See
  3300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3301  	NullFields []string `json:"-"`
  3302  }
  3303  
  3304  func (s *ReadOnly) MarshalJSON() ([]byte, error) {
  3305  	type NoMethod ReadOnly
  3306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3307  }
  3308  
  3309  // ReadWrite: Options for a transaction that can be used to read and write
  3310  // documents. Firestore does not allow 3rd party auth requests to create
  3311  // read-write. transactions.
  3312  type ReadWrite struct {
  3313  	// RetryTransaction: An optional transaction to retry.
  3314  	RetryTransaction string `json:"retryTransaction,omitempty"`
  3315  	// ForceSendFields is a list of field names (e.g. "RetryTransaction") to
  3316  	// unconditionally include in API requests. By default, fields with empty or
  3317  	// default values are omitted from API requests. See
  3318  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3319  	// details.
  3320  	ForceSendFields []string `json:"-"`
  3321  	// NullFields is a list of field names (e.g. "RetryTransaction") to include in
  3322  	// API requests with the JSON null value. By default, fields with empty values
  3323  	// are omitted from API requests. See
  3324  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3325  	NullFields []string `json:"-"`
  3326  }
  3327  
  3328  func (s *ReadWrite) MarshalJSON() ([]byte, error) {
  3329  	type NoMethod ReadWrite
  3330  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3331  }
  3332  
  3333  // RollbackRequest: The request for Firestore.Rollback.
  3334  type RollbackRequest struct {
  3335  	// Transaction: Required. The transaction to roll back.
  3336  	Transaction string `json:"transaction,omitempty"`
  3337  	// ForceSendFields is a list of field names (e.g. "Transaction") to
  3338  	// unconditionally include in API requests. By default, fields with empty or
  3339  	// default values are omitted from API requests. See
  3340  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3341  	// details.
  3342  	ForceSendFields []string `json:"-"`
  3343  	// NullFields is a list of field names (e.g. "Transaction") to include in API
  3344  	// requests with the JSON null value. By default, fields with empty values are
  3345  	// omitted from API requests. See
  3346  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3347  	NullFields []string `json:"-"`
  3348  }
  3349  
  3350  func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
  3351  	type NoMethod RollbackRequest
  3352  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3353  }
  3354  
  3355  // RunAggregationQueryRequest: The request for Firestore.RunAggregationQuery.
  3356  type RunAggregationQueryRequest struct {
  3357  	// ExplainOptions: Optional. Explain options for the query. If set, additional
  3358  	// query statistics will be returned. If not, only query results will be
  3359  	// returned.
  3360  	ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"`
  3361  	// NewTransaction: Starts a new transaction as part of the query, defaulting to
  3362  	// read-only. The new transaction ID will be returned as the first response in
  3363  	// the stream.
  3364  	NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
  3365  	// ReadTime: Executes the query at the given timestamp. This must be a
  3366  	// microsecond precision timestamp within the past one hour, or if
  3367  	// Point-in-Time Recovery is enabled, can additionally be a whole minute
  3368  	// timestamp within the past 7 days.
  3369  	ReadTime string `json:"readTime,omitempty"`
  3370  	// StructuredAggregationQuery: An aggregation query.
  3371  	StructuredAggregationQuery *StructuredAggregationQuery `json:"structuredAggregationQuery,omitempty"`
  3372  	// Transaction: Run the aggregation within an already active transaction. The
  3373  	// value here is the opaque transaction ID to execute the query in.
  3374  	Transaction string `json:"transaction,omitempty"`
  3375  	// ForceSendFields is a list of field names (e.g. "ExplainOptions") to
  3376  	// unconditionally include in API requests. By default, fields with empty or
  3377  	// default values are omitted from API requests. See
  3378  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3379  	// details.
  3380  	ForceSendFields []string `json:"-"`
  3381  	// NullFields is a list of field names (e.g. "ExplainOptions") to include in
  3382  	// API requests with the JSON null value. By default, fields with empty values
  3383  	// are omitted from API requests. See
  3384  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3385  	NullFields []string `json:"-"`
  3386  }
  3387  
  3388  func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) {
  3389  	type NoMethod RunAggregationQueryRequest
  3390  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3391  }
  3392  
  3393  // RunAggregationQueryResponse: The response for Firestore.RunAggregationQuery.
  3394  type RunAggregationQueryResponse struct {
  3395  	// ExplainMetrics: Query explain metrics. This is only present when the
  3396  	// RunAggregationQueryRequest.explain_options is provided, and it is sent only
  3397  	// once with the last response in the stream.
  3398  	ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"`
  3399  	// ReadTime: The time at which the aggregate result was computed. This is
  3400  	// always monotonically increasing; in this case, the previous
  3401  	// AggregationResult in the result stream are guaranteed not to have changed
  3402  	// between their `read_time` and this one. If the query returns no results, a
  3403  	// response with `read_time` and no `result` will be sent, and this represents
  3404  	// the time at which the query was run.
  3405  	ReadTime string `json:"readTime,omitempty"`
  3406  	// Result: A single aggregation result. Not present when reporting partial
  3407  	// progress.
  3408  	Result *AggregationResult `json:"result,omitempty"`
  3409  	// Transaction: The transaction that was started as part of this request. Only
  3410  	// present on the first response when the request requested to start a new
  3411  	// transaction.
  3412  	Transaction string `json:"transaction,omitempty"`
  3413  
  3414  	// ServerResponse contains the HTTP response code and headers from the server.
  3415  	googleapi.ServerResponse `json:"-"`
  3416  	// ForceSendFields is a list of field names (e.g. "ExplainMetrics") to
  3417  	// unconditionally include in API requests. By default, fields with empty or
  3418  	// default values are omitted from API requests. See
  3419  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3420  	// details.
  3421  	ForceSendFields []string `json:"-"`
  3422  	// NullFields is a list of field names (e.g. "ExplainMetrics") to include in
  3423  	// API requests with the JSON null value. By default, fields with empty values
  3424  	// are omitted from API requests. See
  3425  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3426  	NullFields []string `json:"-"`
  3427  }
  3428  
  3429  func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) {
  3430  	type NoMethod RunAggregationQueryResponse
  3431  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3432  }
  3433  
  3434  // RunQueryRequest: The request for Firestore.RunQuery.
  3435  type RunQueryRequest struct {
  3436  	// ExplainOptions: Optional. Explain options for the query. If set, additional
  3437  	// query statistics will be returned. If not, only query results will be
  3438  	// returned.
  3439  	ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"`
  3440  	// NewTransaction: Starts a new transaction and reads the documents. Defaults
  3441  	// to a read-only transaction. The new transaction ID will be returned as the
  3442  	// first response in the stream.
  3443  	NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
  3444  	// ReadTime: Reads documents as they were at the given time. This must be a
  3445  	// microsecond precision timestamp within the past one hour, or if
  3446  	// Point-in-Time Recovery is enabled, can additionally be a whole minute
  3447  	// timestamp within the past 7 days.
  3448  	ReadTime string `json:"readTime,omitempty"`
  3449  	// StructuredQuery: A structured query.
  3450  	StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
  3451  	// Transaction: Run the query within an already active transaction. The value
  3452  	// here is the opaque transaction ID to execute the query in.
  3453  	Transaction string `json:"transaction,omitempty"`
  3454  	// ForceSendFields is a list of field names (e.g. "ExplainOptions") to
  3455  	// unconditionally include in API requests. By default, fields with empty or
  3456  	// default values are omitted from API requests. See
  3457  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3458  	// details.
  3459  	ForceSendFields []string `json:"-"`
  3460  	// NullFields is a list of field names (e.g. "ExplainOptions") to include in
  3461  	// API requests with the JSON null value. By default, fields with empty values
  3462  	// are omitted from API requests. See
  3463  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3464  	NullFields []string `json:"-"`
  3465  }
  3466  
  3467  func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
  3468  	type NoMethod RunQueryRequest
  3469  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3470  }
  3471  
  3472  // RunQueryResponse: The response for Firestore.RunQuery.
  3473  type RunQueryResponse struct {
  3474  	// Document: A query result, not set when reporting partial progress.
  3475  	Document *Document `json:"document,omitempty"`
  3476  	// Done: If present, Firestore has completely finished the request and no more
  3477  	// documents will be returned.
  3478  	Done bool `json:"done,omitempty"`
  3479  	// ExplainMetrics: Query explain metrics. This is only present when the
  3480  	// RunQueryRequest.explain_options is provided, and it is sent only once with
  3481  	// the last response in the stream.
  3482  	ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"`
  3483  	// ReadTime: The time at which the document was read. This may be monotonically
  3484  	// increasing; in this case, the previous documents in the result stream are
  3485  	// guaranteed not to have changed between their `read_time` and this one. If
  3486  	// the query returns no results, a response with `read_time` and no `document`
  3487  	// will be sent, and this represents the time at which the query was run.
  3488  	ReadTime string `json:"readTime,omitempty"`
  3489  	// SkippedResults: The number of results that have been skipped due to an
  3490  	// offset between the last response and the current response.
  3491  	SkippedResults int64 `json:"skippedResults,omitempty"`
  3492  	// Transaction: The transaction that was started as part of this request. Can
  3493  	// only be set in the first response, and only if
  3494  	// RunQueryRequest.new_transaction was set in the request. If set, no other
  3495  	// fields will be set in this response.
  3496  	Transaction string `json:"transaction,omitempty"`
  3497  
  3498  	// ServerResponse contains the HTTP response code and headers from the server.
  3499  	googleapi.ServerResponse `json:"-"`
  3500  	// ForceSendFields is a list of field names (e.g. "Document") to
  3501  	// unconditionally include in API requests. By default, fields with empty or
  3502  	// default values are omitted from API requests. See
  3503  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3504  	// details.
  3505  	ForceSendFields []string `json:"-"`
  3506  	// NullFields is a list of field names (e.g. "Document") to include in API
  3507  	// requests with the JSON null value. By default, fields with empty values are
  3508  	// omitted from API requests. See
  3509  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3510  	NullFields []string `json:"-"`
  3511  }
  3512  
  3513  func (s *RunQueryResponse) MarshalJSON() ([]byte, error) {
  3514  	type NoMethod RunQueryResponse
  3515  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3516  }
  3517  
  3518  // Status: The `Status` type defines a logical error model that is suitable for
  3519  // different programming environments, including REST APIs and RPC APIs. It is
  3520  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  3521  // pieces of data: error code, error message, and error details. You can find
  3522  // out more about this error model and how to work with it in the API Design
  3523  // Guide (https://cloud.google.com/apis/design/errors).
  3524  type Status struct {
  3525  	// Code: The status code, which should be an enum value of google.rpc.Code.
  3526  	Code int64 `json:"code,omitempty"`
  3527  	// Details: A list of messages that carry the error details. There is a common
  3528  	// set of message types for APIs to use.
  3529  	Details []googleapi.RawMessage `json:"details,omitempty"`
  3530  	// Message: A developer-facing error message, which should be in English. Any
  3531  	// user-facing error message should be localized and sent in the
  3532  	// google.rpc.Status.details field, or localized by the client.
  3533  	Message string `json:"message,omitempty"`
  3534  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3535  	// include in API requests. By default, fields with empty or default values are
  3536  	// omitted from API requests. See
  3537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3538  	// details.
  3539  	ForceSendFields []string `json:"-"`
  3540  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3541  	// with the JSON null value. By default, fields with empty values are omitted
  3542  	// from API requests. See
  3543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3544  	NullFields []string `json:"-"`
  3545  }
  3546  
  3547  func (s *Status) MarshalJSON() ([]byte, error) {
  3548  	type NoMethod Status
  3549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3550  }
  3551  
  3552  // StructuredAggregationQuery: Firestore query for running an aggregation over
  3553  // a StructuredQuery.
  3554  type StructuredAggregationQuery struct {
  3555  	// Aggregations: Optional. Series of aggregations to apply over the results of
  3556  	// the `structured_query`. Requires: * A minimum of one and maximum of five
  3557  	// aggregations per query.
  3558  	Aggregations []*Aggregation `json:"aggregations,omitempty"`
  3559  	// StructuredQuery: Nested structured query.
  3560  	StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
  3561  	// ForceSendFields is a list of field names (e.g. "Aggregations") to
  3562  	// unconditionally include in API requests. By default, fields with empty or
  3563  	// default values are omitted from API requests. See
  3564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3565  	// details.
  3566  	ForceSendFields []string `json:"-"`
  3567  	// NullFields is a list of field names (e.g. "Aggregations") to include in API
  3568  	// requests with the JSON null value. By default, fields with empty values are
  3569  	// omitted from API requests. See
  3570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3571  	NullFields []string `json:"-"`
  3572  }
  3573  
  3574  func (s *StructuredAggregationQuery) MarshalJSON() ([]byte, error) {
  3575  	type NoMethod StructuredAggregationQuery
  3576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3577  }
  3578  
  3579  // StructuredQuery: A Firestore query. The query stages are executed in the
  3580  // following order: 1. from 2. where 3. select 4. order_by + start_at + end_at
  3581  // 5. offset 6. limit
  3582  type StructuredQuery struct {
  3583  	// EndAt: A potential prefix of a position in the result set to end the query
  3584  	// at. This is similar to `START_AT` but with it controlling the end position
  3585  	// rather than the start position. Requires: * The number of values cannot be
  3586  	// greater than the number of fields specified in the `ORDER BY` clause.
  3587  	EndAt *Cursor `json:"endAt,omitempty"`
  3588  	// FindNearest: Optional. A potential nearest neighbors search. Applies after
  3589  	// all other filters and ordering. Finds the closest vector embeddings to the
  3590  	// given query vector.
  3591  	FindNearest *FindNearest `json:"findNearest,omitempty"`
  3592  	// From: The collections to query.
  3593  	From []*CollectionSelector `json:"from,omitempty"`
  3594  	// Limit: The maximum number of results to return. Applies after all other
  3595  	// constraints. Requires: * The value must be greater than or equal to zero if
  3596  	// specified.
  3597  	Limit int64 `json:"limit,omitempty"`
  3598  	// Offset: The number of documents to skip before returning the first result.
  3599  	// This applies after the constraints specified by the `WHERE`, `START AT`, &
  3600  	// `END AT` but before the `LIMIT` clause. Requires: * The value must be
  3601  	// greater than or equal to zero if specified.
  3602  	Offset int64 `json:"offset,omitempty"`
  3603  	// OrderBy: The order to apply to the query results. Firestore allows callers
  3604  	// to provide a full ordering, a partial ordering, or no ordering at all. In
  3605  	// all cases, Firestore guarantees a stable ordering through the following
  3606  	// rules: * The `order_by` is required to reference all fields used with an
  3607  	// inequality filter. * All fields that are required to be in the `order_by`
  3608  	// but are not already present are appended in lexicographical ordering of the
  3609  	// field name. * If an order on `__name__` is not specified, it is appended by
  3610  	// default. Fields are appended with the same sort direction as the last order
  3611  	// specified, or 'ASCENDING' if no order was specified. For example: * `ORDER
  3612  	// BY a` becomes `ORDER BY a ASC, __name__ ASC` * `ORDER BY a DESC` becomes
  3613  	// `ORDER BY a DESC, __name__ DESC` * `WHERE a > 1` becomes `WHERE a > 1 ORDER
  3614  	// BY a ASC, __name__ ASC` * `WHERE __name__ > ... AND a > 1` becomes `WHERE
  3615  	// __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC`
  3616  	OrderBy []*Order `json:"orderBy,omitempty"`
  3617  	// Select: Optional sub-set of the fields to return. This acts as a
  3618  	// DocumentMask over the documents returned from a query. When not set, assumes
  3619  	// that the caller wants all fields returned.
  3620  	Select *Projection `json:"select,omitempty"`
  3621  	// StartAt: A potential prefix of a position in the result set to start the
  3622  	// query at. The ordering of the result set is based on the `ORDER BY` clause
  3623  	// of the original query. ``` SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b
  3624  	// ASC, __name__ ASC; ``` This query's results are ordered by `(b ASC, __name__
  3625  	// ASC)`. Cursors can reference either the full ordering or a prefix of the
  3626  	// location, though it cannot reference more fields than what are in the
  3627  	// provided `ORDER BY`. Continuing off the example above, attaching the
  3628  	// following start cursors will have varying impact: - `START BEFORE (2,
  3629  	// /k/123)`: start the query right before `a = 1 AND b > 2 AND __name__ >
  3630  	// /k/123`. - `START AFTER (10)`: start the query right after `a = 1 AND b >
  3631  	// 10`. Unlike `OFFSET` which requires scanning over the first N results to
  3632  	// skip, a start cursor allows the query to begin at a logical position. This
  3633  	// position is not required to match an actual result, it will scan forward
  3634  	// from this position to find the next document. Requires: * The number of
  3635  	// values cannot be greater than the number of fields specified in the `ORDER
  3636  	// BY` clause.
  3637  	StartAt *Cursor `json:"startAt,omitempty"`
  3638  	// Where: The filter to apply.
  3639  	Where *Filter `json:"where,omitempty"`
  3640  	// ForceSendFields is a list of field names (e.g. "EndAt") to unconditionally
  3641  	// include in API requests. By default, fields with empty or default values are
  3642  	// omitted from API requests. See
  3643  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3644  	// details.
  3645  	ForceSendFields []string `json:"-"`
  3646  	// NullFields is a list of field names (e.g. "EndAt") to include in API
  3647  	// requests with the JSON null value. By default, fields with empty values are
  3648  	// omitted from API requests. See
  3649  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3650  	NullFields []string `json:"-"`
  3651  }
  3652  
  3653  func (s *StructuredQuery) MarshalJSON() ([]byte, error) {
  3654  	type NoMethod StructuredQuery
  3655  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3656  }
  3657  
  3658  // Sum: Sum of the values of the requested field. * Only numeric values will be
  3659  // aggregated. All non-numeric values including `NULL` are skipped. * If the
  3660  // aggregated values contain `NaN`, returns `NaN`. Infinity math follows
  3661  // IEEE-754 standards. * If the aggregated value set is empty, returns 0. *
  3662  // Returns a 64-bit integer if all aggregated numbers are integers and the sum
  3663  // result does not overflow. Otherwise, the result is returned as a double.
  3664  // Note that even if all the aggregated values are integers, the result is
  3665  // returned as a double if it cannot fit within a 64-bit signed integer. When
  3666  // this occurs, the returned value will lose precision. * When underflow
  3667  // occurs, floating-point aggregation is non-deterministic. This means that
  3668  // running the same query repeatedly without any changes to the underlying
  3669  // values could produce slightly different results each time. In those cases,
  3670  // values should be stored as integers over floating-point numbers.
  3671  type Sum struct {
  3672  	// Field: The field to aggregate on.
  3673  	Field *FieldReference `json:"field,omitempty"`
  3674  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
  3675  	// include in API requests. By default, fields with empty or default values are
  3676  	// omitted from API requests. See
  3677  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3678  	// details.
  3679  	ForceSendFields []string `json:"-"`
  3680  	// NullFields is a list of field names (e.g. "Field") to include in API
  3681  	// requests with the JSON null value. By default, fields with empty values are
  3682  	// omitted from API requests. See
  3683  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3684  	NullFields []string `json:"-"`
  3685  }
  3686  
  3687  func (s *Sum) MarshalJSON() ([]byte, error) {
  3688  	type NoMethod Sum
  3689  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3690  }
  3691  
  3692  // Target: A specification of a set of documents to listen to.
  3693  type Target struct {
  3694  	// Documents: A target specified by a set of document names.
  3695  	Documents *DocumentsTarget `json:"documents,omitempty"`
  3696  	// ExpectedCount: The number of documents that last matched the query at the
  3697  	// resume token or read time. This value is only relevant when a `resume_type`
  3698  	// is provided. This value being present and greater than zero signals that the
  3699  	// client wants `ExistenceFilter.unchanged_names` to be included in the
  3700  	// response.
  3701  	ExpectedCount int64 `json:"expectedCount,omitempty"`
  3702  	// Once: If the target should be removed once it is current and consistent.
  3703  	Once bool `json:"once,omitempty"`
  3704  	// Query: A target specified by a query.
  3705  	Query *QueryTarget `json:"query,omitempty"`
  3706  	// ReadTime: Start listening after a specific `read_time`. The client must know
  3707  	// the state of matching documents at this time.
  3708  	ReadTime string `json:"readTime,omitempty"`
  3709  	// ResumeToken: A resume token from a prior TargetChange for an identical
  3710  	// target. Using a resume token with a different target is unsupported and may
  3711  	// fail.
  3712  	ResumeToken string `json:"resumeToken,omitempty"`
  3713  	// TargetId: The target ID that identifies the target on the stream. Must be a
  3714  	// positive number and non-zero. If `target_id` is 0 (or unspecified), the
  3715  	// server will assign an ID for this target and return that in a
  3716  	// `TargetChange::ADD` event. Once a target with `target_id=0` is added, all
  3717  	// subsequent targets must also have `target_id=0`. If an `AddTarget` request
  3718  	// with `target_id != 0` is sent to the server after a target with
  3719  	// `target_id=0` is added, the server will immediately send a response with a
  3720  	// `TargetChange::Remove` event. Note that if the client sends multiple
  3721  	// `AddTarget` requests without an ID, the order of IDs returned in
  3722  	// `TargetChage.target_ids` are undefined. Therefore, clients should provide a
  3723  	// target ID instead of relying on the server to assign one. If `target_id` is
  3724  	// non-zero, there must not be an existing active target on this stream with
  3725  	// the same ID.
  3726  	TargetId int64 `json:"targetId,omitempty"`
  3727  	// ForceSendFields is a list of field names (e.g. "Documents") to
  3728  	// unconditionally include in API requests. By default, fields with empty or
  3729  	// default values are omitted from API requests. See
  3730  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3731  	// details.
  3732  	ForceSendFields []string `json:"-"`
  3733  	// NullFields is a list of field names (e.g. "Documents") to include in API
  3734  	// requests with the JSON null value. By default, fields with empty values are
  3735  	// omitted from API requests. See
  3736  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3737  	NullFields []string `json:"-"`
  3738  }
  3739  
  3740  func (s *Target) MarshalJSON() ([]byte, error) {
  3741  	type NoMethod Target
  3742  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3743  }
  3744  
  3745  // TargetChange: Targets being watched have changed.
  3746  type TargetChange struct {
  3747  	// Cause: The error that resulted in this change, if applicable.
  3748  	Cause *Status `json:"cause,omitempty"`
  3749  	// ReadTime: The consistent `read_time` for the given `target_ids` (omitted
  3750  	// when the target_ids are not at a consistent snapshot). The stream is
  3751  	// guaranteed to send a `read_time` with `target_ids` empty whenever the entire
  3752  	// stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages
  3753  	// are guaranteed to (eventually) result in a new consistent snapshot (while
  3754  	// NO_CHANGE and REMOVE messages are not). For a given stream, `read_time` is
  3755  	// guaranteed to be monotonically increasing.
  3756  	ReadTime string `json:"readTime,omitempty"`
  3757  	// ResumeToken: A token that can be used to resume the stream for the given
  3758  	// `target_ids`, or all targets if `target_ids` is empty. Not set on every
  3759  	// target change.
  3760  	ResumeToken string `json:"resumeToken,omitempty"`
  3761  	// TargetChangeType: The type of change that occurred.
  3762  	//
  3763  	// Possible values:
  3764  	//   "NO_CHANGE" - No change has occurred. Used only to send an updated
  3765  	// `resume_token`.
  3766  	//   "ADD" - The targets have been added.
  3767  	//   "REMOVE" - The targets have been removed.
  3768  	//   "CURRENT" - The targets reflect all changes committed before the targets
  3769  	// were added to the stream. This will be sent after or with a `read_time` that
  3770  	// is greater than or equal to the time at which the targets were added.
  3771  	// Listeners can wait for this change if read-after-write semantics are
  3772  	// desired.
  3773  	//   "RESET" - The targets have been reset, and a new initial state for the
  3774  	// targets will be returned in subsequent changes. After the initial state is
  3775  	// complete, `CURRENT` will be returned even if the target was previously
  3776  	// indicated to be `CURRENT`.
  3777  	TargetChangeType string `json:"targetChangeType,omitempty"`
  3778  	// TargetIds: The target IDs of targets that have changed. If empty, the change
  3779  	// applies to all targets. The order of the target IDs is not defined.
  3780  	TargetIds []int64 `json:"targetIds,omitempty"`
  3781  	// ForceSendFields is a list of field names (e.g. "Cause") to unconditionally
  3782  	// include in API requests. By default, fields with empty or default values are
  3783  	// omitted from API requests. See
  3784  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3785  	// details.
  3786  	ForceSendFields []string `json:"-"`
  3787  	// NullFields is a list of field names (e.g. "Cause") to include in API
  3788  	// requests with the JSON null value. By default, fields with empty values are
  3789  	// omitted from API requests. See
  3790  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3791  	NullFields []string `json:"-"`
  3792  }
  3793  
  3794  func (s *TargetChange) MarshalJSON() ([]byte, error) {
  3795  	type NoMethod TargetChange
  3796  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3797  }
  3798  
  3799  // TransactionOptions: Options for creating a new transaction.
  3800  type TransactionOptions struct {
  3801  	// ReadOnly: The transaction can only be used for read operations.
  3802  	ReadOnly *ReadOnly `json:"readOnly,omitempty"`
  3803  	// ReadWrite: The transaction can be used for both read and write operations.
  3804  	ReadWrite *ReadWrite `json:"readWrite,omitempty"`
  3805  	// ForceSendFields is a list of field names (e.g. "ReadOnly") to
  3806  	// unconditionally include in API requests. By default, fields with empty or
  3807  	// default values are omitted from API requests. See
  3808  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3809  	// details.
  3810  	ForceSendFields []string `json:"-"`
  3811  	// NullFields is a list of field names (e.g. "ReadOnly") to include in API
  3812  	// requests with the JSON null value. By default, fields with empty values are
  3813  	// omitted from API requests. See
  3814  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3815  	NullFields []string `json:"-"`
  3816  }
  3817  
  3818  func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
  3819  	type NoMethod TransactionOptions
  3820  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3821  }
  3822  
  3823  // UnaryFilter: A filter with a single operand.
  3824  type UnaryFilter struct {
  3825  	// Field: The field to which to apply the operator.
  3826  	Field *FieldReference `json:"field,omitempty"`
  3827  	// Op: The unary operator to apply.
  3828  	//
  3829  	// Possible values:
  3830  	//   "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
  3831  	//   "IS_NAN" - The given `field` is equal to `NaN`.
  3832  	//   "IS_NULL" - The given `field` is equal to `NULL`.
  3833  	//   "IS_NOT_NAN" - The given `field` is not equal to `NaN`. Requires: * No
  3834  	// other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. * That `field`
  3835  	// comes first in the `order_by`.
  3836  	//   "IS_NOT_NULL" - The given `field` is not equal to `NULL`. Requires: * A
  3837  	// single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. * That `field`
  3838  	// comes first in the `order_by`.
  3839  	Op string `json:"op,omitempty"`
  3840  	// ForceSendFields is a list of field names (e.g. "Field") to unconditionally
  3841  	// include in API requests. By default, fields with empty or default values are
  3842  	// omitted from API requests. See
  3843  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3844  	// details.
  3845  	ForceSendFields []string `json:"-"`
  3846  	// NullFields is a list of field names (e.g. "Field") to include in API
  3847  	// requests with the JSON null value. By default, fields with empty values are
  3848  	// omitted from API requests. See
  3849  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3850  	NullFields []string `json:"-"`
  3851  }
  3852  
  3853  func (s *UnaryFilter) MarshalJSON() ([]byte, error) {
  3854  	type NoMethod UnaryFilter
  3855  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3856  }
  3857  
  3858  // Value: A message that can hold any of the supported value types.
  3859  type Value struct {
  3860  	// ArrayValue: An array value. Cannot directly contain another array value,
  3861  	// though can contain a map which contains another array.
  3862  	ArrayValue *ArrayValue `json:"arrayValue,omitempty"`
  3863  	// BooleanValue: A boolean value.
  3864  	BooleanValue bool `json:"booleanValue,omitempty"`
  3865  	// BytesValue: A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first
  3866  	// 1,500 bytes are considered by queries.
  3867  	BytesValue string `json:"bytesValue,omitempty"`
  3868  	// DoubleValue: A double value.
  3869  	DoubleValue float64 `json:"doubleValue,omitempty"`
  3870  	// GeoPointValue: A geo point value representing a point on the surface of
  3871  	// Earth.
  3872  	GeoPointValue *LatLng `json:"geoPointValue,omitempty"`
  3873  	// IntegerValue: An integer value.
  3874  	IntegerValue int64 `json:"integerValue,omitempty,string"`
  3875  	// MapValue: A map value.
  3876  	MapValue *MapValue `json:"mapValue,omitempty"`
  3877  	// NullValue: A null value.
  3878  	//
  3879  	// Possible values:
  3880  	//   "NULL_VALUE" - Null value.
  3881  	NullValue string `json:"nullValue,omitempty"`
  3882  	// ReferenceValue: A reference to a document. For example:
  3883  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  3884  	ReferenceValue string `json:"referenceValue,omitempty"`
  3885  	// StringValue: A string value. The string, represented as UTF-8, must not
  3886  	// exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8
  3887  	// representation are considered by queries.
  3888  	StringValue string `json:"stringValue,omitempty"`
  3889  	// TimestampValue: A timestamp value. Precise only to microseconds. When
  3890  	// stored, any additional precision is rounded down.
  3891  	TimestampValue string `json:"timestampValue,omitempty"`
  3892  	// ForceSendFields is a list of field names (e.g. "ArrayValue") to
  3893  	// unconditionally include in API requests. By default, fields with empty or
  3894  	// default values are omitted from API requests. See
  3895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3896  	// details.
  3897  	ForceSendFields []string `json:"-"`
  3898  	// NullFields is a list of field names (e.g. "ArrayValue") to include in API
  3899  	// requests with the JSON null value. By default, fields with empty values are
  3900  	// omitted from API requests. See
  3901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3902  	NullFields []string `json:"-"`
  3903  }
  3904  
  3905  func (s *Value) MarshalJSON() ([]byte, error) {
  3906  	type NoMethod Value
  3907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3908  }
  3909  
  3910  func (s *Value) UnmarshalJSON(data []byte) error {
  3911  	type NoMethod Value
  3912  	var s1 struct {
  3913  		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
  3914  		*NoMethod
  3915  	}
  3916  	s1.NoMethod = (*NoMethod)(s)
  3917  	if err := json.Unmarshal(data, &s1); err != nil {
  3918  		return err
  3919  	}
  3920  	s.DoubleValue = float64(s1.DoubleValue)
  3921  	return nil
  3922  }
  3923  
  3924  // Write: A write on a document.
  3925  type Write struct {
  3926  	// CurrentDocument: An optional precondition on the document. The write will
  3927  	// fail if this is set and not met by the target document.
  3928  	CurrentDocument *Precondition `json:"currentDocument,omitempty"`
  3929  	// Delete: A document name to delete. In the format:
  3930  	// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  3931  	Delete string `json:"delete,omitempty"`
  3932  	// Transform: Applies a transformation to a document.
  3933  	Transform *DocumentTransform `json:"transform,omitempty"`
  3934  	// Update: A document to write.
  3935  	Update *Document `json:"update,omitempty"`
  3936  	// UpdateMask: The fields to update in this write. This field can be set only
  3937  	// when the operation is `update`. If the mask is not set for an `update` and
  3938  	// the document exists, any existing data will be overwritten. If the mask is
  3939  	// set and the document on the server has fields not covered by the mask, they
  3940  	// are left unchanged. Fields referenced in the mask, but not present in the
  3941  	// input document, are deleted from the document on the server. The field paths
  3942  	// in this mask must not contain a reserved field name.
  3943  	UpdateMask *DocumentMask `json:"updateMask,omitempty"`
  3944  	// UpdateTransforms: The transforms to perform after update. This field can be
  3945  	// set only when the operation is `update`. If present, this write is
  3946  	// equivalent to performing `update` and `transform` to the same document
  3947  	// atomically and in order.
  3948  	UpdateTransforms []*FieldTransform `json:"updateTransforms,omitempty"`
  3949  	// ForceSendFields is a list of field names (e.g. "CurrentDocument") to
  3950  	// unconditionally include in API requests. By default, fields with empty or
  3951  	// default values are omitted from API requests. See
  3952  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3953  	// details.
  3954  	ForceSendFields []string `json:"-"`
  3955  	// NullFields is a list of field names (e.g. "CurrentDocument") to include in
  3956  	// API requests with the JSON null value. By default, fields with empty values
  3957  	// are omitted from API requests. See
  3958  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3959  	NullFields []string `json:"-"`
  3960  }
  3961  
  3962  func (s *Write) MarshalJSON() ([]byte, error) {
  3963  	type NoMethod Write
  3964  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3965  }
  3966  
  3967  // WriteRequest: The request for Firestore.Write. The first request creates a
  3968  // stream, or resumes an existing one from a token. When creating a new stream,
  3969  // the server replies with a response containing only an ID and a token, to use
  3970  // in the next request. When resuming a stream, the server first streams any
  3971  // responses later than the given token, then a response containing only an
  3972  // up-to-date token, to use in the next request.
  3973  type WriteRequest struct {
  3974  	// Labels: Labels associated with this write request.
  3975  	Labels map[string]string `json:"labels,omitempty"`
  3976  	// StreamId: The ID of the write stream to resume. This may only be set in the
  3977  	// first message. When left empty, a new write stream will be created.
  3978  	StreamId string `json:"streamId,omitempty"`
  3979  	// StreamToken: A stream token that was previously sent by the server. The
  3980  	// client should set this field to the token from the most recent WriteResponse
  3981  	// it has received. This acknowledges that the client has received responses up
  3982  	// to this token. After sending this token, earlier tokens may not be used
  3983  	// anymore. The server may close the stream if there are too many
  3984  	// unacknowledged responses. Leave this field unset when creating a new stream.
  3985  	// To resume a stream at a specific point, set this field and the `stream_id`
  3986  	// field. Leave this field unset when creating a new stream.
  3987  	StreamToken string `json:"streamToken,omitempty"`
  3988  	// Writes: The writes to apply. Always executed atomically and in order. This
  3989  	// must be empty on the first request. This may be empty on the last request.
  3990  	// This must not be empty on all other requests.
  3991  	Writes []*Write `json:"writes,omitempty"`
  3992  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
  3993  	// include in API requests. By default, fields with empty or default values are
  3994  	// omitted from API requests. See
  3995  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3996  	// details.
  3997  	ForceSendFields []string `json:"-"`
  3998  	// NullFields is a list of field names (e.g. "Labels") to include in API
  3999  	// requests with the JSON null value. By default, fields with empty values are
  4000  	// omitted from API requests. See
  4001  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4002  	NullFields []string `json:"-"`
  4003  }
  4004  
  4005  func (s *WriteRequest) MarshalJSON() ([]byte, error) {
  4006  	type NoMethod WriteRequest
  4007  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4008  }
  4009  
  4010  // WriteResponse: The response for Firestore.Write.
  4011  type WriteResponse struct {
  4012  	// CommitTime: The time at which the commit occurred. Any read with an equal or
  4013  	// greater `read_time` is guaranteed to see the effects of the write.
  4014  	CommitTime string `json:"commitTime,omitempty"`
  4015  	// StreamId: The ID of the stream. Only set on the first message, when a new
  4016  	// stream was created.
  4017  	StreamId string `json:"streamId,omitempty"`
  4018  	// StreamToken: A token that represents the position of this response in the
  4019  	// stream. This can be used by a client to resume the stream at this point.
  4020  	// This field is always set.
  4021  	StreamToken string `json:"streamToken,omitempty"`
  4022  	// WriteResults: The result of applying the writes. This i-th write result
  4023  	// corresponds to the i-th write in the request.
  4024  	WriteResults []*WriteResult `json:"writeResults,omitempty"`
  4025  
  4026  	// ServerResponse contains the HTTP response code and headers from the server.
  4027  	googleapi.ServerResponse `json:"-"`
  4028  	// ForceSendFields is a list of field names (e.g. "CommitTime") to
  4029  	// unconditionally include in API requests. By default, fields with empty or
  4030  	// default values are omitted from API requests. See
  4031  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4032  	// details.
  4033  	ForceSendFields []string `json:"-"`
  4034  	// NullFields is a list of field names (e.g. "CommitTime") to include in API
  4035  	// requests with the JSON null value. By default, fields with empty values are
  4036  	// omitted from API requests. See
  4037  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4038  	NullFields []string `json:"-"`
  4039  }
  4040  
  4041  func (s *WriteResponse) MarshalJSON() ([]byte, error) {
  4042  	type NoMethod WriteResponse
  4043  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4044  }
  4045  
  4046  // WriteResult: The result of applying a write.
  4047  type WriteResult struct {
  4048  	// TransformResults: The results of applying each
  4049  	// DocumentTransform.FieldTransform, in the same order.
  4050  	TransformResults []*Value `json:"transformResults,omitempty"`
  4051  	// UpdateTime: The last update time of the document after applying the write.
  4052  	// Not set after a `delete`. If the write did not actually change the document,
  4053  	// this will be the previous update_time.
  4054  	UpdateTime string `json:"updateTime,omitempty"`
  4055  	// ForceSendFields is a list of field names (e.g. "TransformResults") to
  4056  	// unconditionally include in API requests. By default, fields with empty or
  4057  	// default values are omitted from API requests. See
  4058  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4059  	// details.
  4060  	ForceSendFields []string `json:"-"`
  4061  	// NullFields is a list of field names (e.g. "TransformResults") to include in
  4062  	// API requests with the JSON null value. By default, fields with empty values
  4063  	// are omitted from API requests. See
  4064  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4065  	NullFields []string `json:"-"`
  4066  }
  4067  
  4068  func (s *WriteResult) MarshalJSON() ([]byte, error) {
  4069  	type NoMethod WriteResult
  4070  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4071  }
  4072  
  4073  type ProjectsDatabasesCreateCall struct {
  4074  	s                              *Service
  4075  	parent                         string
  4076  	googlefirestoreadminv1database *GoogleFirestoreAdminV1Database
  4077  	urlParams_                     gensupport.URLParams
  4078  	ctx_                           context.Context
  4079  	header_                        http.Header
  4080  }
  4081  
  4082  // Create: Create a database.
  4083  //
  4084  // - parent: A parent name of the form `projects/{project_id}`.
  4085  func (r *ProjectsDatabasesService) Create(parent string, googlefirestoreadminv1database *GoogleFirestoreAdminV1Database) *ProjectsDatabasesCreateCall {
  4086  	c := &ProjectsDatabasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4087  	c.parent = parent
  4088  	c.googlefirestoreadminv1database = googlefirestoreadminv1database
  4089  	return c
  4090  }
  4091  
  4092  // DatabaseId sets the optional parameter "databaseId": Required. The ID to use
  4093  // for the database, which will become the final component of the database's
  4094  // resource name. This value should be 4-63 characters. Valid characters are
  4095  // /a-z-/ with first character a letter and the last a letter or a number. Must
  4096  // not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)"
  4097  // database id is also valid.
  4098  func (c *ProjectsDatabasesCreateCall) DatabaseId(databaseId string) *ProjectsDatabasesCreateCall {
  4099  	c.urlParams_.Set("databaseId", databaseId)
  4100  	return c
  4101  }
  4102  
  4103  // Fields allows partial responses to be retrieved. See
  4104  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4105  // details.
  4106  func (c *ProjectsDatabasesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCreateCall {
  4107  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4108  	return c
  4109  }
  4110  
  4111  // Context sets the context to be used in this call's Do method.
  4112  func (c *ProjectsDatabasesCreateCall) Context(ctx context.Context) *ProjectsDatabasesCreateCall {
  4113  	c.ctx_ = ctx
  4114  	return c
  4115  }
  4116  
  4117  // Header returns a http.Header that can be modified by the caller to add
  4118  // headers to the request.
  4119  func (c *ProjectsDatabasesCreateCall) Header() http.Header {
  4120  	if c.header_ == nil {
  4121  		c.header_ = make(http.Header)
  4122  	}
  4123  	return c.header_
  4124  }
  4125  
  4126  func (c *ProjectsDatabasesCreateCall) doRequest(alt string) (*http.Response, error) {
  4127  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4128  	var body io.Reader = nil
  4129  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1database)
  4130  	if err != nil {
  4131  		return nil, err
  4132  	}
  4133  	c.urlParams_.Set("alt", alt)
  4134  	c.urlParams_.Set("prettyPrint", "false")
  4135  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
  4136  	urls += "?" + c.urlParams_.Encode()
  4137  	req, err := http.NewRequest("POST", urls, body)
  4138  	if err != nil {
  4139  		return nil, err
  4140  	}
  4141  	req.Header = reqHeaders
  4142  	googleapi.Expand(req.URL, map[string]string{
  4143  		"parent": c.parent,
  4144  	})
  4145  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4146  }
  4147  
  4148  // Do executes the "firestore.projects.databases.create" call.
  4149  // Any non-2xx status code is an error. Response headers are in either
  4150  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4151  // returned at all) in error.(*googleapi.Error).Header. Use
  4152  // googleapi.IsNotModified to check whether the returned error was because
  4153  // http.StatusNotModified was returned.
  4154  func (c *ProjectsDatabasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4155  	gensupport.SetOptions(c.urlParams_, opts...)
  4156  	res, err := c.doRequest("json")
  4157  	if res != nil && res.StatusCode == http.StatusNotModified {
  4158  		if res.Body != nil {
  4159  			res.Body.Close()
  4160  		}
  4161  		return nil, gensupport.WrapError(&googleapi.Error{
  4162  			Code:   res.StatusCode,
  4163  			Header: res.Header,
  4164  		})
  4165  	}
  4166  	if err != nil {
  4167  		return nil, err
  4168  	}
  4169  	defer googleapi.CloseBody(res)
  4170  	if err := googleapi.CheckResponse(res); err != nil {
  4171  		return nil, gensupport.WrapError(err)
  4172  	}
  4173  	ret := &GoogleLongrunningOperation{
  4174  		ServerResponse: googleapi.ServerResponse{
  4175  			Header:         res.Header,
  4176  			HTTPStatusCode: res.StatusCode,
  4177  		},
  4178  	}
  4179  	target := &ret
  4180  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4181  		return nil, err
  4182  	}
  4183  	return ret, nil
  4184  }
  4185  
  4186  type ProjectsDatabasesDeleteCall struct {
  4187  	s          *Service
  4188  	name       string
  4189  	urlParams_ gensupport.URLParams
  4190  	ctx_       context.Context
  4191  	header_    http.Header
  4192  }
  4193  
  4194  // Delete: Deletes a database.
  4195  //
  4196  // - name: A name of the form `projects/{project_id}/databases/{database_id}`.
  4197  func (r *ProjectsDatabasesService) Delete(name string) *ProjectsDatabasesDeleteCall {
  4198  	c := &ProjectsDatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4199  	c.name = name
  4200  	return c
  4201  }
  4202  
  4203  // Etag sets the optional parameter "etag": The current etag of the Database.
  4204  // If an etag is provided and does not match the current etag of the database,
  4205  // deletion will be blocked and a FAILED_PRECONDITION error will be returned.
  4206  func (c *ProjectsDatabasesDeleteCall) Etag(etag string) *ProjectsDatabasesDeleteCall {
  4207  	c.urlParams_.Set("etag", etag)
  4208  	return c
  4209  }
  4210  
  4211  // Fields allows partial responses to be retrieved. See
  4212  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4213  // details.
  4214  func (c *ProjectsDatabasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDeleteCall {
  4215  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4216  	return c
  4217  }
  4218  
  4219  // Context sets the context to be used in this call's Do method.
  4220  func (c *ProjectsDatabasesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDeleteCall {
  4221  	c.ctx_ = ctx
  4222  	return c
  4223  }
  4224  
  4225  // Header returns a http.Header that can be modified by the caller to add
  4226  // headers to the request.
  4227  func (c *ProjectsDatabasesDeleteCall) Header() http.Header {
  4228  	if c.header_ == nil {
  4229  		c.header_ = make(http.Header)
  4230  	}
  4231  	return c.header_
  4232  }
  4233  
  4234  func (c *ProjectsDatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4235  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4236  	var body io.Reader = nil
  4237  	c.urlParams_.Set("alt", alt)
  4238  	c.urlParams_.Set("prettyPrint", "false")
  4239  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4240  	urls += "?" + c.urlParams_.Encode()
  4241  	req, err := http.NewRequest("DELETE", urls, body)
  4242  	if err != nil {
  4243  		return nil, err
  4244  	}
  4245  	req.Header = reqHeaders
  4246  	googleapi.Expand(req.URL, map[string]string{
  4247  		"name": c.name,
  4248  	})
  4249  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4250  }
  4251  
  4252  // Do executes the "firestore.projects.databases.delete" call.
  4253  // Any non-2xx status code is an error. Response headers are in either
  4254  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4255  // returned at all) in error.(*googleapi.Error).Header. Use
  4256  // googleapi.IsNotModified to check whether the returned error was because
  4257  // http.StatusNotModified was returned.
  4258  func (c *ProjectsDatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4259  	gensupport.SetOptions(c.urlParams_, opts...)
  4260  	res, err := c.doRequest("json")
  4261  	if res != nil && res.StatusCode == http.StatusNotModified {
  4262  		if res.Body != nil {
  4263  			res.Body.Close()
  4264  		}
  4265  		return nil, gensupport.WrapError(&googleapi.Error{
  4266  			Code:   res.StatusCode,
  4267  			Header: res.Header,
  4268  		})
  4269  	}
  4270  	if err != nil {
  4271  		return nil, err
  4272  	}
  4273  	defer googleapi.CloseBody(res)
  4274  	if err := googleapi.CheckResponse(res); err != nil {
  4275  		return nil, gensupport.WrapError(err)
  4276  	}
  4277  	ret := &GoogleLongrunningOperation{
  4278  		ServerResponse: googleapi.ServerResponse{
  4279  			Header:         res.Header,
  4280  			HTTPStatusCode: res.StatusCode,
  4281  		},
  4282  	}
  4283  	target := &ret
  4284  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4285  		return nil, err
  4286  	}
  4287  	return ret, nil
  4288  }
  4289  
  4290  type ProjectsDatabasesExportDocumentsCall struct {
  4291  	s                                            *Service
  4292  	name                                         string
  4293  	googlefirestoreadminv1exportdocumentsrequest *GoogleFirestoreAdminV1ExportDocumentsRequest
  4294  	urlParams_                                   gensupport.URLParams
  4295  	ctx_                                         context.Context
  4296  	header_                                      http.Header
  4297  }
  4298  
  4299  // ExportDocuments: Exports a copy of all or a subset of documents from Google
  4300  // Cloud Firestore to another storage system, such as Google Cloud Storage.
  4301  // Recent updates to documents may not be reflected in the export. The export
  4302  // occurs in the background and its progress can be monitored and managed via
  4303  // the Operation resource that is created. The output of an export may only be
  4304  // used once the associated operation is done. If an export operation is
  4305  // cancelled before completion it may leave partial data behind in Google Cloud
  4306  // Storage. For more details on export behavior and output format, refer to:
  4307  // https://cloud.google.com/firestore/docs/manage-data/export-import
  4308  //
  4309  //   - name: Database to export. Should be of the form:
  4310  //     `projects/{project_id}/databases/{database_id}`.
  4311  func (r *ProjectsDatabasesService) ExportDocuments(name string, googlefirestoreadminv1exportdocumentsrequest *GoogleFirestoreAdminV1ExportDocumentsRequest) *ProjectsDatabasesExportDocumentsCall {
  4312  	c := &ProjectsDatabasesExportDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4313  	c.name = name
  4314  	c.googlefirestoreadminv1exportdocumentsrequest = googlefirestoreadminv1exportdocumentsrequest
  4315  	return c
  4316  }
  4317  
  4318  // Fields allows partial responses to be retrieved. See
  4319  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4320  // details.
  4321  func (c *ProjectsDatabasesExportDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesExportDocumentsCall {
  4322  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4323  	return c
  4324  }
  4325  
  4326  // Context sets the context to be used in this call's Do method.
  4327  func (c *ProjectsDatabasesExportDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesExportDocumentsCall {
  4328  	c.ctx_ = ctx
  4329  	return c
  4330  }
  4331  
  4332  // Header returns a http.Header that can be modified by the caller to add
  4333  // headers to the request.
  4334  func (c *ProjectsDatabasesExportDocumentsCall) Header() http.Header {
  4335  	if c.header_ == nil {
  4336  		c.header_ = make(http.Header)
  4337  	}
  4338  	return c.header_
  4339  }
  4340  
  4341  func (c *ProjectsDatabasesExportDocumentsCall) doRequest(alt string) (*http.Response, error) {
  4342  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4343  	var body io.Reader = nil
  4344  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1exportdocumentsrequest)
  4345  	if err != nil {
  4346  		return nil, err
  4347  	}
  4348  	c.urlParams_.Set("alt", alt)
  4349  	c.urlParams_.Set("prettyPrint", "false")
  4350  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportDocuments")
  4351  	urls += "?" + c.urlParams_.Encode()
  4352  	req, err := http.NewRequest("POST", urls, body)
  4353  	if err != nil {
  4354  		return nil, err
  4355  	}
  4356  	req.Header = reqHeaders
  4357  	googleapi.Expand(req.URL, map[string]string{
  4358  		"name": c.name,
  4359  	})
  4360  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4361  }
  4362  
  4363  // Do executes the "firestore.projects.databases.exportDocuments" call.
  4364  // Any non-2xx status code is an error. Response headers are in either
  4365  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4366  // returned at all) in error.(*googleapi.Error).Header. Use
  4367  // googleapi.IsNotModified to check whether the returned error was because
  4368  // http.StatusNotModified was returned.
  4369  func (c *ProjectsDatabasesExportDocumentsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4370  	gensupport.SetOptions(c.urlParams_, opts...)
  4371  	res, err := c.doRequest("json")
  4372  	if res != nil && res.StatusCode == http.StatusNotModified {
  4373  		if res.Body != nil {
  4374  			res.Body.Close()
  4375  		}
  4376  		return nil, gensupport.WrapError(&googleapi.Error{
  4377  			Code:   res.StatusCode,
  4378  			Header: res.Header,
  4379  		})
  4380  	}
  4381  	if err != nil {
  4382  		return nil, err
  4383  	}
  4384  	defer googleapi.CloseBody(res)
  4385  	if err := googleapi.CheckResponse(res); err != nil {
  4386  		return nil, gensupport.WrapError(err)
  4387  	}
  4388  	ret := &GoogleLongrunningOperation{
  4389  		ServerResponse: googleapi.ServerResponse{
  4390  			Header:         res.Header,
  4391  			HTTPStatusCode: res.StatusCode,
  4392  		},
  4393  	}
  4394  	target := &ret
  4395  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4396  		return nil, err
  4397  	}
  4398  	return ret, nil
  4399  }
  4400  
  4401  type ProjectsDatabasesGetCall struct {
  4402  	s            *Service
  4403  	name         string
  4404  	urlParams_   gensupport.URLParams
  4405  	ifNoneMatch_ string
  4406  	ctx_         context.Context
  4407  	header_      http.Header
  4408  }
  4409  
  4410  // Get: Gets information about a database.
  4411  //
  4412  // - name: A name of the form `projects/{project_id}/databases/{database_id}`.
  4413  func (r *ProjectsDatabasesService) Get(name string) *ProjectsDatabasesGetCall {
  4414  	c := &ProjectsDatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4415  	c.name = name
  4416  	return c
  4417  }
  4418  
  4419  // Fields allows partial responses to be retrieved. See
  4420  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4421  // details.
  4422  func (c *ProjectsDatabasesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesGetCall {
  4423  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4424  	return c
  4425  }
  4426  
  4427  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4428  // object's ETag matches the given value. This is useful for getting updates
  4429  // only after the object has changed since the last request.
  4430  func (c *ProjectsDatabasesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesGetCall {
  4431  	c.ifNoneMatch_ = entityTag
  4432  	return c
  4433  }
  4434  
  4435  // Context sets the context to be used in this call's Do method.
  4436  func (c *ProjectsDatabasesGetCall) Context(ctx context.Context) *ProjectsDatabasesGetCall {
  4437  	c.ctx_ = ctx
  4438  	return c
  4439  }
  4440  
  4441  // Header returns a http.Header that can be modified by the caller to add
  4442  // headers to the request.
  4443  func (c *ProjectsDatabasesGetCall) Header() http.Header {
  4444  	if c.header_ == nil {
  4445  		c.header_ = make(http.Header)
  4446  	}
  4447  	return c.header_
  4448  }
  4449  
  4450  func (c *ProjectsDatabasesGetCall) doRequest(alt string) (*http.Response, error) {
  4451  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4452  	if c.ifNoneMatch_ != "" {
  4453  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4454  	}
  4455  	var body io.Reader = nil
  4456  	c.urlParams_.Set("alt", alt)
  4457  	c.urlParams_.Set("prettyPrint", "false")
  4458  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4459  	urls += "?" + c.urlParams_.Encode()
  4460  	req, err := http.NewRequest("GET", urls, body)
  4461  	if err != nil {
  4462  		return nil, err
  4463  	}
  4464  	req.Header = reqHeaders
  4465  	googleapi.Expand(req.URL, map[string]string{
  4466  		"name": c.name,
  4467  	})
  4468  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4469  }
  4470  
  4471  // Do executes the "firestore.projects.databases.get" call.
  4472  // Any non-2xx status code is an error. Response headers are in either
  4473  // *GoogleFirestoreAdminV1Database.ServerResponse.Header or (if a response was
  4474  // returned at all) in error.(*googleapi.Error).Header. Use
  4475  // googleapi.IsNotModified to check whether the returned error was because
  4476  // http.StatusNotModified was returned.
  4477  func (c *ProjectsDatabasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Database, error) {
  4478  	gensupport.SetOptions(c.urlParams_, opts...)
  4479  	res, err := c.doRequest("json")
  4480  	if res != nil && res.StatusCode == http.StatusNotModified {
  4481  		if res.Body != nil {
  4482  			res.Body.Close()
  4483  		}
  4484  		return nil, gensupport.WrapError(&googleapi.Error{
  4485  			Code:   res.StatusCode,
  4486  			Header: res.Header,
  4487  		})
  4488  	}
  4489  	if err != nil {
  4490  		return nil, err
  4491  	}
  4492  	defer googleapi.CloseBody(res)
  4493  	if err := googleapi.CheckResponse(res); err != nil {
  4494  		return nil, gensupport.WrapError(err)
  4495  	}
  4496  	ret := &GoogleFirestoreAdminV1Database{
  4497  		ServerResponse: googleapi.ServerResponse{
  4498  			Header:         res.Header,
  4499  			HTTPStatusCode: res.StatusCode,
  4500  		},
  4501  	}
  4502  	target := &ret
  4503  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4504  		return nil, err
  4505  	}
  4506  	return ret, nil
  4507  }
  4508  
  4509  type ProjectsDatabasesImportDocumentsCall struct {
  4510  	s                                            *Service
  4511  	name                                         string
  4512  	googlefirestoreadminv1importdocumentsrequest *GoogleFirestoreAdminV1ImportDocumentsRequest
  4513  	urlParams_                                   gensupport.URLParams
  4514  	ctx_                                         context.Context
  4515  	header_                                      http.Header
  4516  }
  4517  
  4518  // ImportDocuments: Imports documents into Google Cloud Firestore. Existing
  4519  // documents with the same name are overwritten. The import occurs in the
  4520  // background and its progress can be monitored and managed via the Operation
  4521  // resource that is created. If an ImportDocuments operation is cancelled, it
  4522  // is possible that a subset of the data has already been imported to Cloud
  4523  // Firestore.
  4524  //
  4525  //   - name: Database to import into. Should be of the form:
  4526  //     `projects/{project_id}/databases/{database_id}`.
  4527  func (r *ProjectsDatabasesService) ImportDocuments(name string, googlefirestoreadminv1importdocumentsrequest *GoogleFirestoreAdminV1ImportDocumentsRequest) *ProjectsDatabasesImportDocumentsCall {
  4528  	c := &ProjectsDatabasesImportDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4529  	c.name = name
  4530  	c.googlefirestoreadminv1importdocumentsrequest = googlefirestoreadminv1importdocumentsrequest
  4531  	return c
  4532  }
  4533  
  4534  // Fields allows partial responses to be retrieved. See
  4535  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4536  // details.
  4537  func (c *ProjectsDatabasesImportDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesImportDocumentsCall {
  4538  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4539  	return c
  4540  }
  4541  
  4542  // Context sets the context to be used in this call's Do method.
  4543  func (c *ProjectsDatabasesImportDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesImportDocumentsCall {
  4544  	c.ctx_ = ctx
  4545  	return c
  4546  }
  4547  
  4548  // Header returns a http.Header that can be modified by the caller to add
  4549  // headers to the request.
  4550  func (c *ProjectsDatabasesImportDocumentsCall) Header() http.Header {
  4551  	if c.header_ == nil {
  4552  		c.header_ = make(http.Header)
  4553  	}
  4554  	return c.header_
  4555  }
  4556  
  4557  func (c *ProjectsDatabasesImportDocumentsCall) doRequest(alt string) (*http.Response, error) {
  4558  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4559  	var body io.Reader = nil
  4560  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1importdocumentsrequest)
  4561  	if err != nil {
  4562  		return nil, err
  4563  	}
  4564  	c.urlParams_.Set("alt", alt)
  4565  	c.urlParams_.Set("prettyPrint", "false")
  4566  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:importDocuments")
  4567  	urls += "?" + c.urlParams_.Encode()
  4568  	req, err := http.NewRequest("POST", urls, body)
  4569  	if err != nil {
  4570  		return nil, err
  4571  	}
  4572  	req.Header = reqHeaders
  4573  	googleapi.Expand(req.URL, map[string]string{
  4574  		"name": c.name,
  4575  	})
  4576  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4577  }
  4578  
  4579  // Do executes the "firestore.projects.databases.importDocuments" call.
  4580  // Any non-2xx status code is an error. Response headers are in either
  4581  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4582  // returned at all) in error.(*googleapi.Error).Header. Use
  4583  // googleapi.IsNotModified to check whether the returned error was because
  4584  // http.StatusNotModified was returned.
  4585  func (c *ProjectsDatabasesImportDocumentsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4586  	gensupport.SetOptions(c.urlParams_, opts...)
  4587  	res, err := c.doRequest("json")
  4588  	if res != nil && res.StatusCode == http.StatusNotModified {
  4589  		if res.Body != nil {
  4590  			res.Body.Close()
  4591  		}
  4592  		return nil, gensupport.WrapError(&googleapi.Error{
  4593  			Code:   res.StatusCode,
  4594  			Header: res.Header,
  4595  		})
  4596  	}
  4597  	if err != nil {
  4598  		return nil, err
  4599  	}
  4600  	defer googleapi.CloseBody(res)
  4601  	if err := googleapi.CheckResponse(res); err != nil {
  4602  		return nil, gensupport.WrapError(err)
  4603  	}
  4604  	ret := &GoogleLongrunningOperation{
  4605  		ServerResponse: googleapi.ServerResponse{
  4606  			Header:         res.Header,
  4607  			HTTPStatusCode: res.StatusCode,
  4608  		},
  4609  	}
  4610  	target := &ret
  4611  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4612  		return nil, err
  4613  	}
  4614  	return ret, nil
  4615  }
  4616  
  4617  type ProjectsDatabasesListCall struct {
  4618  	s            *Service
  4619  	parent       string
  4620  	urlParams_   gensupport.URLParams
  4621  	ifNoneMatch_ string
  4622  	ctx_         context.Context
  4623  	header_      http.Header
  4624  }
  4625  
  4626  // List: List all the databases in the project.
  4627  //
  4628  // - parent: A parent name of the form `projects/{project_id}`.
  4629  func (r *ProjectsDatabasesService) List(parent string) *ProjectsDatabasesListCall {
  4630  	c := &ProjectsDatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4631  	c.parent = parent
  4632  	return c
  4633  }
  4634  
  4635  // ShowDeleted sets the optional parameter "showDeleted": If true, also returns
  4636  // deleted resources.
  4637  func (c *ProjectsDatabasesListCall) ShowDeleted(showDeleted bool) *ProjectsDatabasesListCall {
  4638  	c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  4639  	return c
  4640  }
  4641  
  4642  // Fields allows partial responses to be retrieved. See
  4643  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4644  // details.
  4645  func (c *ProjectsDatabasesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesListCall {
  4646  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4647  	return c
  4648  }
  4649  
  4650  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4651  // object's ETag matches the given value. This is useful for getting updates
  4652  // only after the object has changed since the last request.
  4653  func (c *ProjectsDatabasesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesListCall {
  4654  	c.ifNoneMatch_ = entityTag
  4655  	return c
  4656  }
  4657  
  4658  // Context sets the context to be used in this call's Do method.
  4659  func (c *ProjectsDatabasesListCall) Context(ctx context.Context) *ProjectsDatabasesListCall {
  4660  	c.ctx_ = ctx
  4661  	return c
  4662  }
  4663  
  4664  // Header returns a http.Header that can be modified by the caller to add
  4665  // headers to the request.
  4666  func (c *ProjectsDatabasesListCall) Header() http.Header {
  4667  	if c.header_ == nil {
  4668  		c.header_ = make(http.Header)
  4669  	}
  4670  	return c.header_
  4671  }
  4672  
  4673  func (c *ProjectsDatabasesListCall) doRequest(alt string) (*http.Response, error) {
  4674  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4675  	if c.ifNoneMatch_ != "" {
  4676  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4677  	}
  4678  	var body io.Reader = nil
  4679  	c.urlParams_.Set("alt", alt)
  4680  	c.urlParams_.Set("prettyPrint", "false")
  4681  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
  4682  	urls += "?" + c.urlParams_.Encode()
  4683  	req, err := http.NewRequest("GET", urls, body)
  4684  	if err != nil {
  4685  		return nil, err
  4686  	}
  4687  	req.Header = reqHeaders
  4688  	googleapi.Expand(req.URL, map[string]string{
  4689  		"parent": c.parent,
  4690  	})
  4691  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4692  }
  4693  
  4694  // Do executes the "firestore.projects.databases.list" call.
  4695  // Any non-2xx status code is an error. Response headers are in either
  4696  // *GoogleFirestoreAdminV1ListDatabasesResponse.ServerResponse.Header or (if a
  4697  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4698  // googleapi.IsNotModified to check whether the returned error was because
  4699  // http.StatusNotModified was returned.
  4700  func (c *ProjectsDatabasesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListDatabasesResponse, error) {
  4701  	gensupport.SetOptions(c.urlParams_, opts...)
  4702  	res, err := c.doRequest("json")
  4703  	if res != nil && res.StatusCode == http.StatusNotModified {
  4704  		if res.Body != nil {
  4705  			res.Body.Close()
  4706  		}
  4707  		return nil, gensupport.WrapError(&googleapi.Error{
  4708  			Code:   res.StatusCode,
  4709  			Header: res.Header,
  4710  		})
  4711  	}
  4712  	if err != nil {
  4713  		return nil, err
  4714  	}
  4715  	defer googleapi.CloseBody(res)
  4716  	if err := googleapi.CheckResponse(res); err != nil {
  4717  		return nil, gensupport.WrapError(err)
  4718  	}
  4719  	ret := &GoogleFirestoreAdminV1ListDatabasesResponse{
  4720  		ServerResponse: googleapi.ServerResponse{
  4721  			Header:         res.Header,
  4722  			HTTPStatusCode: res.StatusCode,
  4723  		},
  4724  	}
  4725  	target := &ret
  4726  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4727  		return nil, err
  4728  	}
  4729  	return ret, nil
  4730  }
  4731  
  4732  type ProjectsDatabasesPatchCall struct {
  4733  	s                              *Service
  4734  	name                           string
  4735  	googlefirestoreadminv1database *GoogleFirestoreAdminV1Database
  4736  	urlParams_                     gensupport.URLParams
  4737  	ctx_                           context.Context
  4738  	header_                        http.Header
  4739  }
  4740  
  4741  // Patch: Updates a database.
  4742  //
  4743  //   - name: The resource name of the Database. Format:
  4744  //     `projects/{project}/databases/{database}`.
  4745  func (r *ProjectsDatabasesService) Patch(name string, googlefirestoreadminv1database *GoogleFirestoreAdminV1Database) *ProjectsDatabasesPatchCall {
  4746  	c := &ProjectsDatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4747  	c.name = name
  4748  	c.googlefirestoreadminv1database = googlefirestoreadminv1database
  4749  	return c
  4750  }
  4751  
  4752  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  4753  // be updated.
  4754  func (c *ProjectsDatabasesPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesPatchCall {
  4755  	c.urlParams_.Set("updateMask", updateMask)
  4756  	return c
  4757  }
  4758  
  4759  // Fields allows partial responses to be retrieved. See
  4760  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4761  // details.
  4762  func (c *ProjectsDatabasesPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesPatchCall {
  4763  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4764  	return c
  4765  }
  4766  
  4767  // Context sets the context to be used in this call's Do method.
  4768  func (c *ProjectsDatabasesPatchCall) Context(ctx context.Context) *ProjectsDatabasesPatchCall {
  4769  	c.ctx_ = ctx
  4770  	return c
  4771  }
  4772  
  4773  // Header returns a http.Header that can be modified by the caller to add
  4774  // headers to the request.
  4775  func (c *ProjectsDatabasesPatchCall) Header() http.Header {
  4776  	if c.header_ == nil {
  4777  		c.header_ = make(http.Header)
  4778  	}
  4779  	return c.header_
  4780  }
  4781  
  4782  func (c *ProjectsDatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
  4783  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4784  	var body io.Reader = nil
  4785  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1database)
  4786  	if err != nil {
  4787  		return nil, err
  4788  	}
  4789  	c.urlParams_.Set("alt", alt)
  4790  	c.urlParams_.Set("prettyPrint", "false")
  4791  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4792  	urls += "?" + c.urlParams_.Encode()
  4793  	req, err := http.NewRequest("PATCH", urls, body)
  4794  	if err != nil {
  4795  		return nil, err
  4796  	}
  4797  	req.Header = reqHeaders
  4798  	googleapi.Expand(req.URL, map[string]string{
  4799  		"name": c.name,
  4800  	})
  4801  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4802  }
  4803  
  4804  // Do executes the "firestore.projects.databases.patch" call.
  4805  // Any non-2xx status code is an error. Response headers are in either
  4806  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4807  // returned at all) in error.(*googleapi.Error).Header. Use
  4808  // googleapi.IsNotModified to check whether the returned error was because
  4809  // http.StatusNotModified was returned.
  4810  func (c *ProjectsDatabasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4811  	gensupport.SetOptions(c.urlParams_, opts...)
  4812  	res, err := c.doRequest("json")
  4813  	if res != nil && res.StatusCode == http.StatusNotModified {
  4814  		if res.Body != nil {
  4815  			res.Body.Close()
  4816  		}
  4817  		return nil, gensupport.WrapError(&googleapi.Error{
  4818  			Code:   res.StatusCode,
  4819  			Header: res.Header,
  4820  		})
  4821  	}
  4822  	if err != nil {
  4823  		return nil, err
  4824  	}
  4825  	defer googleapi.CloseBody(res)
  4826  	if err := googleapi.CheckResponse(res); err != nil {
  4827  		return nil, gensupport.WrapError(err)
  4828  	}
  4829  	ret := &GoogleLongrunningOperation{
  4830  		ServerResponse: googleapi.ServerResponse{
  4831  			Header:         res.Header,
  4832  			HTTPStatusCode: res.StatusCode,
  4833  		},
  4834  	}
  4835  	target := &ret
  4836  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4837  		return nil, err
  4838  	}
  4839  	return ret, nil
  4840  }
  4841  
  4842  type ProjectsDatabasesRestoreCall struct {
  4843  	s                                            *Service
  4844  	parent                                       string
  4845  	googlefirestoreadminv1restoredatabaserequest *GoogleFirestoreAdminV1RestoreDatabaseRequest
  4846  	urlParams_                                   gensupport.URLParams
  4847  	ctx_                                         context.Context
  4848  	header_                                      http.Header
  4849  }
  4850  
  4851  // Restore: Creates a new database by restoring from an existing backup. The
  4852  // new database must be in the same cloud region or multi-region location as
  4853  // the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase
  4854  // except instead of creating a new empty database, a new database is created
  4855  // with the database type, index configuration, and documents from an existing
  4856  // backup. The long-running operation can be used to track the progress of the
  4857  // restore, with the Operation's metadata field type being the
  4858  // RestoreDatabaseMetadata. The response type is the Database if the restore
  4859  // was successful. The new database is not readable or writeable until the LRO
  4860  // has completed.
  4861  //
  4862  //   - parent: The project to restore the database in. Format is
  4863  //     `projects/{project_id}`.
  4864  func (r *ProjectsDatabasesService) Restore(parent string, googlefirestoreadminv1restoredatabaserequest *GoogleFirestoreAdminV1RestoreDatabaseRequest) *ProjectsDatabasesRestoreCall {
  4865  	c := &ProjectsDatabasesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4866  	c.parent = parent
  4867  	c.googlefirestoreadminv1restoredatabaserequest = googlefirestoreadminv1restoredatabaserequest
  4868  	return c
  4869  }
  4870  
  4871  // Fields allows partial responses to be retrieved. See
  4872  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4873  // details.
  4874  func (c *ProjectsDatabasesRestoreCall) Fields(s ...googleapi.Field) *ProjectsDatabasesRestoreCall {
  4875  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4876  	return c
  4877  }
  4878  
  4879  // Context sets the context to be used in this call's Do method.
  4880  func (c *ProjectsDatabasesRestoreCall) Context(ctx context.Context) *ProjectsDatabasesRestoreCall {
  4881  	c.ctx_ = ctx
  4882  	return c
  4883  }
  4884  
  4885  // Header returns a http.Header that can be modified by the caller to add
  4886  // headers to the request.
  4887  func (c *ProjectsDatabasesRestoreCall) Header() http.Header {
  4888  	if c.header_ == nil {
  4889  		c.header_ = make(http.Header)
  4890  	}
  4891  	return c.header_
  4892  }
  4893  
  4894  func (c *ProjectsDatabasesRestoreCall) doRequest(alt string) (*http.Response, error) {
  4895  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4896  	var body io.Reader = nil
  4897  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1restoredatabaserequest)
  4898  	if err != nil {
  4899  		return nil, err
  4900  	}
  4901  	c.urlParams_.Set("alt", alt)
  4902  	c.urlParams_.Set("prettyPrint", "false")
  4903  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases:restore")
  4904  	urls += "?" + c.urlParams_.Encode()
  4905  	req, err := http.NewRequest("POST", urls, body)
  4906  	if err != nil {
  4907  		return nil, err
  4908  	}
  4909  	req.Header = reqHeaders
  4910  	googleapi.Expand(req.URL, map[string]string{
  4911  		"parent": c.parent,
  4912  	})
  4913  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4914  }
  4915  
  4916  // Do executes the "firestore.projects.databases.restore" call.
  4917  // Any non-2xx status code is an error. Response headers are in either
  4918  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4919  // returned at all) in error.(*googleapi.Error).Header. Use
  4920  // googleapi.IsNotModified to check whether the returned error was because
  4921  // http.StatusNotModified was returned.
  4922  func (c *ProjectsDatabasesRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4923  	gensupport.SetOptions(c.urlParams_, opts...)
  4924  	res, err := c.doRequest("json")
  4925  	if res != nil && res.StatusCode == http.StatusNotModified {
  4926  		if res.Body != nil {
  4927  			res.Body.Close()
  4928  		}
  4929  		return nil, gensupport.WrapError(&googleapi.Error{
  4930  			Code:   res.StatusCode,
  4931  			Header: res.Header,
  4932  		})
  4933  	}
  4934  	if err != nil {
  4935  		return nil, err
  4936  	}
  4937  	defer googleapi.CloseBody(res)
  4938  	if err := googleapi.CheckResponse(res); err != nil {
  4939  		return nil, gensupport.WrapError(err)
  4940  	}
  4941  	ret := &GoogleLongrunningOperation{
  4942  		ServerResponse: googleapi.ServerResponse{
  4943  			Header:         res.Header,
  4944  			HTTPStatusCode: res.StatusCode,
  4945  		},
  4946  	}
  4947  	target := &ret
  4948  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4949  		return nil, err
  4950  	}
  4951  	return ret, nil
  4952  }
  4953  
  4954  type ProjectsDatabasesBackupSchedulesCreateCall struct {
  4955  	s                                    *Service
  4956  	parent                               string
  4957  	googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule
  4958  	urlParams_                           gensupport.URLParams
  4959  	ctx_                                 context.Context
  4960  	header_                              http.Header
  4961  }
  4962  
  4963  // Create: Creates a backup schedule on a database. At most two backup
  4964  // schedules can be configured on a database, one daily backup schedule and one
  4965  // weekly backup schedule.
  4966  //
  4967  //   - parent: The parent database. Format
  4968  //     `projects/{project}/databases/{database}`.
  4969  func (r *ProjectsDatabasesBackupSchedulesService) Create(parent string, googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule) *ProjectsDatabasesBackupSchedulesCreateCall {
  4970  	c := &ProjectsDatabasesBackupSchedulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4971  	c.parent = parent
  4972  	c.googlefirestoreadminv1backupschedule = googlefirestoreadminv1backupschedule
  4973  	return c
  4974  }
  4975  
  4976  // Fields allows partial responses to be retrieved. See
  4977  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4978  // details.
  4979  func (c *ProjectsDatabasesBackupSchedulesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesCreateCall {
  4980  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4981  	return c
  4982  }
  4983  
  4984  // Context sets the context to be used in this call's Do method.
  4985  func (c *ProjectsDatabasesBackupSchedulesCreateCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesCreateCall {
  4986  	c.ctx_ = ctx
  4987  	return c
  4988  }
  4989  
  4990  // Header returns a http.Header that can be modified by the caller to add
  4991  // headers to the request.
  4992  func (c *ProjectsDatabasesBackupSchedulesCreateCall) Header() http.Header {
  4993  	if c.header_ == nil {
  4994  		c.header_ = make(http.Header)
  4995  	}
  4996  	return c.header_
  4997  }
  4998  
  4999  func (c *ProjectsDatabasesBackupSchedulesCreateCall) doRequest(alt string) (*http.Response, error) {
  5000  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5001  	var body io.Reader = nil
  5002  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1backupschedule)
  5003  	if err != nil {
  5004  		return nil, err
  5005  	}
  5006  	c.urlParams_.Set("alt", alt)
  5007  	c.urlParams_.Set("prettyPrint", "false")
  5008  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupSchedules")
  5009  	urls += "?" + c.urlParams_.Encode()
  5010  	req, err := http.NewRequest("POST", urls, body)
  5011  	if err != nil {
  5012  		return nil, err
  5013  	}
  5014  	req.Header = reqHeaders
  5015  	googleapi.Expand(req.URL, map[string]string{
  5016  		"parent": c.parent,
  5017  	})
  5018  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5019  }
  5020  
  5021  // Do executes the "firestore.projects.databases.backupSchedules.create" call.
  5022  // Any non-2xx status code is an error. Response headers are in either
  5023  // *GoogleFirestoreAdminV1BackupSchedule.ServerResponse.Header or (if a
  5024  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5025  // googleapi.IsNotModified to check whether the returned error was because
  5026  // http.StatusNotModified was returned.
  5027  func (c *ProjectsDatabasesBackupSchedulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) {
  5028  	gensupport.SetOptions(c.urlParams_, opts...)
  5029  	res, err := c.doRequest("json")
  5030  	if res != nil && res.StatusCode == http.StatusNotModified {
  5031  		if res.Body != nil {
  5032  			res.Body.Close()
  5033  		}
  5034  		return nil, gensupport.WrapError(&googleapi.Error{
  5035  			Code:   res.StatusCode,
  5036  			Header: res.Header,
  5037  		})
  5038  	}
  5039  	if err != nil {
  5040  		return nil, err
  5041  	}
  5042  	defer googleapi.CloseBody(res)
  5043  	if err := googleapi.CheckResponse(res); err != nil {
  5044  		return nil, gensupport.WrapError(err)
  5045  	}
  5046  	ret := &GoogleFirestoreAdminV1BackupSchedule{
  5047  		ServerResponse: googleapi.ServerResponse{
  5048  			Header:         res.Header,
  5049  			HTTPStatusCode: res.StatusCode,
  5050  		},
  5051  	}
  5052  	target := &ret
  5053  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5054  		return nil, err
  5055  	}
  5056  	return ret, nil
  5057  }
  5058  
  5059  type ProjectsDatabasesBackupSchedulesDeleteCall struct {
  5060  	s          *Service
  5061  	name       string
  5062  	urlParams_ gensupport.URLParams
  5063  	ctx_       context.Context
  5064  	header_    http.Header
  5065  }
  5066  
  5067  // Delete: Deletes a backup schedule.
  5068  //
  5069  //   - name: The name of the backup schedule. Format
  5070  //     `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`.
  5071  func (r *ProjectsDatabasesBackupSchedulesService) Delete(name string) *ProjectsDatabasesBackupSchedulesDeleteCall {
  5072  	c := &ProjectsDatabasesBackupSchedulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5073  	c.name = name
  5074  	return c
  5075  }
  5076  
  5077  // Fields allows partial responses to be retrieved. See
  5078  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5079  // details.
  5080  func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesDeleteCall {
  5081  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5082  	return c
  5083  }
  5084  
  5085  // Context sets the context to be used in this call's Do method.
  5086  func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesDeleteCall {
  5087  	c.ctx_ = ctx
  5088  	return c
  5089  }
  5090  
  5091  // Header returns a http.Header that can be modified by the caller to add
  5092  // headers to the request.
  5093  func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Header() http.Header {
  5094  	if c.header_ == nil {
  5095  		c.header_ = make(http.Header)
  5096  	}
  5097  	return c.header_
  5098  }
  5099  
  5100  func (c *ProjectsDatabasesBackupSchedulesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5101  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5102  	var body io.Reader = nil
  5103  	c.urlParams_.Set("alt", alt)
  5104  	c.urlParams_.Set("prettyPrint", "false")
  5105  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5106  	urls += "?" + c.urlParams_.Encode()
  5107  	req, err := http.NewRequest("DELETE", urls, body)
  5108  	if err != nil {
  5109  		return nil, err
  5110  	}
  5111  	req.Header = reqHeaders
  5112  	googleapi.Expand(req.URL, map[string]string{
  5113  		"name": c.name,
  5114  	})
  5115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5116  }
  5117  
  5118  // Do executes the "firestore.projects.databases.backupSchedules.delete" call.
  5119  // Any non-2xx status code is an error. Response headers are in either
  5120  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5121  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5122  // whether the returned error was because http.StatusNotModified was returned.
  5123  func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5124  	gensupport.SetOptions(c.urlParams_, opts...)
  5125  	res, err := c.doRequest("json")
  5126  	if res != nil && res.StatusCode == http.StatusNotModified {
  5127  		if res.Body != nil {
  5128  			res.Body.Close()
  5129  		}
  5130  		return nil, gensupport.WrapError(&googleapi.Error{
  5131  			Code:   res.StatusCode,
  5132  			Header: res.Header,
  5133  		})
  5134  	}
  5135  	if err != nil {
  5136  		return nil, err
  5137  	}
  5138  	defer googleapi.CloseBody(res)
  5139  	if err := googleapi.CheckResponse(res); err != nil {
  5140  		return nil, gensupport.WrapError(err)
  5141  	}
  5142  	ret := &Empty{
  5143  		ServerResponse: googleapi.ServerResponse{
  5144  			Header:         res.Header,
  5145  			HTTPStatusCode: res.StatusCode,
  5146  		},
  5147  	}
  5148  	target := &ret
  5149  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5150  		return nil, err
  5151  	}
  5152  	return ret, nil
  5153  }
  5154  
  5155  type ProjectsDatabasesBackupSchedulesGetCall struct {
  5156  	s            *Service
  5157  	name         string
  5158  	urlParams_   gensupport.URLParams
  5159  	ifNoneMatch_ string
  5160  	ctx_         context.Context
  5161  	header_      http.Header
  5162  }
  5163  
  5164  // Get: Gets information about a backup schedule.
  5165  //
  5166  //   - name: The name of the backup schedule. Format
  5167  //     `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`.
  5168  func (r *ProjectsDatabasesBackupSchedulesService) Get(name string) *ProjectsDatabasesBackupSchedulesGetCall {
  5169  	c := &ProjectsDatabasesBackupSchedulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5170  	c.name = name
  5171  	return c
  5172  }
  5173  
  5174  // Fields allows partial responses to be retrieved. See
  5175  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5176  // details.
  5177  func (c *ProjectsDatabasesBackupSchedulesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesGetCall {
  5178  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5179  	return c
  5180  }
  5181  
  5182  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5183  // object's ETag matches the given value. This is useful for getting updates
  5184  // only after the object has changed since the last request.
  5185  func (c *ProjectsDatabasesBackupSchedulesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesBackupSchedulesGetCall {
  5186  	c.ifNoneMatch_ = entityTag
  5187  	return c
  5188  }
  5189  
  5190  // Context sets the context to be used in this call's Do method.
  5191  func (c *ProjectsDatabasesBackupSchedulesGetCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesGetCall {
  5192  	c.ctx_ = ctx
  5193  	return c
  5194  }
  5195  
  5196  // Header returns a http.Header that can be modified by the caller to add
  5197  // headers to the request.
  5198  func (c *ProjectsDatabasesBackupSchedulesGetCall) Header() http.Header {
  5199  	if c.header_ == nil {
  5200  		c.header_ = make(http.Header)
  5201  	}
  5202  	return c.header_
  5203  }
  5204  
  5205  func (c *ProjectsDatabasesBackupSchedulesGetCall) doRequest(alt string) (*http.Response, error) {
  5206  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5207  	if c.ifNoneMatch_ != "" {
  5208  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5209  	}
  5210  	var body io.Reader = nil
  5211  	c.urlParams_.Set("alt", alt)
  5212  	c.urlParams_.Set("prettyPrint", "false")
  5213  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5214  	urls += "?" + c.urlParams_.Encode()
  5215  	req, err := http.NewRequest("GET", urls, body)
  5216  	if err != nil {
  5217  		return nil, err
  5218  	}
  5219  	req.Header = reqHeaders
  5220  	googleapi.Expand(req.URL, map[string]string{
  5221  		"name": c.name,
  5222  	})
  5223  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5224  }
  5225  
  5226  // Do executes the "firestore.projects.databases.backupSchedules.get" call.
  5227  // Any non-2xx status code is an error. Response headers are in either
  5228  // *GoogleFirestoreAdminV1BackupSchedule.ServerResponse.Header or (if a
  5229  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5230  // googleapi.IsNotModified to check whether the returned error was because
  5231  // http.StatusNotModified was returned.
  5232  func (c *ProjectsDatabasesBackupSchedulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) {
  5233  	gensupport.SetOptions(c.urlParams_, opts...)
  5234  	res, err := c.doRequest("json")
  5235  	if res != nil && res.StatusCode == http.StatusNotModified {
  5236  		if res.Body != nil {
  5237  			res.Body.Close()
  5238  		}
  5239  		return nil, gensupport.WrapError(&googleapi.Error{
  5240  			Code:   res.StatusCode,
  5241  			Header: res.Header,
  5242  		})
  5243  	}
  5244  	if err != nil {
  5245  		return nil, err
  5246  	}
  5247  	defer googleapi.CloseBody(res)
  5248  	if err := googleapi.CheckResponse(res); err != nil {
  5249  		return nil, gensupport.WrapError(err)
  5250  	}
  5251  	ret := &GoogleFirestoreAdminV1BackupSchedule{
  5252  		ServerResponse: googleapi.ServerResponse{
  5253  			Header:         res.Header,
  5254  			HTTPStatusCode: res.StatusCode,
  5255  		},
  5256  	}
  5257  	target := &ret
  5258  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5259  		return nil, err
  5260  	}
  5261  	return ret, nil
  5262  }
  5263  
  5264  type ProjectsDatabasesBackupSchedulesListCall struct {
  5265  	s            *Service
  5266  	parent       string
  5267  	urlParams_   gensupport.URLParams
  5268  	ifNoneMatch_ string
  5269  	ctx_         context.Context
  5270  	header_      http.Header
  5271  }
  5272  
  5273  // List: List backup schedules.
  5274  //
  5275  //   - parent: The parent database. Format is
  5276  //     `projects/{project}/databases/{database}`.
  5277  func (r *ProjectsDatabasesBackupSchedulesService) List(parent string) *ProjectsDatabasesBackupSchedulesListCall {
  5278  	c := &ProjectsDatabasesBackupSchedulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5279  	c.parent = parent
  5280  	return c
  5281  }
  5282  
  5283  // Fields allows partial responses to be retrieved. See
  5284  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5285  // details.
  5286  func (c *ProjectsDatabasesBackupSchedulesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesListCall {
  5287  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5288  	return c
  5289  }
  5290  
  5291  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5292  // object's ETag matches the given value. This is useful for getting updates
  5293  // only after the object has changed since the last request.
  5294  func (c *ProjectsDatabasesBackupSchedulesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesBackupSchedulesListCall {
  5295  	c.ifNoneMatch_ = entityTag
  5296  	return c
  5297  }
  5298  
  5299  // Context sets the context to be used in this call's Do method.
  5300  func (c *ProjectsDatabasesBackupSchedulesListCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesListCall {
  5301  	c.ctx_ = ctx
  5302  	return c
  5303  }
  5304  
  5305  // Header returns a http.Header that can be modified by the caller to add
  5306  // headers to the request.
  5307  func (c *ProjectsDatabasesBackupSchedulesListCall) Header() http.Header {
  5308  	if c.header_ == nil {
  5309  		c.header_ = make(http.Header)
  5310  	}
  5311  	return c.header_
  5312  }
  5313  
  5314  func (c *ProjectsDatabasesBackupSchedulesListCall) doRequest(alt string) (*http.Response, error) {
  5315  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5316  	if c.ifNoneMatch_ != "" {
  5317  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5318  	}
  5319  	var body io.Reader = nil
  5320  	c.urlParams_.Set("alt", alt)
  5321  	c.urlParams_.Set("prettyPrint", "false")
  5322  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupSchedules")
  5323  	urls += "?" + c.urlParams_.Encode()
  5324  	req, err := http.NewRequest("GET", urls, body)
  5325  	if err != nil {
  5326  		return nil, err
  5327  	}
  5328  	req.Header = reqHeaders
  5329  	googleapi.Expand(req.URL, map[string]string{
  5330  		"parent": c.parent,
  5331  	})
  5332  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5333  }
  5334  
  5335  // Do executes the "firestore.projects.databases.backupSchedules.list" call.
  5336  // Any non-2xx status code is an error. Response headers are in either
  5337  // *GoogleFirestoreAdminV1ListBackupSchedulesResponse.ServerResponse.Header or
  5338  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  5339  // googleapi.IsNotModified to check whether the returned error was because
  5340  // http.StatusNotModified was returned.
  5341  func (c *ProjectsDatabasesBackupSchedulesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListBackupSchedulesResponse, error) {
  5342  	gensupport.SetOptions(c.urlParams_, opts...)
  5343  	res, err := c.doRequest("json")
  5344  	if res != nil && res.StatusCode == http.StatusNotModified {
  5345  		if res.Body != nil {
  5346  			res.Body.Close()
  5347  		}
  5348  		return nil, gensupport.WrapError(&googleapi.Error{
  5349  			Code:   res.StatusCode,
  5350  			Header: res.Header,
  5351  		})
  5352  	}
  5353  	if err != nil {
  5354  		return nil, err
  5355  	}
  5356  	defer googleapi.CloseBody(res)
  5357  	if err := googleapi.CheckResponse(res); err != nil {
  5358  		return nil, gensupport.WrapError(err)
  5359  	}
  5360  	ret := &GoogleFirestoreAdminV1ListBackupSchedulesResponse{
  5361  		ServerResponse: googleapi.ServerResponse{
  5362  			Header:         res.Header,
  5363  			HTTPStatusCode: res.StatusCode,
  5364  		},
  5365  	}
  5366  	target := &ret
  5367  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5368  		return nil, err
  5369  	}
  5370  	return ret, nil
  5371  }
  5372  
  5373  type ProjectsDatabasesBackupSchedulesPatchCall struct {
  5374  	s                                    *Service
  5375  	nameid                               string
  5376  	googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule
  5377  	urlParams_                           gensupport.URLParams
  5378  	ctx_                                 context.Context
  5379  	header_                              http.Header
  5380  }
  5381  
  5382  // Patch: Updates a backup schedule.
  5383  //
  5384  //   - name: Output only. The unique backup schedule identifier across all
  5385  //     locations and databases for the given project. This will be auto-assigned.
  5386  //     Format is
  5387  //     `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`.
  5388  func (r *ProjectsDatabasesBackupSchedulesService) Patch(nameid string, googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule) *ProjectsDatabasesBackupSchedulesPatchCall {
  5389  	c := &ProjectsDatabasesBackupSchedulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5390  	c.nameid = nameid
  5391  	c.googlefirestoreadminv1backupschedule = googlefirestoreadminv1backupschedule
  5392  	return c
  5393  }
  5394  
  5395  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  5396  // be updated.
  5397  func (c *ProjectsDatabasesBackupSchedulesPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesBackupSchedulesPatchCall {
  5398  	c.urlParams_.Set("updateMask", updateMask)
  5399  	return c
  5400  }
  5401  
  5402  // Fields allows partial responses to be retrieved. See
  5403  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5404  // details.
  5405  func (c *ProjectsDatabasesBackupSchedulesPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesPatchCall {
  5406  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5407  	return c
  5408  }
  5409  
  5410  // Context sets the context to be used in this call's Do method.
  5411  func (c *ProjectsDatabasesBackupSchedulesPatchCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesPatchCall {
  5412  	c.ctx_ = ctx
  5413  	return c
  5414  }
  5415  
  5416  // Header returns a http.Header that can be modified by the caller to add
  5417  // headers to the request.
  5418  func (c *ProjectsDatabasesBackupSchedulesPatchCall) Header() http.Header {
  5419  	if c.header_ == nil {
  5420  		c.header_ = make(http.Header)
  5421  	}
  5422  	return c.header_
  5423  }
  5424  
  5425  func (c *ProjectsDatabasesBackupSchedulesPatchCall) doRequest(alt string) (*http.Response, error) {
  5426  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5427  	var body io.Reader = nil
  5428  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1backupschedule)
  5429  	if err != nil {
  5430  		return nil, err
  5431  	}
  5432  	c.urlParams_.Set("alt", alt)
  5433  	c.urlParams_.Set("prettyPrint", "false")
  5434  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5435  	urls += "?" + c.urlParams_.Encode()
  5436  	req, err := http.NewRequest("PATCH", urls, body)
  5437  	if err != nil {
  5438  		return nil, err
  5439  	}
  5440  	req.Header = reqHeaders
  5441  	googleapi.Expand(req.URL, map[string]string{
  5442  		"name": c.nameid,
  5443  	})
  5444  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5445  }
  5446  
  5447  // Do executes the "firestore.projects.databases.backupSchedules.patch" call.
  5448  // Any non-2xx status code is an error. Response headers are in either
  5449  // *GoogleFirestoreAdminV1BackupSchedule.ServerResponse.Header or (if a
  5450  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5451  // googleapi.IsNotModified to check whether the returned error was because
  5452  // http.StatusNotModified was returned.
  5453  func (c *ProjectsDatabasesBackupSchedulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) {
  5454  	gensupport.SetOptions(c.urlParams_, opts...)
  5455  	res, err := c.doRequest("json")
  5456  	if res != nil && res.StatusCode == http.StatusNotModified {
  5457  		if res.Body != nil {
  5458  			res.Body.Close()
  5459  		}
  5460  		return nil, gensupport.WrapError(&googleapi.Error{
  5461  			Code:   res.StatusCode,
  5462  			Header: res.Header,
  5463  		})
  5464  	}
  5465  	if err != nil {
  5466  		return nil, err
  5467  	}
  5468  	defer googleapi.CloseBody(res)
  5469  	if err := googleapi.CheckResponse(res); err != nil {
  5470  		return nil, gensupport.WrapError(err)
  5471  	}
  5472  	ret := &GoogleFirestoreAdminV1BackupSchedule{
  5473  		ServerResponse: googleapi.ServerResponse{
  5474  			Header:         res.Header,
  5475  			HTTPStatusCode: res.StatusCode,
  5476  		},
  5477  	}
  5478  	target := &ret
  5479  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5480  		return nil, err
  5481  	}
  5482  	return ret, nil
  5483  }
  5484  
  5485  type ProjectsDatabasesCollectionGroupsFieldsGetCall struct {
  5486  	s            *Service
  5487  	name         string
  5488  	urlParams_   gensupport.URLParams
  5489  	ifNoneMatch_ string
  5490  	ctx_         context.Context
  5491  	header_      http.Header
  5492  }
  5493  
  5494  // Get: Gets the metadata and configuration for a Field.
  5495  //
  5496  //   - name: A name of the form
  5497  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  5498  //     _id}/fields/{field_id}`.
  5499  func (r *ProjectsDatabasesCollectionGroupsFieldsService) Get(name string) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
  5500  	c := &ProjectsDatabasesCollectionGroupsFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5501  	c.name = name
  5502  	return c
  5503  }
  5504  
  5505  // Fields allows partial responses to be retrieved. See
  5506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5507  // details.
  5508  func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
  5509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5510  	return c
  5511  }
  5512  
  5513  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5514  // object's ETag matches the given value. This is useful for getting updates
  5515  // only after the object has changed since the last request.
  5516  func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
  5517  	c.ifNoneMatch_ = entityTag
  5518  	return c
  5519  }
  5520  
  5521  // Context sets the context to be used in this call's Do method.
  5522  func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
  5523  	c.ctx_ = ctx
  5524  	return c
  5525  }
  5526  
  5527  // Header returns a http.Header that can be modified by the caller to add
  5528  // headers to the request.
  5529  func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Header() http.Header {
  5530  	if c.header_ == nil {
  5531  		c.header_ = make(http.Header)
  5532  	}
  5533  	return c.header_
  5534  }
  5535  
  5536  func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) doRequest(alt string) (*http.Response, error) {
  5537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5538  	if c.ifNoneMatch_ != "" {
  5539  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5540  	}
  5541  	var body io.Reader = nil
  5542  	c.urlParams_.Set("alt", alt)
  5543  	c.urlParams_.Set("prettyPrint", "false")
  5544  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5545  	urls += "?" + c.urlParams_.Encode()
  5546  	req, err := http.NewRequest("GET", urls, body)
  5547  	if err != nil {
  5548  		return nil, err
  5549  	}
  5550  	req.Header = reqHeaders
  5551  	googleapi.Expand(req.URL, map[string]string{
  5552  		"name": c.name,
  5553  	})
  5554  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5555  }
  5556  
  5557  // Do executes the "firestore.projects.databases.collectionGroups.fields.get" call.
  5558  // Any non-2xx status code is an error. Response headers are in either
  5559  // *GoogleFirestoreAdminV1Field.ServerResponse.Header or (if a response was
  5560  // returned at all) in error.(*googleapi.Error).Header. Use
  5561  // googleapi.IsNotModified to check whether the returned error was because
  5562  // http.StatusNotModified was returned.
  5563  func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Field, error) {
  5564  	gensupport.SetOptions(c.urlParams_, opts...)
  5565  	res, err := c.doRequest("json")
  5566  	if res != nil && res.StatusCode == http.StatusNotModified {
  5567  		if res.Body != nil {
  5568  			res.Body.Close()
  5569  		}
  5570  		return nil, gensupport.WrapError(&googleapi.Error{
  5571  			Code:   res.StatusCode,
  5572  			Header: res.Header,
  5573  		})
  5574  	}
  5575  	if err != nil {
  5576  		return nil, err
  5577  	}
  5578  	defer googleapi.CloseBody(res)
  5579  	if err := googleapi.CheckResponse(res); err != nil {
  5580  		return nil, gensupport.WrapError(err)
  5581  	}
  5582  	ret := &GoogleFirestoreAdminV1Field{
  5583  		ServerResponse: googleapi.ServerResponse{
  5584  			Header:         res.Header,
  5585  			HTTPStatusCode: res.StatusCode,
  5586  		},
  5587  	}
  5588  	target := &ret
  5589  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5590  		return nil, err
  5591  	}
  5592  	return ret, nil
  5593  }
  5594  
  5595  type ProjectsDatabasesCollectionGroupsFieldsListCall struct {
  5596  	s            *Service
  5597  	parent       string
  5598  	urlParams_   gensupport.URLParams
  5599  	ifNoneMatch_ string
  5600  	ctx_         context.Context
  5601  	header_      http.Header
  5602  }
  5603  
  5604  // List: Lists the field configuration and metadata for this database.
  5605  // Currently, FirestoreAdmin.ListFields only supports listing fields that have
  5606  // been explicitly overridden. To issue this query, call
  5607  // FirestoreAdmin.ListFields with the filter set to
  5608  // `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
  5609  //
  5610  //   - parent: A parent name of the form
  5611  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  5612  //     _id}`.
  5613  func (r *ProjectsDatabasesCollectionGroupsFieldsService) List(parent string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5614  	c := &ProjectsDatabasesCollectionGroupsFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5615  	c.parent = parent
  5616  	return c
  5617  }
  5618  
  5619  // Filter sets the optional parameter "filter": The filter to apply to list
  5620  // results. Currently, FirestoreAdmin.ListFields only supports listing fields
  5621  // that have been explicitly overridden. To issue this query, call
  5622  // FirestoreAdmin.ListFields with a filter that includes
  5623  // `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`.
  5624  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5625  	c.urlParams_.Set("filter", filter)
  5626  	return c
  5627  }
  5628  
  5629  // PageSize sets the optional parameter "pageSize": The number of results to
  5630  // return.
  5631  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5632  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5633  	return c
  5634  }
  5635  
  5636  // PageToken sets the optional parameter "pageToken": A page token, returned
  5637  // from a previous call to FirestoreAdmin.ListFields, that may be used to get
  5638  // the next page of results.
  5639  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5640  	c.urlParams_.Set("pageToken", pageToken)
  5641  	return c
  5642  }
  5643  
  5644  // Fields allows partial responses to be retrieved. See
  5645  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5646  // details.
  5647  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5648  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5649  	return c
  5650  }
  5651  
  5652  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5653  // object's ETag matches the given value. This is useful for getting updates
  5654  // only after the object has changed since the last request.
  5655  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5656  	c.ifNoneMatch_ = entityTag
  5657  	return c
  5658  }
  5659  
  5660  // Context sets the context to be used in this call's Do method.
  5661  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsListCall {
  5662  	c.ctx_ = ctx
  5663  	return c
  5664  }
  5665  
  5666  // Header returns a http.Header that can be modified by the caller to add
  5667  // headers to the request.
  5668  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Header() http.Header {
  5669  	if c.header_ == nil {
  5670  		c.header_ = make(http.Header)
  5671  	}
  5672  	return c.header_
  5673  }
  5674  
  5675  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) doRequest(alt string) (*http.Response, error) {
  5676  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5677  	if c.ifNoneMatch_ != "" {
  5678  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5679  	}
  5680  	var body io.Reader = nil
  5681  	c.urlParams_.Set("alt", alt)
  5682  	c.urlParams_.Set("prettyPrint", "false")
  5683  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fields")
  5684  	urls += "?" + c.urlParams_.Encode()
  5685  	req, err := http.NewRequest("GET", urls, body)
  5686  	if err != nil {
  5687  		return nil, err
  5688  	}
  5689  	req.Header = reqHeaders
  5690  	googleapi.Expand(req.URL, map[string]string{
  5691  		"parent": c.parent,
  5692  	})
  5693  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5694  }
  5695  
  5696  // Do executes the "firestore.projects.databases.collectionGroups.fields.list" call.
  5697  // Any non-2xx status code is an error. Response headers are in either
  5698  // *GoogleFirestoreAdminV1ListFieldsResponse.ServerResponse.Header or (if a
  5699  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5700  // googleapi.IsNotModified to check whether the returned error was because
  5701  // http.StatusNotModified was returned.
  5702  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListFieldsResponse, error) {
  5703  	gensupport.SetOptions(c.urlParams_, opts...)
  5704  	res, err := c.doRequest("json")
  5705  	if res != nil && res.StatusCode == http.StatusNotModified {
  5706  		if res.Body != nil {
  5707  			res.Body.Close()
  5708  		}
  5709  		return nil, gensupport.WrapError(&googleapi.Error{
  5710  			Code:   res.StatusCode,
  5711  			Header: res.Header,
  5712  		})
  5713  	}
  5714  	if err != nil {
  5715  		return nil, err
  5716  	}
  5717  	defer googleapi.CloseBody(res)
  5718  	if err := googleapi.CheckResponse(res); err != nil {
  5719  		return nil, gensupport.WrapError(err)
  5720  	}
  5721  	ret := &GoogleFirestoreAdminV1ListFieldsResponse{
  5722  		ServerResponse: googleapi.ServerResponse{
  5723  			Header:         res.Header,
  5724  			HTTPStatusCode: res.StatusCode,
  5725  		},
  5726  	}
  5727  	target := &ret
  5728  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5729  		return nil, err
  5730  	}
  5731  	return ret, nil
  5732  }
  5733  
  5734  // Pages invokes f for each page of results.
  5735  // A non-nil error returned from f will halt the iteration.
  5736  // The provided context supersedes any context provided to the Context method.
  5737  func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListFieldsResponse) error) error {
  5738  	c.ctx_ = ctx
  5739  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5740  	for {
  5741  		x, err := c.Do()
  5742  		if err != nil {
  5743  			return err
  5744  		}
  5745  		if err := f(x); err != nil {
  5746  			return err
  5747  		}
  5748  		if x.NextPageToken == "" {
  5749  			return nil
  5750  		}
  5751  		c.PageToken(x.NextPageToken)
  5752  	}
  5753  }
  5754  
  5755  type ProjectsDatabasesCollectionGroupsFieldsPatchCall struct {
  5756  	s                           *Service
  5757  	name                        string
  5758  	googlefirestoreadminv1field *GoogleFirestoreAdminV1Field
  5759  	urlParams_                  gensupport.URLParams
  5760  	ctx_                        context.Context
  5761  	header_                     http.Header
  5762  }
  5763  
  5764  // Patch: Updates a field configuration. Currently, field updates apply only to
  5765  // single field index configuration. However, calls to
  5766  // FirestoreAdmin.UpdateField should provide a field mask to avoid changing any
  5767  // configuration that the caller isn't aware of. The field mask should be
  5768  // specified as: `{ paths: "index_config" }`. This call returns a
  5769  // google.longrunning.Operation which may be used to track the status of the
  5770  // field update. The metadata for the operation will be the type
  5771  // FieldOperationMetadata. To configure the default field settings for the
  5772  // database, use the special `Field` with resource name:
  5773  // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/f
  5774  // ields/*`.
  5775  //
  5776  //   - name: A field name of the form
  5777  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  5778  //     _id}/fields/{field_path}` A field path may be a simple field name, e.g.
  5779  //     `address` or a path to fields within map_value , e.g. `address.city`, or a
  5780  //     special field path. The only valid special field is `*`, which represents
  5781  //     any field. Field paths may be quoted using ` (backtick). The only
  5782  //     character that needs to be escaped within a quoted field path is the
  5783  //     backtick character itself, escaped using a backslash. Special characters
  5784  //     in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`,
  5785  //     `]`, as well as any ascii symbolic characters. Examples: (Note: Comments
  5786  //     here are written in markdown syntax, so there is an additional layer of
  5787  //     backticks to represent a code block) `\`address.city\“ represents a field
  5788  //     named `address.city`, not the map key `city` in the field `address`.
  5789  //     `\`*\“ represents a field named `*`, not any field. A special `Field`
  5790  //     contains the default indexing settings for all fields. This field's
  5791  //     resource name is:
  5792  //     `projects/{project_id}/databases/{database_id}/collectionGroups/__default__
  5793  //     /fields/*` Indexes defined on this `Field` will be applied to all fields
  5794  //     which do not have their own `Field` index configuration.
  5795  func (r *ProjectsDatabasesCollectionGroupsFieldsService) Patch(name string, googlefirestoreadminv1field *GoogleFirestoreAdminV1Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
  5796  	c := &ProjectsDatabasesCollectionGroupsFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5797  	c.name = name
  5798  	c.googlefirestoreadminv1field = googlefirestoreadminv1field
  5799  	return c
  5800  }
  5801  
  5802  // UpdateMask sets the optional parameter "updateMask": A mask, relative to the
  5803  // field. If specified, only configuration specified by this field_mask will be
  5804  // updated in the field.
  5805  func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
  5806  	c.urlParams_.Set("updateMask", updateMask)
  5807  	return c
  5808  }
  5809  
  5810  // Fields allows partial responses to be retrieved. See
  5811  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5812  // details.
  5813  func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
  5814  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5815  	return c
  5816  }
  5817  
  5818  // Context sets the context to be used in this call's Do method.
  5819  func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
  5820  	c.ctx_ = ctx
  5821  	return c
  5822  }
  5823  
  5824  // Header returns a http.Header that can be modified by the caller to add
  5825  // headers to the request.
  5826  func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Header() http.Header {
  5827  	if c.header_ == nil {
  5828  		c.header_ = make(http.Header)
  5829  	}
  5830  	return c.header_
  5831  }
  5832  
  5833  func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
  5834  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5835  	var body io.Reader = nil
  5836  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1field)
  5837  	if err != nil {
  5838  		return nil, err
  5839  	}
  5840  	c.urlParams_.Set("alt", alt)
  5841  	c.urlParams_.Set("prettyPrint", "false")
  5842  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5843  	urls += "?" + c.urlParams_.Encode()
  5844  	req, err := http.NewRequest("PATCH", urls, body)
  5845  	if err != nil {
  5846  		return nil, err
  5847  	}
  5848  	req.Header = reqHeaders
  5849  	googleapi.Expand(req.URL, map[string]string{
  5850  		"name": c.name,
  5851  	})
  5852  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5853  }
  5854  
  5855  // Do executes the "firestore.projects.databases.collectionGroups.fields.patch" call.
  5856  // Any non-2xx status code is an error. Response headers are in either
  5857  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5858  // returned at all) in error.(*googleapi.Error).Header. Use
  5859  // googleapi.IsNotModified to check whether the returned error was because
  5860  // http.StatusNotModified was returned.
  5861  func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5862  	gensupport.SetOptions(c.urlParams_, opts...)
  5863  	res, err := c.doRequest("json")
  5864  	if res != nil && res.StatusCode == http.StatusNotModified {
  5865  		if res.Body != nil {
  5866  			res.Body.Close()
  5867  		}
  5868  		return nil, gensupport.WrapError(&googleapi.Error{
  5869  			Code:   res.StatusCode,
  5870  			Header: res.Header,
  5871  		})
  5872  	}
  5873  	if err != nil {
  5874  		return nil, err
  5875  	}
  5876  	defer googleapi.CloseBody(res)
  5877  	if err := googleapi.CheckResponse(res); err != nil {
  5878  		return nil, gensupport.WrapError(err)
  5879  	}
  5880  	ret := &GoogleLongrunningOperation{
  5881  		ServerResponse: googleapi.ServerResponse{
  5882  			Header:         res.Header,
  5883  			HTTPStatusCode: res.StatusCode,
  5884  		},
  5885  	}
  5886  	target := &ret
  5887  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5888  		return nil, err
  5889  	}
  5890  	return ret, nil
  5891  }
  5892  
  5893  type ProjectsDatabasesCollectionGroupsIndexesCreateCall struct {
  5894  	s                           *Service
  5895  	parent                      string
  5896  	googlefirestoreadminv1index *GoogleFirestoreAdminV1Index
  5897  	urlParams_                  gensupport.URLParams
  5898  	ctx_                        context.Context
  5899  	header_                     http.Header
  5900  }
  5901  
  5902  // Create: Creates a composite index. This returns a
  5903  // google.longrunning.Operation which may be used to track the status of the
  5904  // creation. The metadata for the operation will be the type
  5905  // IndexOperationMetadata.
  5906  //
  5907  //   - parent: A parent name of the form
  5908  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  5909  //     _id}`.
  5910  func (r *ProjectsDatabasesCollectionGroupsIndexesService) Create(parent string, googlefirestoreadminv1index *GoogleFirestoreAdminV1Index) *ProjectsDatabasesCollectionGroupsIndexesCreateCall {
  5911  	c := &ProjectsDatabasesCollectionGroupsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5912  	c.parent = parent
  5913  	c.googlefirestoreadminv1index = googlefirestoreadminv1index
  5914  	return c
  5915  }
  5916  
  5917  // Fields allows partial responses to be retrieved. See
  5918  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5919  // details.
  5920  func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesCreateCall {
  5921  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5922  	return c
  5923  }
  5924  
  5925  // Context sets the context to be used in this call's Do method.
  5926  func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesCreateCall {
  5927  	c.ctx_ = ctx
  5928  	return c
  5929  }
  5930  
  5931  // Header returns a http.Header that can be modified by the caller to add
  5932  // headers to the request.
  5933  func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Header() http.Header {
  5934  	if c.header_ == nil {
  5935  		c.header_ = make(http.Header)
  5936  	}
  5937  	return c.header_
  5938  }
  5939  
  5940  func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) doRequest(alt string) (*http.Response, error) {
  5941  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5942  	var body io.Reader = nil
  5943  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1index)
  5944  	if err != nil {
  5945  		return nil, err
  5946  	}
  5947  	c.urlParams_.Set("alt", alt)
  5948  	c.urlParams_.Set("prettyPrint", "false")
  5949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes")
  5950  	urls += "?" + c.urlParams_.Encode()
  5951  	req, err := http.NewRequest("POST", urls, body)
  5952  	if err != nil {
  5953  		return nil, err
  5954  	}
  5955  	req.Header = reqHeaders
  5956  	googleapi.Expand(req.URL, map[string]string{
  5957  		"parent": c.parent,
  5958  	})
  5959  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5960  }
  5961  
  5962  // Do executes the "firestore.projects.databases.collectionGroups.indexes.create" call.
  5963  // Any non-2xx status code is an error. Response headers are in either
  5964  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5965  // returned at all) in error.(*googleapi.Error).Header. Use
  5966  // googleapi.IsNotModified to check whether the returned error was because
  5967  // http.StatusNotModified was returned.
  5968  func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5969  	gensupport.SetOptions(c.urlParams_, opts...)
  5970  	res, err := c.doRequest("json")
  5971  	if res != nil && res.StatusCode == http.StatusNotModified {
  5972  		if res.Body != nil {
  5973  			res.Body.Close()
  5974  		}
  5975  		return nil, gensupport.WrapError(&googleapi.Error{
  5976  			Code:   res.StatusCode,
  5977  			Header: res.Header,
  5978  		})
  5979  	}
  5980  	if err != nil {
  5981  		return nil, err
  5982  	}
  5983  	defer googleapi.CloseBody(res)
  5984  	if err := googleapi.CheckResponse(res); err != nil {
  5985  		return nil, gensupport.WrapError(err)
  5986  	}
  5987  	ret := &GoogleLongrunningOperation{
  5988  		ServerResponse: googleapi.ServerResponse{
  5989  			Header:         res.Header,
  5990  			HTTPStatusCode: res.StatusCode,
  5991  		},
  5992  	}
  5993  	target := &ret
  5994  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5995  		return nil, err
  5996  	}
  5997  	return ret, nil
  5998  }
  5999  
  6000  type ProjectsDatabasesCollectionGroupsIndexesDeleteCall struct {
  6001  	s          *Service
  6002  	name       string
  6003  	urlParams_ gensupport.URLParams
  6004  	ctx_       context.Context
  6005  	header_    http.Header
  6006  }
  6007  
  6008  // Delete: Deletes a composite index.
  6009  //
  6010  //   - name: A name of the form
  6011  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  6012  //     _id}/indexes/{index_id}`.
  6013  func (r *ProjectsDatabasesCollectionGroupsIndexesService) Delete(name string) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall {
  6014  	c := &ProjectsDatabasesCollectionGroupsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6015  	c.name = name
  6016  	return c
  6017  }
  6018  
  6019  // Fields allows partial responses to be retrieved. See
  6020  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6021  // details.
  6022  func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall {
  6023  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6024  	return c
  6025  }
  6026  
  6027  // Context sets the context to be used in this call's Do method.
  6028  func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall {
  6029  	c.ctx_ = ctx
  6030  	return c
  6031  }
  6032  
  6033  // Header returns a http.Header that can be modified by the caller to add
  6034  // headers to the request.
  6035  func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Header() http.Header {
  6036  	if c.header_ == nil {
  6037  		c.header_ = make(http.Header)
  6038  	}
  6039  	return c.header_
  6040  }
  6041  
  6042  func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6043  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6044  	var body io.Reader = nil
  6045  	c.urlParams_.Set("alt", alt)
  6046  	c.urlParams_.Set("prettyPrint", "false")
  6047  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6048  	urls += "?" + c.urlParams_.Encode()
  6049  	req, err := http.NewRequest("DELETE", urls, body)
  6050  	if err != nil {
  6051  		return nil, err
  6052  	}
  6053  	req.Header = reqHeaders
  6054  	googleapi.Expand(req.URL, map[string]string{
  6055  		"name": c.name,
  6056  	})
  6057  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6058  }
  6059  
  6060  // Do executes the "firestore.projects.databases.collectionGroups.indexes.delete" call.
  6061  // Any non-2xx status code is an error. Response headers are in either
  6062  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6063  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6064  // whether the returned error was because http.StatusNotModified was returned.
  6065  func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6066  	gensupport.SetOptions(c.urlParams_, opts...)
  6067  	res, err := c.doRequest("json")
  6068  	if res != nil && res.StatusCode == http.StatusNotModified {
  6069  		if res.Body != nil {
  6070  			res.Body.Close()
  6071  		}
  6072  		return nil, gensupport.WrapError(&googleapi.Error{
  6073  			Code:   res.StatusCode,
  6074  			Header: res.Header,
  6075  		})
  6076  	}
  6077  	if err != nil {
  6078  		return nil, err
  6079  	}
  6080  	defer googleapi.CloseBody(res)
  6081  	if err := googleapi.CheckResponse(res); err != nil {
  6082  		return nil, gensupport.WrapError(err)
  6083  	}
  6084  	ret := &Empty{
  6085  		ServerResponse: googleapi.ServerResponse{
  6086  			Header:         res.Header,
  6087  			HTTPStatusCode: res.StatusCode,
  6088  		},
  6089  	}
  6090  	target := &ret
  6091  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6092  		return nil, err
  6093  	}
  6094  	return ret, nil
  6095  }
  6096  
  6097  type ProjectsDatabasesCollectionGroupsIndexesGetCall struct {
  6098  	s            *Service
  6099  	name         string
  6100  	urlParams_   gensupport.URLParams
  6101  	ifNoneMatch_ string
  6102  	ctx_         context.Context
  6103  	header_      http.Header
  6104  }
  6105  
  6106  // Get: Gets a composite index.
  6107  //
  6108  //   - name: A name of the form
  6109  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  6110  //     _id}/indexes/{index_id}`.
  6111  func (r *ProjectsDatabasesCollectionGroupsIndexesService) Get(name string) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
  6112  	c := &ProjectsDatabasesCollectionGroupsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6113  	c.name = name
  6114  	return c
  6115  }
  6116  
  6117  // Fields allows partial responses to be retrieved. See
  6118  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6119  // details.
  6120  func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
  6121  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6122  	return c
  6123  }
  6124  
  6125  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6126  // object's ETag matches the given value. This is useful for getting updates
  6127  // only after the object has changed since the last request.
  6128  func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
  6129  	c.ifNoneMatch_ = entityTag
  6130  	return c
  6131  }
  6132  
  6133  // Context sets the context to be used in this call's Do method.
  6134  func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
  6135  	c.ctx_ = ctx
  6136  	return c
  6137  }
  6138  
  6139  // Header returns a http.Header that can be modified by the caller to add
  6140  // headers to the request.
  6141  func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Header() http.Header {
  6142  	if c.header_ == nil {
  6143  		c.header_ = make(http.Header)
  6144  	}
  6145  	return c.header_
  6146  }
  6147  
  6148  func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) doRequest(alt string) (*http.Response, error) {
  6149  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6150  	if c.ifNoneMatch_ != "" {
  6151  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6152  	}
  6153  	var body io.Reader = nil
  6154  	c.urlParams_.Set("alt", alt)
  6155  	c.urlParams_.Set("prettyPrint", "false")
  6156  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6157  	urls += "?" + c.urlParams_.Encode()
  6158  	req, err := http.NewRequest("GET", urls, body)
  6159  	if err != nil {
  6160  		return nil, err
  6161  	}
  6162  	req.Header = reqHeaders
  6163  	googleapi.Expand(req.URL, map[string]string{
  6164  		"name": c.name,
  6165  	})
  6166  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6167  }
  6168  
  6169  // Do executes the "firestore.projects.databases.collectionGroups.indexes.get" call.
  6170  // Any non-2xx status code is an error. Response headers are in either
  6171  // *GoogleFirestoreAdminV1Index.ServerResponse.Header or (if a response was
  6172  // returned at all) in error.(*googleapi.Error).Header. Use
  6173  // googleapi.IsNotModified to check whether the returned error was because
  6174  // http.StatusNotModified was returned.
  6175  func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Index, error) {
  6176  	gensupport.SetOptions(c.urlParams_, opts...)
  6177  	res, err := c.doRequest("json")
  6178  	if res != nil && res.StatusCode == http.StatusNotModified {
  6179  		if res.Body != nil {
  6180  			res.Body.Close()
  6181  		}
  6182  		return nil, gensupport.WrapError(&googleapi.Error{
  6183  			Code:   res.StatusCode,
  6184  			Header: res.Header,
  6185  		})
  6186  	}
  6187  	if err != nil {
  6188  		return nil, err
  6189  	}
  6190  	defer googleapi.CloseBody(res)
  6191  	if err := googleapi.CheckResponse(res); err != nil {
  6192  		return nil, gensupport.WrapError(err)
  6193  	}
  6194  	ret := &GoogleFirestoreAdminV1Index{
  6195  		ServerResponse: googleapi.ServerResponse{
  6196  			Header:         res.Header,
  6197  			HTTPStatusCode: res.StatusCode,
  6198  		},
  6199  	}
  6200  	target := &ret
  6201  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6202  		return nil, err
  6203  	}
  6204  	return ret, nil
  6205  }
  6206  
  6207  type ProjectsDatabasesCollectionGroupsIndexesListCall struct {
  6208  	s            *Service
  6209  	parent       string
  6210  	urlParams_   gensupport.URLParams
  6211  	ifNoneMatch_ string
  6212  	ctx_         context.Context
  6213  	header_      http.Header
  6214  }
  6215  
  6216  // List: Lists composite indexes.
  6217  //
  6218  //   - parent: A parent name of the form
  6219  //     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection
  6220  //     _id}`.
  6221  func (r *ProjectsDatabasesCollectionGroupsIndexesService) List(parent string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6222  	c := &ProjectsDatabasesCollectionGroupsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6223  	c.parent = parent
  6224  	return c
  6225  }
  6226  
  6227  // Filter sets the optional parameter "filter": The filter to apply to list
  6228  // results.
  6229  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6230  	c.urlParams_.Set("filter", filter)
  6231  	return c
  6232  }
  6233  
  6234  // PageSize sets the optional parameter "pageSize": The number of results to
  6235  // return.
  6236  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6237  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6238  	return c
  6239  }
  6240  
  6241  // PageToken sets the optional parameter "pageToken": A page token, returned
  6242  // from a previous call to FirestoreAdmin.ListIndexes, that may be used to get
  6243  // the next page of results.
  6244  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6245  	c.urlParams_.Set("pageToken", pageToken)
  6246  	return c
  6247  }
  6248  
  6249  // Fields allows partial responses to be retrieved. See
  6250  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6251  // details.
  6252  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6253  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6254  	return c
  6255  }
  6256  
  6257  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6258  // object's ETag matches the given value. This is useful for getting updates
  6259  // only after the object has changed since the last request.
  6260  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6261  	c.ifNoneMatch_ = entityTag
  6262  	return c
  6263  }
  6264  
  6265  // Context sets the context to be used in this call's Do method.
  6266  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesListCall {
  6267  	c.ctx_ = ctx
  6268  	return c
  6269  }
  6270  
  6271  // Header returns a http.Header that can be modified by the caller to add
  6272  // headers to the request.
  6273  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Header() http.Header {
  6274  	if c.header_ == nil {
  6275  		c.header_ = make(http.Header)
  6276  	}
  6277  	return c.header_
  6278  }
  6279  
  6280  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) doRequest(alt string) (*http.Response, error) {
  6281  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6282  	if c.ifNoneMatch_ != "" {
  6283  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6284  	}
  6285  	var body io.Reader = nil
  6286  	c.urlParams_.Set("alt", alt)
  6287  	c.urlParams_.Set("prettyPrint", "false")
  6288  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes")
  6289  	urls += "?" + c.urlParams_.Encode()
  6290  	req, err := http.NewRequest("GET", urls, body)
  6291  	if err != nil {
  6292  		return nil, err
  6293  	}
  6294  	req.Header = reqHeaders
  6295  	googleapi.Expand(req.URL, map[string]string{
  6296  		"parent": c.parent,
  6297  	})
  6298  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6299  }
  6300  
  6301  // Do executes the "firestore.projects.databases.collectionGroups.indexes.list" call.
  6302  // Any non-2xx status code is an error. Response headers are in either
  6303  // *GoogleFirestoreAdminV1ListIndexesResponse.ServerResponse.Header or (if a
  6304  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6305  // googleapi.IsNotModified to check whether the returned error was because
  6306  // http.StatusNotModified was returned.
  6307  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListIndexesResponse, error) {
  6308  	gensupport.SetOptions(c.urlParams_, opts...)
  6309  	res, err := c.doRequest("json")
  6310  	if res != nil && res.StatusCode == http.StatusNotModified {
  6311  		if res.Body != nil {
  6312  			res.Body.Close()
  6313  		}
  6314  		return nil, gensupport.WrapError(&googleapi.Error{
  6315  			Code:   res.StatusCode,
  6316  			Header: res.Header,
  6317  		})
  6318  	}
  6319  	if err != nil {
  6320  		return nil, err
  6321  	}
  6322  	defer googleapi.CloseBody(res)
  6323  	if err := googleapi.CheckResponse(res); err != nil {
  6324  		return nil, gensupport.WrapError(err)
  6325  	}
  6326  	ret := &GoogleFirestoreAdminV1ListIndexesResponse{
  6327  		ServerResponse: googleapi.ServerResponse{
  6328  			Header:         res.Header,
  6329  			HTTPStatusCode: res.StatusCode,
  6330  		},
  6331  	}
  6332  	target := &ret
  6333  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6334  		return nil, err
  6335  	}
  6336  	return ret, nil
  6337  }
  6338  
  6339  // Pages invokes f for each page of results.
  6340  // A non-nil error returned from f will halt the iteration.
  6341  // The provided context supersedes any context provided to the Context method.
  6342  func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListIndexesResponse) error) error {
  6343  	c.ctx_ = ctx
  6344  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6345  	for {
  6346  		x, err := c.Do()
  6347  		if err != nil {
  6348  			return err
  6349  		}
  6350  		if err := f(x); err != nil {
  6351  			return err
  6352  		}
  6353  		if x.NextPageToken == "" {
  6354  			return nil
  6355  		}
  6356  		c.PageToken(x.NextPageToken)
  6357  	}
  6358  }
  6359  
  6360  type ProjectsDatabasesDocumentsBatchGetCall struct {
  6361  	s                        *Service
  6362  	database                 string
  6363  	batchgetdocumentsrequest *BatchGetDocumentsRequest
  6364  	urlParams_               gensupport.URLParams
  6365  	ctx_                     context.Context
  6366  	header_                  http.Header
  6367  }
  6368  
  6369  // BatchGet: Gets multiple documents. Documents returned by this method are not
  6370  // guaranteed to be returned in the same order that they were requested.
  6371  //
  6372  //   - database: The database name. In the format:
  6373  //     `projects/{project_id}/databases/{database_id}`.
  6374  func (r *ProjectsDatabasesDocumentsService) BatchGet(database string, batchgetdocumentsrequest *BatchGetDocumentsRequest) *ProjectsDatabasesDocumentsBatchGetCall {
  6375  	c := &ProjectsDatabasesDocumentsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6376  	c.database = database
  6377  	c.batchgetdocumentsrequest = batchgetdocumentsrequest
  6378  	return c
  6379  }
  6380  
  6381  // Fields allows partial responses to be retrieved. See
  6382  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6383  // details.
  6384  func (c *ProjectsDatabasesDocumentsBatchGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchGetCall {
  6385  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6386  	return c
  6387  }
  6388  
  6389  // Context sets the context to be used in this call's Do method.
  6390  func (c *ProjectsDatabasesDocumentsBatchGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchGetCall {
  6391  	c.ctx_ = ctx
  6392  	return c
  6393  }
  6394  
  6395  // Header returns a http.Header that can be modified by the caller to add
  6396  // headers to the request.
  6397  func (c *ProjectsDatabasesDocumentsBatchGetCall) Header() http.Header {
  6398  	if c.header_ == nil {
  6399  		c.header_ = make(http.Header)
  6400  	}
  6401  	return c.header_
  6402  }
  6403  
  6404  func (c *ProjectsDatabasesDocumentsBatchGetCall) doRequest(alt string) (*http.Response, error) {
  6405  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6406  	var body io.Reader = nil
  6407  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetdocumentsrequest)
  6408  	if err != nil {
  6409  		return nil, err
  6410  	}
  6411  	c.urlParams_.Set("alt", alt)
  6412  	c.urlParams_.Set("prettyPrint", "false")
  6413  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:batchGet")
  6414  	urls += "?" + c.urlParams_.Encode()
  6415  	req, err := http.NewRequest("POST", urls, body)
  6416  	if err != nil {
  6417  		return nil, err
  6418  	}
  6419  	req.Header = reqHeaders
  6420  	googleapi.Expand(req.URL, map[string]string{
  6421  		"database": c.database,
  6422  	})
  6423  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6424  }
  6425  
  6426  // Do executes the "firestore.projects.databases.documents.batchGet" call.
  6427  // Any non-2xx status code is an error. Response headers are in either
  6428  // *BatchGetDocumentsResponse.ServerResponse.Header or (if a response was
  6429  // returned at all) in error.(*googleapi.Error).Header. Use
  6430  // googleapi.IsNotModified to check whether the returned error was because
  6431  // http.StatusNotModified was returned.
  6432  func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetDocumentsResponse, error) {
  6433  	gensupport.SetOptions(c.urlParams_, opts...)
  6434  	res, err := c.doRequest("json")
  6435  	if res != nil && res.StatusCode == http.StatusNotModified {
  6436  		if res.Body != nil {
  6437  			res.Body.Close()
  6438  		}
  6439  		return nil, gensupport.WrapError(&googleapi.Error{
  6440  			Code:   res.StatusCode,
  6441  			Header: res.Header,
  6442  		})
  6443  	}
  6444  	if err != nil {
  6445  		return nil, err
  6446  	}
  6447  	defer googleapi.CloseBody(res)
  6448  	if err := googleapi.CheckResponse(res); err != nil {
  6449  		return nil, gensupport.WrapError(err)
  6450  	}
  6451  	ret := &BatchGetDocumentsResponse{
  6452  		ServerResponse: googleapi.ServerResponse{
  6453  			Header:         res.Header,
  6454  			HTTPStatusCode: res.StatusCode,
  6455  		},
  6456  	}
  6457  	target := &ret
  6458  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6459  		return nil, err
  6460  	}
  6461  	return ret, nil
  6462  }
  6463  
  6464  type ProjectsDatabasesDocumentsBatchWriteCall struct {
  6465  	s                 *Service
  6466  	database          string
  6467  	batchwriterequest *BatchWriteRequest
  6468  	urlParams_        gensupport.URLParams
  6469  	ctx_              context.Context
  6470  	header_           http.Header
  6471  }
  6472  
  6473  // BatchWrite: Applies a batch of write operations. The BatchWrite method does
  6474  // not apply the write operations atomically and can apply them out of order.
  6475  // Method does not allow more than one write per document. Each write succeeds
  6476  // or fails independently. See the BatchWriteResponse for the success status of
  6477  // each write. If you require an atomically applied set of writes, use Commit
  6478  // instead.
  6479  //
  6480  //   - database: The database name. In the format:
  6481  //     `projects/{project_id}/databases/{database_id}`.
  6482  func (r *ProjectsDatabasesDocumentsService) BatchWrite(database string, batchwriterequest *BatchWriteRequest) *ProjectsDatabasesDocumentsBatchWriteCall {
  6483  	c := &ProjectsDatabasesDocumentsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6484  	c.database = database
  6485  	c.batchwriterequest = batchwriterequest
  6486  	return c
  6487  }
  6488  
  6489  // Fields allows partial responses to be retrieved. See
  6490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6491  // details.
  6492  func (c *ProjectsDatabasesDocumentsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchWriteCall {
  6493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6494  	return c
  6495  }
  6496  
  6497  // Context sets the context to be used in this call's Do method.
  6498  func (c *ProjectsDatabasesDocumentsBatchWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchWriteCall {
  6499  	c.ctx_ = ctx
  6500  	return c
  6501  }
  6502  
  6503  // Header returns a http.Header that can be modified by the caller to add
  6504  // headers to the request.
  6505  func (c *ProjectsDatabasesDocumentsBatchWriteCall) Header() http.Header {
  6506  	if c.header_ == nil {
  6507  		c.header_ = make(http.Header)
  6508  	}
  6509  	return c.header_
  6510  }
  6511  
  6512  func (c *ProjectsDatabasesDocumentsBatchWriteCall) doRequest(alt string) (*http.Response, error) {
  6513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6514  	var body io.Reader = nil
  6515  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwriterequest)
  6516  	if err != nil {
  6517  		return nil, err
  6518  	}
  6519  	c.urlParams_.Set("alt", alt)
  6520  	c.urlParams_.Set("prettyPrint", "false")
  6521  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:batchWrite")
  6522  	urls += "?" + c.urlParams_.Encode()
  6523  	req, err := http.NewRequest("POST", urls, body)
  6524  	if err != nil {
  6525  		return nil, err
  6526  	}
  6527  	req.Header = reqHeaders
  6528  	googleapi.Expand(req.URL, map[string]string{
  6529  		"database": c.database,
  6530  	})
  6531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6532  }
  6533  
  6534  // Do executes the "firestore.projects.databases.documents.batchWrite" call.
  6535  // Any non-2xx status code is an error. Response headers are in either
  6536  // *BatchWriteResponse.ServerResponse.Header or (if a response was returned at
  6537  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6538  // check whether the returned error was because http.StatusNotModified was
  6539  // returned.
  6540  func (c *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) {
  6541  	gensupport.SetOptions(c.urlParams_, opts...)
  6542  	res, err := c.doRequest("json")
  6543  	if res != nil && res.StatusCode == http.StatusNotModified {
  6544  		if res.Body != nil {
  6545  			res.Body.Close()
  6546  		}
  6547  		return nil, gensupport.WrapError(&googleapi.Error{
  6548  			Code:   res.StatusCode,
  6549  			Header: res.Header,
  6550  		})
  6551  	}
  6552  	if err != nil {
  6553  		return nil, err
  6554  	}
  6555  	defer googleapi.CloseBody(res)
  6556  	if err := googleapi.CheckResponse(res); err != nil {
  6557  		return nil, gensupport.WrapError(err)
  6558  	}
  6559  	ret := &BatchWriteResponse{
  6560  		ServerResponse: googleapi.ServerResponse{
  6561  			Header:         res.Header,
  6562  			HTTPStatusCode: res.StatusCode,
  6563  		},
  6564  	}
  6565  	target := &ret
  6566  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6567  		return nil, err
  6568  	}
  6569  	return ret, nil
  6570  }
  6571  
  6572  type ProjectsDatabasesDocumentsBeginTransactionCall struct {
  6573  	s                       *Service
  6574  	database                string
  6575  	begintransactionrequest *BeginTransactionRequest
  6576  	urlParams_              gensupport.URLParams
  6577  	ctx_                    context.Context
  6578  	header_                 http.Header
  6579  }
  6580  
  6581  // BeginTransaction: Starts a new transaction.
  6582  //
  6583  //   - database: The database name. In the format:
  6584  //     `projects/{project_id}/databases/{database_id}`.
  6585  func (r *ProjectsDatabasesDocumentsService) BeginTransaction(database string, begintransactionrequest *BeginTransactionRequest) *ProjectsDatabasesDocumentsBeginTransactionCall {
  6586  	c := &ProjectsDatabasesDocumentsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6587  	c.database = database
  6588  	c.begintransactionrequest = begintransactionrequest
  6589  	return c
  6590  }
  6591  
  6592  // Fields allows partial responses to be retrieved. See
  6593  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6594  // details.
  6595  func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBeginTransactionCall {
  6596  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6597  	return c
  6598  }
  6599  
  6600  // Context sets the context to be used in this call's Do method.
  6601  func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBeginTransactionCall {
  6602  	c.ctx_ = ctx
  6603  	return c
  6604  }
  6605  
  6606  // Header returns a http.Header that can be modified by the caller to add
  6607  // headers to the request.
  6608  func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Header() http.Header {
  6609  	if c.header_ == nil {
  6610  		c.header_ = make(http.Header)
  6611  	}
  6612  	return c.header_
  6613  }
  6614  
  6615  func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
  6616  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6617  	var body io.Reader = nil
  6618  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
  6619  	if err != nil {
  6620  		return nil, err
  6621  	}
  6622  	c.urlParams_.Set("alt", alt)
  6623  	c.urlParams_.Set("prettyPrint", "false")
  6624  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:beginTransaction")
  6625  	urls += "?" + c.urlParams_.Encode()
  6626  	req, err := http.NewRequest("POST", urls, body)
  6627  	if err != nil {
  6628  		return nil, err
  6629  	}
  6630  	req.Header = reqHeaders
  6631  	googleapi.Expand(req.URL, map[string]string{
  6632  		"database": c.database,
  6633  	})
  6634  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6635  }
  6636  
  6637  // Do executes the "firestore.projects.databases.documents.beginTransaction" call.
  6638  // Any non-2xx status code is an error. Response headers are in either
  6639  // *BeginTransactionResponse.ServerResponse.Header or (if a response was
  6640  // returned at all) in error.(*googleapi.Error).Header. Use
  6641  // googleapi.IsNotModified to check whether the returned error was because
  6642  // http.StatusNotModified was returned.
  6643  func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) {
  6644  	gensupport.SetOptions(c.urlParams_, opts...)
  6645  	res, err := c.doRequest("json")
  6646  	if res != nil && res.StatusCode == http.StatusNotModified {
  6647  		if res.Body != nil {
  6648  			res.Body.Close()
  6649  		}
  6650  		return nil, gensupport.WrapError(&googleapi.Error{
  6651  			Code:   res.StatusCode,
  6652  			Header: res.Header,
  6653  		})
  6654  	}
  6655  	if err != nil {
  6656  		return nil, err
  6657  	}
  6658  	defer googleapi.CloseBody(res)
  6659  	if err := googleapi.CheckResponse(res); err != nil {
  6660  		return nil, gensupport.WrapError(err)
  6661  	}
  6662  	ret := &BeginTransactionResponse{
  6663  		ServerResponse: googleapi.ServerResponse{
  6664  			Header:         res.Header,
  6665  			HTTPStatusCode: res.StatusCode,
  6666  		},
  6667  	}
  6668  	target := &ret
  6669  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6670  		return nil, err
  6671  	}
  6672  	return ret, nil
  6673  }
  6674  
  6675  type ProjectsDatabasesDocumentsCommitCall struct {
  6676  	s             *Service
  6677  	database      string
  6678  	commitrequest *CommitRequest
  6679  	urlParams_    gensupport.URLParams
  6680  	ctx_          context.Context
  6681  	header_       http.Header
  6682  }
  6683  
  6684  // Commit: Commits a transaction, while optionally updating documents.
  6685  //
  6686  //   - database: The database name. In the format:
  6687  //     `projects/{project_id}/databases/{database_id}`.
  6688  func (r *ProjectsDatabasesDocumentsService) Commit(database string, commitrequest *CommitRequest) *ProjectsDatabasesDocumentsCommitCall {
  6689  	c := &ProjectsDatabasesDocumentsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6690  	c.database = database
  6691  	c.commitrequest = commitrequest
  6692  	return c
  6693  }
  6694  
  6695  // Fields allows partial responses to be retrieved. See
  6696  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6697  // details.
  6698  func (c *ProjectsDatabasesDocumentsCommitCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCommitCall {
  6699  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6700  	return c
  6701  }
  6702  
  6703  // Context sets the context to be used in this call's Do method.
  6704  func (c *ProjectsDatabasesDocumentsCommitCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCommitCall {
  6705  	c.ctx_ = ctx
  6706  	return c
  6707  }
  6708  
  6709  // Header returns a http.Header that can be modified by the caller to add
  6710  // headers to the request.
  6711  func (c *ProjectsDatabasesDocumentsCommitCall) Header() http.Header {
  6712  	if c.header_ == nil {
  6713  		c.header_ = make(http.Header)
  6714  	}
  6715  	return c.header_
  6716  }
  6717  
  6718  func (c *ProjectsDatabasesDocumentsCommitCall) doRequest(alt string) (*http.Response, error) {
  6719  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6720  	var body io.Reader = nil
  6721  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
  6722  	if err != nil {
  6723  		return nil, err
  6724  	}
  6725  	c.urlParams_.Set("alt", alt)
  6726  	c.urlParams_.Set("prettyPrint", "false")
  6727  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:commit")
  6728  	urls += "?" + c.urlParams_.Encode()
  6729  	req, err := http.NewRequest("POST", urls, body)
  6730  	if err != nil {
  6731  		return nil, err
  6732  	}
  6733  	req.Header = reqHeaders
  6734  	googleapi.Expand(req.URL, map[string]string{
  6735  		"database": c.database,
  6736  	})
  6737  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6738  }
  6739  
  6740  // Do executes the "firestore.projects.databases.documents.commit" call.
  6741  // Any non-2xx status code is an error. Response headers are in either
  6742  // *CommitResponse.ServerResponse.Header or (if a response was returned at all)
  6743  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6744  // whether the returned error was because http.StatusNotModified was returned.
  6745  func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
  6746  	gensupport.SetOptions(c.urlParams_, opts...)
  6747  	res, err := c.doRequest("json")
  6748  	if res != nil && res.StatusCode == http.StatusNotModified {
  6749  		if res.Body != nil {
  6750  			res.Body.Close()
  6751  		}
  6752  		return nil, gensupport.WrapError(&googleapi.Error{
  6753  			Code:   res.StatusCode,
  6754  			Header: res.Header,
  6755  		})
  6756  	}
  6757  	if err != nil {
  6758  		return nil, err
  6759  	}
  6760  	defer googleapi.CloseBody(res)
  6761  	if err := googleapi.CheckResponse(res); err != nil {
  6762  		return nil, gensupport.WrapError(err)
  6763  	}
  6764  	ret := &CommitResponse{
  6765  		ServerResponse: googleapi.ServerResponse{
  6766  			Header:         res.Header,
  6767  			HTTPStatusCode: res.StatusCode,
  6768  		},
  6769  	}
  6770  	target := &ret
  6771  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6772  		return nil, err
  6773  	}
  6774  	return ret, nil
  6775  }
  6776  
  6777  type ProjectsDatabasesDocumentsCreateDocumentCall struct {
  6778  	s            *Service
  6779  	parent       string
  6780  	collectionId string
  6781  	document     *Document
  6782  	urlParams_   gensupport.URLParams
  6783  	ctx_         context.Context
  6784  	header_      http.Header
  6785  }
  6786  
  6787  // CreateDocument: Creates a new document.
  6788  //
  6789  //   - collectionId: The collection ID, relative to `parent`, to list. For
  6790  //     example: `chatrooms`.
  6791  //   - parent: The parent resource. For example:
  6792  //     `projects/{project_id}/databases/{database_id}/documents` or
  6793  //     `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroo
  6794  //     m_id}`.
  6795  func (r *ProjectsDatabasesDocumentsService) CreateDocument(parent string, collectionId string, document *Document) *ProjectsDatabasesDocumentsCreateDocumentCall {
  6796  	c := &ProjectsDatabasesDocumentsCreateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6797  	c.parent = parent
  6798  	c.collectionId = collectionId
  6799  	c.document = document
  6800  	return c
  6801  }
  6802  
  6803  // DocumentId sets the optional parameter "documentId": The client-assigned
  6804  // document ID to use for this document.  If not specified, an ID will be
  6805  // assigned by the service.
  6806  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) DocumentId(documentId string) *ProjectsDatabasesDocumentsCreateDocumentCall {
  6807  	c.urlParams_.Set("documentId", documentId)
  6808  	return c
  6809  }
  6810  
  6811  // MaskFieldPaths sets the optional parameter "mask.fieldPaths": The list of
  6812  // field paths in the mask. See Document.fields for a field path syntax
  6813  // reference.
  6814  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsCreateDocumentCall {
  6815  	c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
  6816  	return c
  6817  }
  6818  
  6819  // Fields allows partial responses to be retrieved. See
  6820  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6821  // details.
  6822  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCreateDocumentCall {
  6823  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6824  	return c
  6825  }
  6826  
  6827  // Context sets the context to be used in this call's Do method.
  6828  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCreateDocumentCall {
  6829  	c.ctx_ = ctx
  6830  	return c
  6831  }
  6832  
  6833  // Header returns a http.Header that can be modified by the caller to add
  6834  // headers to the request.
  6835  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Header() http.Header {
  6836  	if c.header_ == nil {
  6837  		c.header_ = make(http.Header)
  6838  	}
  6839  	return c.header_
  6840  }
  6841  
  6842  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) doRequest(alt string) (*http.Response, error) {
  6843  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6844  	var body io.Reader = nil
  6845  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
  6846  	if err != nil {
  6847  		return nil, err
  6848  	}
  6849  	c.urlParams_.Set("alt", alt)
  6850  	c.urlParams_.Set("prettyPrint", "false")
  6851  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
  6852  	urls += "?" + c.urlParams_.Encode()
  6853  	req, err := http.NewRequest("POST", urls, body)
  6854  	if err != nil {
  6855  		return nil, err
  6856  	}
  6857  	req.Header = reqHeaders
  6858  	googleapi.Expand(req.URL, map[string]string{
  6859  		"parent":       c.parent,
  6860  		"collectionId": c.collectionId,
  6861  	})
  6862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6863  }
  6864  
  6865  // Do executes the "firestore.projects.databases.documents.createDocument" call.
  6866  // Any non-2xx status code is an error. Response headers are in either
  6867  // *Document.ServerResponse.Header or (if a response was returned at all) in
  6868  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6869  // whether the returned error was because http.StatusNotModified was returned.
  6870  func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.CallOption) (*Document, error) {
  6871  	gensupport.SetOptions(c.urlParams_, opts...)
  6872  	res, err := c.doRequest("json")
  6873  	if res != nil && res.StatusCode == http.StatusNotModified {
  6874  		if res.Body != nil {
  6875  			res.Body.Close()
  6876  		}
  6877  		return nil, gensupport.WrapError(&googleapi.Error{
  6878  			Code:   res.StatusCode,
  6879  			Header: res.Header,
  6880  		})
  6881  	}
  6882  	if err != nil {
  6883  		return nil, err
  6884  	}
  6885  	defer googleapi.CloseBody(res)
  6886  	if err := googleapi.CheckResponse(res); err != nil {
  6887  		return nil, gensupport.WrapError(err)
  6888  	}
  6889  	ret := &Document{
  6890  		ServerResponse: googleapi.ServerResponse{
  6891  			Header:         res.Header,
  6892  			HTTPStatusCode: res.StatusCode,
  6893  		},
  6894  	}
  6895  	target := &ret
  6896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6897  		return nil, err
  6898  	}
  6899  	return ret, nil
  6900  }
  6901  
  6902  type ProjectsDatabasesDocumentsDeleteCall struct {
  6903  	s          *Service
  6904  	name       string
  6905  	urlParams_ gensupport.URLParams
  6906  	ctx_       context.Context
  6907  	header_    http.Header
  6908  }
  6909  
  6910  // Delete: Deletes a document.
  6911  //
  6912  //   - name: The resource name of the Document to delete. In the format:
  6913  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  6914  func (r *ProjectsDatabasesDocumentsService) Delete(name string) *ProjectsDatabasesDocumentsDeleteCall {
  6915  	c := &ProjectsDatabasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6916  	c.name = name
  6917  	return c
  6918  }
  6919  
  6920  // CurrentDocumentExists sets the optional parameter "currentDocument.exists":
  6921  // When set to `true`, the target document must exist. When set to `false`, the
  6922  // target document must not exist.
  6923  func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsDeleteCall {
  6924  	c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists))
  6925  	return c
  6926  }
  6927  
  6928  // CurrentDocumentUpdateTime sets the optional parameter
  6929  // "currentDocument.updateTime": When set, the target document must exist and
  6930  // have been last updated at that time. Timestamp must be microsecond aligned.
  6931  func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsDeleteCall {
  6932  	c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime)
  6933  	return c
  6934  }
  6935  
  6936  // Fields allows partial responses to be retrieved. See
  6937  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6938  // details.
  6939  func (c *ProjectsDatabasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsDeleteCall {
  6940  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6941  	return c
  6942  }
  6943  
  6944  // Context sets the context to be used in this call's Do method.
  6945  func (c *ProjectsDatabasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsDeleteCall {
  6946  	c.ctx_ = ctx
  6947  	return c
  6948  }
  6949  
  6950  // Header returns a http.Header that can be modified by the caller to add
  6951  // headers to the request.
  6952  func (c *ProjectsDatabasesDocumentsDeleteCall) Header() http.Header {
  6953  	if c.header_ == nil {
  6954  		c.header_ = make(http.Header)
  6955  	}
  6956  	return c.header_
  6957  }
  6958  
  6959  func (c *ProjectsDatabasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6960  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6961  	var body io.Reader = nil
  6962  	c.urlParams_.Set("alt", alt)
  6963  	c.urlParams_.Set("prettyPrint", "false")
  6964  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6965  	urls += "?" + c.urlParams_.Encode()
  6966  	req, err := http.NewRequest("DELETE", urls, body)
  6967  	if err != nil {
  6968  		return nil, err
  6969  	}
  6970  	req.Header = reqHeaders
  6971  	googleapi.Expand(req.URL, map[string]string{
  6972  		"name": c.name,
  6973  	})
  6974  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6975  }
  6976  
  6977  // Do executes the "firestore.projects.databases.documents.delete" call.
  6978  // Any non-2xx status code is an error. Response headers are in either
  6979  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6980  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6981  // whether the returned error was because http.StatusNotModified was returned.
  6982  func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6983  	gensupport.SetOptions(c.urlParams_, opts...)
  6984  	res, err := c.doRequest("json")
  6985  	if res != nil && res.StatusCode == http.StatusNotModified {
  6986  		if res.Body != nil {
  6987  			res.Body.Close()
  6988  		}
  6989  		return nil, gensupport.WrapError(&googleapi.Error{
  6990  			Code:   res.StatusCode,
  6991  			Header: res.Header,
  6992  		})
  6993  	}
  6994  	if err != nil {
  6995  		return nil, err
  6996  	}
  6997  	defer googleapi.CloseBody(res)
  6998  	if err := googleapi.CheckResponse(res); err != nil {
  6999  		return nil, gensupport.WrapError(err)
  7000  	}
  7001  	ret := &Empty{
  7002  		ServerResponse: googleapi.ServerResponse{
  7003  			Header:         res.Header,
  7004  			HTTPStatusCode: res.StatusCode,
  7005  		},
  7006  	}
  7007  	target := &ret
  7008  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7009  		return nil, err
  7010  	}
  7011  	return ret, nil
  7012  }
  7013  
  7014  type ProjectsDatabasesDocumentsGetCall struct {
  7015  	s            *Service
  7016  	name         string
  7017  	urlParams_   gensupport.URLParams
  7018  	ifNoneMatch_ string
  7019  	ctx_         context.Context
  7020  	header_      http.Header
  7021  }
  7022  
  7023  // Get: Gets a single document.
  7024  //
  7025  //   - name: The resource name of the Document to get. In the format:
  7026  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  7027  func (r *ProjectsDatabasesDocumentsService) Get(name string) *ProjectsDatabasesDocumentsGetCall {
  7028  	c := &ProjectsDatabasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7029  	c.name = name
  7030  	return c
  7031  }
  7032  
  7033  // MaskFieldPaths sets the optional parameter "mask.fieldPaths": The list of
  7034  // field paths in the mask. See Document.fields for a field path syntax
  7035  // reference.
  7036  func (c *ProjectsDatabasesDocumentsGetCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsGetCall {
  7037  	c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
  7038  	return c
  7039  }
  7040  
  7041  // ReadTime sets the optional parameter "readTime": Reads the version of the
  7042  // document at the given time. This must be a microsecond precision timestamp
  7043  // within the past one hour, or if Point-in-Time Recovery is enabled, can
  7044  // additionally be a whole minute timestamp within the past 7 days.
  7045  func (c *ProjectsDatabasesDocumentsGetCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsGetCall {
  7046  	c.urlParams_.Set("readTime", readTime)
  7047  	return c
  7048  }
  7049  
  7050  // Transaction sets the optional parameter "transaction": Reads the document in
  7051  // a transaction.
  7052  func (c *ProjectsDatabasesDocumentsGetCall) Transaction(transaction string) *ProjectsDatabasesDocumentsGetCall {
  7053  	c.urlParams_.Set("transaction", transaction)
  7054  	return c
  7055  }
  7056  
  7057  // Fields allows partial responses to be retrieved. See
  7058  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7059  // details.
  7060  func (c *ProjectsDatabasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsGetCall {
  7061  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7062  	return c
  7063  }
  7064  
  7065  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7066  // object's ETag matches the given value. This is useful for getting updates
  7067  // only after the object has changed since the last request.
  7068  func (c *ProjectsDatabasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsGetCall {
  7069  	c.ifNoneMatch_ = entityTag
  7070  	return c
  7071  }
  7072  
  7073  // Context sets the context to be used in this call's Do method.
  7074  func (c *ProjectsDatabasesDocumentsGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsGetCall {
  7075  	c.ctx_ = ctx
  7076  	return c
  7077  }
  7078  
  7079  // Header returns a http.Header that can be modified by the caller to add
  7080  // headers to the request.
  7081  func (c *ProjectsDatabasesDocumentsGetCall) Header() http.Header {
  7082  	if c.header_ == nil {
  7083  		c.header_ = make(http.Header)
  7084  	}
  7085  	return c.header_
  7086  }
  7087  
  7088  func (c *ProjectsDatabasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
  7089  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7090  	if c.ifNoneMatch_ != "" {
  7091  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7092  	}
  7093  	var body io.Reader = nil
  7094  	c.urlParams_.Set("alt", alt)
  7095  	c.urlParams_.Set("prettyPrint", "false")
  7096  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7097  	urls += "?" + c.urlParams_.Encode()
  7098  	req, err := http.NewRequest("GET", urls, body)
  7099  	if err != nil {
  7100  		return nil, err
  7101  	}
  7102  	req.Header = reqHeaders
  7103  	googleapi.Expand(req.URL, map[string]string{
  7104  		"name": c.name,
  7105  	})
  7106  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7107  }
  7108  
  7109  // Do executes the "firestore.projects.databases.documents.get" call.
  7110  // Any non-2xx status code is an error. Response headers are in either
  7111  // *Document.ServerResponse.Header or (if a response was returned at all) in
  7112  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7113  // whether the returned error was because http.StatusNotModified was returned.
  7114  func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*Document, error) {
  7115  	gensupport.SetOptions(c.urlParams_, opts...)
  7116  	res, err := c.doRequest("json")
  7117  	if res != nil && res.StatusCode == http.StatusNotModified {
  7118  		if res.Body != nil {
  7119  			res.Body.Close()
  7120  		}
  7121  		return nil, gensupport.WrapError(&googleapi.Error{
  7122  			Code:   res.StatusCode,
  7123  			Header: res.Header,
  7124  		})
  7125  	}
  7126  	if err != nil {
  7127  		return nil, err
  7128  	}
  7129  	defer googleapi.CloseBody(res)
  7130  	if err := googleapi.CheckResponse(res); err != nil {
  7131  		return nil, gensupport.WrapError(err)
  7132  	}
  7133  	ret := &Document{
  7134  		ServerResponse: googleapi.ServerResponse{
  7135  			Header:         res.Header,
  7136  			HTTPStatusCode: res.StatusCode,
  7137  		},
  7138  	}
  7139  	target := &ret
  7140  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7141  		return nil, err
  7142  	}
  7143  	return ret, nil
  7144  }
  7145  
  7146  type ProjectsDatabasesDocumentsListCall struct {
  7147  	s            *Service
  7148  	parent       string
  7149  	collectionId string
  7150  	urlParams_   gensupport.URLParams
  7151  	ifNoneMatch_ string
  7152  	ctx_         context.Context
  7153  	header_      http.Header
  7154  }
  7155  
  7156  // List: Lists documents.
  7157  //
  7158  //   - collectionId: Optional. The collection ID, relative to `parent`, to list.
  7159  //     For example: `chatrooms` or `messages`. This is optional, and when not
  7160  //     provided, Firestore will list documents from all collections under the
  7161  //     provided `parent`.
  7162  //   - parent: The parent resource name. In the format:
  7163  //     `projects/{project_id}/databases/{database_id}/documents` or
  7164  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  7165  //     For example: `projects/my-project/databases/my-database/documents` or
  7166  //     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`.
  7167  func (r *ProjectsDatabasesDocumentsService) List(parent string, collectionId string) *ProjectsDatabasesDocumentsListCall {
  7168  	c := &ProjectsDatabasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7169  	c.parent = parent
  7170  	c.collectionId = collectionId
  7171  	return c
  7172  }
  7173  
  7174  // MaskFieldPaths sets the optional parameter "mask.fieldPaths": The list of
  7175  // field paths in the mask. See Document.fields for a field path syntax
  7176  // reference.
  7177  func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListCall {
  7178  	c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
  7179  	return c
  7180  }
  7181  
  7182  // OrderBy sets the optional parameter "orderBy": The optional ordering of the
  7183  // documents to return. For example: `priority desc, __name__ desc`. This
  7184  // mirrors the `ORDER BY` used in Firestore queries but in a string
  7185  // representation. When absent, documents are ordered based on `__name__ ASC`.
  7186  func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall {
  7187  	c.urlParams_.Set("orderBy", orderBy)
  7188  	return c
  7189  }
  7190  
  7191  // PageSize sets the optional parameter "pageSize": The maximum number of
  7192  // documents to return in a single response. Firestore may return fewer than
  7193  // this value.
  7194  func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall {
  7195  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7196  	return c
  7197  }
  7198  
  7199  // PageToken sets the optional parameter "pageToken": A page token, received
  7200  // from a previous `ListDocuments` response. Provide this to retrieve the
  7201  // subsequent page. When paginating, all other parameters (with the exception
  7202  // of `page_size`) must match the values set in the request that generated the
  7203  // page token.
  7204  func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall {
  7205  	c.urlParams_.Set("pageToken", pageToken)
  7206  	return c
  7207  }
  7208  
  7209  // ReadTime sets the optional parameter "readTime": Perform the read at the
  7210  // provided time. This must be a microsecond precision timestamp within the
  7211  // past one hour, or if Point-in-Time Recovery is enabled, can additionally be
  7212  // a whole minute timestamp within the past 7 days.
  7213  func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall {
  7214  	c.urlParams_.Set("readTime", readTime)
  7215  	return c
  7216  }
  7217  
  7218  // ShowMissing sets the optional parameter "showMissing": If the list should
  7219  // show missing documents. A document is missing if it does not exist, but
  7220  // there are sub-documents nested underneath it. When true, such missing
  7221  // documents will be returned with a key but will not have fields,
  7222  // `create_time`, or `update_time` set. Requests with `show_missing` may not
  7223  // specify `where` or `order_by`.
  7224  func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall {
  7225  	c.urlParams_.Set("showMissing", fmt.Sprint(showMissing))
  7226  	return c
  7227  }
  7228  
  7229  // Transaction sets the optional parameter "transaction": Perform the read as
  7230  // part of an already active transaction.
  7231  func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall {
  7232  	c.urlParams_.Set("transaction", transaction)
  7233  	return c
  7234  }
  7235  
  7236  // Fields allows partial responses to be retrieved. See
  7237  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7238  // details.
  7239  func (c *ProjectsDatabasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCall {
  7240  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7241  	return c
  7242  }
  7243  
  7244  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7245  // object's ETag matches the given value. This is useful for getting updates
  7246  // only after the object has changed since the last request.
  7247  func (c *ProjectsDatabasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListCall {
  7248  	c.ifNoneMatch_ = entityTag
  7249  	return c
  7250  }
  7251  
  7252  // Context sets the context to be used in this call's Do method.
  7253  func (c *ProjectsDatabasesDocumentsListCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCall {
  7254  	c.ctx_ = ctx
  7255  	return c
  7256  }
  7257  
  7258  // Header returns a http.Header that can be modified by the caller to add
  7259  // headers to the request.
  7260  func (c *ProjectsDatabasesDocumentsListCall) Header() http.Header {
  7261  	if c.header_ == nil {
  7262  		c.header_ = make(http.Header)
  7263  	}
  7264  	return c.header_
  7265  }
  7266  
  7267  func (c *ProjectsDatabasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
  7268  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7269  	if c.ifNoneMatch_ != "" {
  7270  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7271  	}
  7272  	var body io.Reader = nil
  7273  	c.urlParams_.Set("alt", alt)
  7274  	c.urlParams_.Set("prettyPrint", "false")
  7275  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
  7276  	urls += "?" + c.urlParams_.Encode()
  7277  	req, err := http.NewRequest("GET", urls, body)
  7278  	if err != nil {
  7279  		return nil, err
  7280  	}
  7281  	req.Header = reqHeaders
  7282  	googleapi.Expand(req.URL, map[string]string{
  7283  		"parent":       c.parent,
  7284  		"collectionId": c.collectionId,
  7285  	})
  7286  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7287  }
  7288  
  7289  // Do executes the "firestore.projects.databases.documents.list" call.
  7290  // Any non-2xx status code is an error. Response headers are in either
  7291  // *ListDocumentsResponse.ServerResponse.Header or (if a response was returned
  7292  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7293  // check whether the returned error was because http.StatusNotModified was
  7294  // returned.
  7295  func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) {
  7296  	gensupport.SetOptions(c.urlParams_, opts...)
  7297  	res, err := c.doRequest("json")
  7298  	if res != nil && res.StatusCode == http.StatusNotModified {
  7299  		if res.Body != nil {
  7300  			res.Body.Close()
  7301  		}
  7302  		return nil, gensupport.WrapError(&googleapi.Error{
  7303  			Code:   res.StatusCode,
  7304  			Header: res.Header,
  7305  		})
  7306  	}
  7307  	if err != nil {
  7308  		return nil, err
  7309  	}
  7310  	defer googleapi.CloseBody(res)
  7311  	if err := googleapi.CheckResponse(res); err != nil {
  7312  		return nil, gensupport.WrapError(err)
  7313  	}
  7314  	ret := &ListDocumentsResponse{
  7315  		ServerResponse: googleapi.ServerResponse{
  7316  			Header:         res.Header,
  7317  			HTTPStatusCode: res.StatusCode,
  7318  		},
  7319  	}
  7320  	target := &ret
  7321  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7322  		return nil, err
  7323  	}
  7324  	return ret, nil
  7325  }
  7326  
  7327  // Pages invokes f for each page of results.
  7328  // A non-nil error returned from f will halt the iteration.
  7329  // The provided context supersedes any context provided to the Context method.
  7330  func (c *ProjectsDatabasesDocumentsListCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error {
  7331  	c.ctx_ = ctx
  7332  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7333  	for {
  7334  		x, err := c.Do()
  7335  		if err != nil {
  7336  			return err
  7337  		}
  7338  		if err := f(x); err != nil {
  7339  			return err
  7340  		}
  7341  		if x.NextPageToken == "" {
  7342  			return nil
  7343  		}
  7344  		c.PageToken(x.NextPageToken)
  7345  	}
  7346  }
  7347  
  7348  type ProjectsDatabasesDocumentsListCollectionIdsCall struct {
  7349  	s                        *Service
  7350  	parent                   string
  7351  	listcollectionidsrequest *ListCollectionIdsRequest
  7352  	urlParams_               gensupport.URLParams
  7353  	ctx_                     context.Context
  7354  	header_                  http.Header
  7355  }
  7356  
  7357  // ListCollectionIds: Lists all the collection IDs underneath a document.
  7358  //
  7359  //   - parent: The parent document. In the format:
  7360  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  7361  //     For example:
  7362  //     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`.
  7363  func (r *ProjectsDatabasesDocumentsService) ListCollectionIds(parent string, listcollectionidsrequest *ListCollectionIdsRequest) *ProjectsDatabasesDocumentsListCollectionIdsCall {
  7364  	c := &ProjectsDatabasesDocumentsListCollectionIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7365  	c.parent = parent
  7366  	c.listcollectionidsrequest = listcollectionidsrequest
  7367  	return c
  7368  }
  7369  
  7370  // Fields allows partial responses to be retrieved. See
  7371  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7372  // details.
  7373  func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCollectionIdsCall {
  7374  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7375  	return c
  7376  }
  7377  
  7378  // Context sets the context to be used in this call's Do method.
  7379  func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCollectionIdsCall {
  7380  	c.ctx_ = ctx
  7381  	return c
  7382  }
  7383  
  7384  // Header returns a http.Header that can be modified by the caller to add
  7385  // headers to the request.
  7386  func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Header() http.Header {
  7387  	if c.header_ == nil {
  7388  		c.header_ = make(http.Header)
  7389  	}
  7390  	return c.header_
  7391  }
  7392  
  7393  func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) (*http.Response, error) {
  7394  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7395  	var body io.Reader = nil
  7396  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listcollectionidsrequest)
  7397  	if err != nil {
  7398  		return nil, err
  7399  	}
  7400  	c.urlParams_.Set("alt", alt)
  7401  	c.urlParams_.Set("prettyPrint", "false")
  7402  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:listCollectionIds")
  7403  	urls += "?" + c.urlParams_.Encode()
  7404  	req, err := http.NewRequest("POST", urls, body)
  7405  	if err != nil {
  7406  		return nil, err
  7407  	}
  7408  	req.Header = reqHeaders
  7409  	googleapi.Expand(req.URL, map[string]string{
  7410  		"parent": c.parent,
  7411  	})
  7412  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7413  }
  7414  
  7415  // Do executes the "firestore.projects.databases.documents.listCollectionIds" call.
  7416  // Any non-2xx status code is an error. Response headers are in either
  7417  // *ListCollectionIdsResponse.ServerResponse.Header or (if a response was
  7418  // returned at all) in error.(*googleapi.Error).Header. Use
  7419  // googleapi.IsNotModified to check whether the returned error was because
  7420  // http.StatusNotModified was returned.
  7421  func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.CallOption) (*ListCollectionIdsResponse, error) {
  7422  	gensupport.SetOptions(c.urlParams_, opts...)
  7423  	res, err := c.doRequest("json")
  7424  	if res != nil && res.StatusCode == http.StatusNotModified {
  7425  		if res.Body != nil {
  7426  			res.Body.Close()
  7427  		}
  7428  		return nil, gensupport.WrapError(&googleapi.Error{
  7429  			Code:   res.StatusCode,
  7430  			Header: res.Header,
  7431  		})
  7432  	}
  7433  	if err != nil {
  7434  		return nil, err
  7435  	}
  7436  	defer googleapi.CloseBody(res)
  7437  	if err := googleapi.CheckResponse(res); err != nil {
  7438  		return nil, gensupport.WrapError(err)
  7439  	}
  7440  	ret := &ListCollectionIdsResponse{
  7441  		ServerResponse: googleapi.ServerResponse{
  7442  			Header:         res.Header,
  7443  			HTTPStatusCode: res.StatusCode,
  7444  		},
  7445  	}
  7446  	target := &ret
  7447  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7448  		return nil, err
  7449  	}
  7450  	return ret, nil
  7451  }
  7452  
  7453  // Pages invokes f for each page of results.
  7454  // A non-nil error returned from f will halt the iteration.
  7455  // The provided context supersedes any context provided to the Context method.
  7456  func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Context, f func(*ListCollectionIdsResponse) error) error {
  7457  	c.ctx_ = ctx
  7458  	defer func(pt string) { c.listcollectionidsrequest.PageToken = pt }(c.listcollectionidsrequest.PageToken)
  7459  	for {
  7460  		x, err := c.Do()
  7461  		if err != nil {
  7462  			return err
  7463  		}
  7464  		if err := f(x); err != nil {
  7465  			return err
  7466  		}
  7467  		if x.NextPageToken == "" {
  7468  			return nil
  7469  		}
  7470  		c.listcollectionidsrequest.PageToken = x.NextPageToken
  7471  	}
  7472  }
  7473  
  7474  type ProjectsDatabasesDocumentsListDocumentsCall struct {
  7475  	s            *Service
  7476  	parent       string
  7477  	collectionId string
  7478  	urlParams_   gensupport.URLParams
  7479  	ifNoneMatch_ string
  7480  	ctx_         context.Context
  7481  	header_      http.Header
  7482  }
  7483  
  7484  // ListDocuments: Lists documents.
  7485  //
  7486  //   - collectionId: Optional. The collection ID, relative to `parent`, to list.
  7487  //     For example: `chatrooms` or `messages`. This is optional, and when not
  7488  //     provided, Firestore will list documents from all collections under the
  7489  //     provided `parent`.
  7490  //   - parent: The parent resource name. In the format:
  7491  //     `projects/{project_id}/databases/{database_id}/documents` or
  7492  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  7493  //     For example: `projects/my-project/databases/my-database/documents` or
  7494  //     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`.
  7495  func (r *ProjectsDatabasesDocumentsService) ListDocuments(parent string, collectionId string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7496  	c := &ProjectsDatabasesDocumentsListDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7497  	c.parent = parent
  7498  	c.collectionId = collectionId
  7499  	return c
  7500  }
  7501  
  7502  // MaskFieldPaths sets the optional parameter "mask.fieldPaths": The list of
  7503  // field paths in the mask. See Document.fields for a field path syntax
  7504  // reference.
  7505  func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7506  	c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
  7507  	return c
  7508  }
  7509  
  7510  // OrderBy sets the optional parameter "orderBy": The optional ordering of the
  7511  // documents to return. For example: `priority desc, __name__ desc`. This
  7512  // mirrors the `ORDER BY` used in Firestore queries but in a string
  7513  // representation. When absent, documents are ordered based on `__name__ ASC`.
  7514  func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7515  	c.urlParams_.Set("orderBy", orderBy)
  7516  	return c
  7517  }
  7518  
  7519  // PageSize sets the optional parameter "pageSize": The maximum number of
  7520  // documents to return in a single response. Firestore may return fewer than
  7521  // this value.
  7522  func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall {
  7523  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7524  	return c
  7525  }
  7526  
  7527  // PageToken sets the optional parameter "pageToken": A page token, received
  7528  // from a previous `ListDocuments` response. Provide this to retrieve the
  7529  // subsequent page. When paginating, all other parameters (with the exception
  7530  // of `page_size`) must match the values set in the request that generated the
  7531  // page token.
  7532  func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7533  	c.urlParams_.Set("pageToken", pageToken)
  7534  	return c
  7535  }
  7536  
  7537  // ReadTime sets the optional parameter "readTime": Perform the read at the
  7538  // provided time. This must be a microsecond precision timestamp within the
  7539  // past one hour, or if Point-in-Time Recovery is enabled, can additionally be
  7540  // a whole minute timestamp within the past 7 days.
  7541  func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7542  	c.urlParams_.Set("readTime", readTime)
  7543  	return c
  7544  }
  7545  
  7546  // ShowMissing sets the optional parameter "showMissing": If the list should
  7547  // show missing documents. A document is missing if it does not exist, but
  7548  // there are sub-documents nested underneath it. When true, such missing
  7549  // documents will be returned with a key but will not have fields,
  7550  // `create_time`, or `update_time` set. Requests with `show_missing` may not
  7551  // specify `where` or `order_by`.
  7552  func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall {
  7553  	c.urlParams_.Set("showMissing", fmt.Sprint(showMissing))
  7554  	return c
  7555  }
  7556  
  7557  // Transaction sets the optional parameter "transaction": Perform the read as
  7558  // part of an already active transaction.
  7559  func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7560  	c.urlParams_.Set("transaction", transaction)
  7561  	return c
  7562  }
  7563  
  7564  // Fields allows partial responses to be retrieved. See
  7565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7566  // details.
  7567  func (c *ProjectsDatabasesDocumentsListDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListDocumentsCall {
  7568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7569  	return c
  7570  }
  7571  
  7572  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7573  // object's ETag matches the given value. This is useful for getting updates
  7574  // only after the object has changed since the last request.
  7575  func (c *ProjectsDatabasesDocumentsListDocumentsCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListDocumentsCall {
  7576  	c.ifNoneMatch_ = entityTag
  7577  	return c
  7578  }
  7579  
  7580  // Context sets the context to be used in this call's Do method.
  7581  func (c *ProjectsDatabasesDocumentsListDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListDocumentsCall {
  7582  	c.ctx_ = ctx
  7583  	return c
  7584  }
  7585  
  7586  // Header returns a http.Header that can be modified by the caller to add
  7587  // headers to the request.
  7588  func (c *ProjectsDatabasesDocumentsListDocumentsCall) Header() http.Header {
  7589  	if c.header_ == nil {
  7590  		c.header_ = make(http.Header)
  7591  	}
  7592  	return c.header_
  7593  }
  7594  
  7595  func (c *ProjectsDatabasesDocumentsListDocumentsCall) doRequest(alt string) (*http.Response, error) {
  7596  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7597  	if c.ifNoneMatch_ != "" {
  7598  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7599  	}
  7600  	var body io.Reader = nil
  7601  	c.urlParams_.Set("alt", alt)
  7602  	c.urlParams_.Set("prettyPrint", "false")
  7603  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
  7604  	urls += "?" + c.urlParams_.Encode()
  7605  	req, err := http.NewRequest("GET", urls, body)
  7606  	if err != nil {
  7607  		return nil, err
  7608  	}
  7609  	req.Header = reqHeaders
  7610  	googleapi.Expand(req.URL, map[string]string{
  7611  		"parent":       c.parent,
  7612  		"collectionId": c.collectionId,
  7613  	})
  7614  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7615  }
  7616  
  7617  // Do executes the "firestore.projects.databases.documents.listDocuments" call.
  7618  // Any non-2xx status code is an error. Response headers are in either
  7619  // *ListDocumentsResponse.ServerResponse.Header or (if a response was returned
  7620  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7621  // check whether the returned error was because http.StatusNotModified was
  7622  // returned.
  7623  func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) {
  7624  	gensupport.SetOptions(c.urlParams_, opts...)
  7625  	res, err := c.doRequest("json")
  7626  	if res != nil && res.StatusCode == http.StatusNotModified {
  7627  		if res.Body != nil {
  7628  			res.Body.Close()
  7629  		}
  7630  		return nil, gensupport.WrapError(&googleapi.Error{
  7631  			Code:   res.StatusCode,
  7632  			Header: res.Header,
  7633  		})
  7634  	}
  7635  	if err != nil {
  7636  		return nil, err
  7637  	}
  7638  	defer googleapi.CloseBody(res)
  7639  	if err := googleapi.CheckResponse(res); err != nil {
  7640  		return nil, gensupport.WrapError(err)
  7641  	}
  7642  	ret := &ListDocumentsResponse{
  7643  		ServerResponse: googleapi.ServerResponse{
  7644  			Header:         res.Header,
  7645  			HTTPStatusCode: res.StatusCode,
  7646  		},
  7647  	}
  7648  	target := &ret
  7649  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7650  		return nil, err
  7651  	}
  7652  	return ret, nil
  7653  }
  7654  
  7655  // Pages invokes f for each page of results.
  7656  // A non-nil error returned from f will halt the iteration.
  7657  // The provided context supersedes any context provided to the Context method.
  7658  func (c *ProjectsDatabasesDocumentsListDocumentsCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error {
  7659  	c.ctx_ = ctx
  7660  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7661  	for {
  7662  		x, err := c.Do()
  7663  		if err != nil {
  7664  			return err
  7665  		}
  7666  		if err := f(x); err != nil {
  7667  			return err
  7668  		}
  7669  		if x.NextPageToken == "" {
  7670  			return nil
  7671  		}
  7672  		c.PageToken(x.NextPageToken)
  7673  	}
  7674  }
  7675  
  7676  type ProjectsDatabasesDocumentsListenCall struct {
  7677  	s             *Service
  7678  	database      string
  7679  	listenrequest *ListenRequest
  7680  	urlParams_    gensupport.URLParams
  7681  	ctx_          context.Context
  7682  	header_       http.Header
  7683  }
  7684  
  7685  // Listen: Listens to changes. This method is only available via gRPC or
  7686  // WebChannel (not REST).
  7687  //
  7688  //   - database: The database name. In the format:
  7689  //     `projects/{project_id}/databases/{database_id}`.
  7690  func (r *ProjectsDatabasesDocumentsService) Listen(database string, listenrequest *ListenRequest) *ProjectsDatabasesDocumentsListenCall {
  7691  	c := &ProjectsDatabasesDocumentsListenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7692  	c.database = database
  7693  	c.listenrequest = listenrequest
  7694  	return c
  7695  }
  7696  
  7697  // Fields allows partial responses to be retrieved. See
  7698  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7699  // details.
  7700  func (c *ProjectsDatabasesDocumentsListenCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListenCall {
  7701  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7702  	return c
  7703  }
  7704  
  7705  // Context sets the context to be used in this call's Do method.
  7706  func (c *ProjectsDatabasesDocumentsListenCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListenCall {
  7707  	c.ctx_ = ctx
  7708  	return c
  7709  }
  7710  
  7711  // Header returns a http.Header that can be modified by the caller to add
  7712  // headers to the request.
  7713  func (c *ProjectsDatabasesDocumentsListenCall) Header() http.Header {
  7714  	if c.header_ == nil {
  7715  		c.header_ = make(http.Header)
  7716  	}
  7717  	return c.header_
  7718  }
  7719  
  7720  func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Response, error) {
  7721  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7722  	var body io.Reader = nil
  7723  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listenrequest)
  7724  	if err != nil {
  7725  		return nil, err
  7726  	}
  7727  	c.urlParams_.Set("alt", alt)
  7728  	c.urlParams_.Set("prettyPrint", "false")
  7729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:listen")
  7730  	urls += "?" + c.urlParams_.Encode()
  7731  	req, err := http.NewRequest("POST", urls, body)
  7732  	if err != nil {
  7733  		return nil, err
  7734  	}
  7735  	req.Header = reqHeaders
  7736  	googleapi.Expand(req.URL, map[string]string{
  7737  		"database": c.database,
  7738  	})
  7739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7740  }
  7741  
  7742  // Do executes the "firestore.projects.databases.documents.listen" call.
  7743  // Any non-2xx status code is an error. Response headers are in either
  7744  // *ListenResponse.ServerResponse.Header or (if a response was returned at all)
  7745  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7746  // whether the returned error was because http.StatusNotModified was returned.
  7747  func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) (*ListenResponse, error) {
  7748  	gensupport.SetOptions(c.urlParams_, opts...)
  7749  	res, err := c.doRequest("json")
  7750  	if res != nil && res.StatusCode == http.StatusNotModified {
  7751  		if res.Body != nil {
  7752  			res.Body.Close()
  7753  		}
  7754  		return nil, gensupport.WrapError(&googleapi.Error{
  7755  			Code:   res.StatusCode,
  7756  			Header: res.Header,
  7757  		})
  7758  	}
  7759  	if err != nil {
  7760  		return nil, err
  7761  	}
  7762  	defer googleapi.CloseBody(res)
  7763  	if err := googleapi.CheckResponse(res); err != nil {
  7764  		return nil, gensupport.WrapError(err)
  7765  	}
  7766  	ret := &ListenResponse{
  7767  		ServerResponse: googleapi.ServerResponse{
  7768  			Header:         res.Header,
  7769  			HTTPStatusCode: res.StatusCode,
  7770  		},
  7771  	}
  7772  	target := &ret
  7773  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7774  		return nil, err
  7775  	}
  7776  	return ret, nil
  7777  }
  7778  
  7779  type ProjectsDatabasesDocumentsPartitionQueryCall struct {
  7780  	s                     *Service
  7781  	parent                string
  7782  	partitionqueryrequest *PartitionQueryRequest
  7783  	urlParams_            gensupport.URLParams
  7784  	ctx_                  context.Context
  7785  	header_               http.Header
  7786  }
  7787  
  7788  // PartitionQuery: Partitions a query by returning partition cursors that can
  7789  // be used to run the query in parallel. The returned partition cursors are
  7790  // split points that can be used by RunQuery as starting/end points for the
  7791  // query results.
  7792  //
  7793  //   - parent: The parent resource name. In the format:
  7794  //     `projects/{project_id}/databases/{database_id}/documents`. Document
  7795  //     resource names are not supported; only database resource names can be
  7796  //     specified.
  7797  func (r *ProjectsDatabasesDocumentsService) PartitionQuery(parent string, partitionqueryrequest *PartitionQueryRequest) *ProjectsDatabasesDocumentsPartitionQueryCall {
  7798  	c := &ProjectsDatabasesDocumentsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7799  	c.parent = parent
  7800  	c.partitionqueryrequest = partitionqueryrequest
  7801  	return c
  7802  }
  7803  
  7804  // Fields allows partial responses to be retrieved. See
  7805  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7806  // details.
  7807  func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPartitionQueryCall {
  7808  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7809  	return c
  7810  }
  7811  
  7812  // Context sets the context to be used in this call's Do method.
  7813  func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPartitionQueryCall {
  7814  	c.ctx_ = ctx
  7815  	return c
  7816  }
  7817  
  7818  // Header returns a http.Header that can be modified by the caller to add
  7819  // headers to the request.
  7820  func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Header() http.Header {
  7821  	if c.header_ == nil {
  7822  		c.header_ = make(http.Header)
  7823  	}
  7824  	return c.header_
  7825  }
  7826  
  7827  func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*http.Response, error) {
  7828  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7829  	var body io.Reader = nil
  7830  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionqueryrequest)
  7831  	if err != nil {
  7832  		return nil, err
  7833  	}
  7834  	c.urlParams_.Set("alt", alt)
  7835  	c.urlParams_.Set("prettyPrint", "false")
  7836  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:partitionQuery")
  7837  	urls += "?" + c.urlParams_.Encode()
  7838  	req, err := http.NewRequest("POST", urls, body)
  7839  	if err != nil {
  7840  		return nil, err
  7841  	}
  7842  	req.Header = reqHeaders
  7843  	googleapi.Expand(req.URL, map[string]string{
  7844  		"parent": c.parent,
  7845  	})
  7846  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7847  }
  7848  
  7849  // Do executes the "firestore.projects.databases.documents.partitionQuery" call.
  7850  // Any non-2xx status code is an error. Response headers are in either
  7851  // *PartitionQueryResponse.ServerResponse.Header or (if a response was returned
  7852  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7853  // check whether the returned error was because http.StatusNotModified was
  7854  // returned.
  7855  func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionQueryResponse, error) {
  7856  	gensupport.SetOptions(c.urlParams_, opts...)
  7857  	res, err := c.doRequest("json")
  7858  	if res != nil && res.StatusCode == http.StatusNotModified {
  7859  		if res.Body != nil {
  7860  			res.Body.Close()
  7861  		}
  7862  		return nil, gensupport.WrapError(&googleapi.Error{
  7863  			Code:   res.StatusCode,
  7864  			Header: res.Header,
  7865  		})
  7866  	}
  7867  	if err != nil {
  7868  		return nil, err
  7869  	}
  7870  	defer googleapi.CloseBody(res)
  7871  	if err := googleapi.CheckResponse(res); err != nil {
  7872  		return nil, gensupport.WrapError(err)
  7873  	}
  7874  	ret := &PartitionQueryResponse{
  7875  		ServerResponse: googleapi.ServerResponse{
  7876  			Header:         res.Header,
  7877  			HTTPStatusCode: res.StatusCode,
  7878  		},
  7879  	}
  7880  	target := &ret
  7881  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7882  		return nil, err
  7883  	}
  7884  	return ret, nil
  7885  }
  7886  
  7887  // Pages invokes f for each page of results.
  7888  // A non-nil error returned from f will halt the iteration.
  7889  // The provided context supersedes any context provided to the Context method.
  7890  func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Pages(ctx context.Context, f func(*PartitionQueryResponse) error) error {
  7891  	c.ctx_ = ctx
  7892  	defer func(pt string) { c.partitionqueryrequest.PageToken = pt }(c.partitionqueryrequest.PageToken)
  7893  	for {
  7894  		x, err := c.Do()
  7895  		if err != nil {
  7896  			return err
  7897  		}
  7898  		if err := f(x); err != nil {
  7899  			return err
  7900  		}
  7901  		if x.NextPageToken == "" {
  7902  			return nil
  7903  		}
  7904  		c.partitionqueryrequest.PageToken = x.NextPageToken
  7905  	}
  7906  }
  7907  
  7908  type ProjectsDatabasesDocumentsPatchCall struct {
  7909  	s          *Service
  7910  	name       string
  7911  	document   *Document
  7912  	urlParams_ gensupport.URLParams
  7913  	ctx_       context.Context
  7914  	header_    http.Header
  7915  }
  7916  
  7917  // Patch: Updates or inserts a document.
  7918  //
  7919  //   - name: The resource name of the document, for example
  7920  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  7921  func (r *ProjectsDatabasesDocumentsService) Patch(name string, document *Document) *ProjectsDatabasesDocumentsPatchCall {
  7922  	c := &ProjectsDatabasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7923  	c.name = name
  7924  	c.document = document
  7925  	return c
  7926  }
  7927  
  7928  // CurrentDocumentExists sets the optional parameter "currentDocument.exists":
  7929  // When set to `true`, the target document must exist. When set to `false`, the
  7930  // target document must not exist.
  7931  func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsPatchCall {
  7932  	c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists))
  7933  	return c
  7934  }
  7935  
  7936  // CurrentDocumentUpdateTime sets the optional parameter
  7937  // "currentDocument.updateTime": When set, the target document must exist and
  7938  // have been last updated at that time. Timestamp must be microsecond aligned.
  7939  func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsPatchCall {
  7940  	c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime)
  7941  	return c
  7942  }
  7943  
  7944  // MaskFieldPaths sets the optional parameter "mask.fieldPaths": The list of
  7945  // field paths in the mask. See Document.fields for a field path syntax
  7946  // reference.
  7947  func (c *ProjectsDatabasesDocumentsPatchCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall {
  7948  	c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
  7949  	return c
  7950  }
  7951  
  7952  // UpdateMaskFieldPaths sets the optional parameter "updateMask.fieldPaths":
  7953  // The list of field paths in the mask. See Document.fields for a field path
  7954  // syntax reference.
  7955  func (c *ProjectsDatabasesDocumentsPatchCall) UpdateMaskFieldPaths(updateMaskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall {
  7956  	c.urlParams_.SetMulti("updateMask.fieldPaths", append([]string{}, updateMaskFieldPaths...))
  7957  	return c
  7958  }
  7959  
  7960  // Fields allows partial responses to be retrieved. See
  7961  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7962  // details.
  7963  func (c *ProjectsDatabasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPatchCall {
  7964  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7965  	return c
  7966  }
  7967  
  7968  // Context sets the context to be used in this call's Do method.
  7969  func (c *ProjectsDatabasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPatchCall {
  7970  	c.ctx_ = ctx
  7971  	return c
  7972  }
  7973  
  7974  // Header returns a http.Header that can be modified by the caller to add
  7975  // headers to the request.
  7976  func (c *ProjectsDatabasesDocumentsPatchCall) Header() http.Header {
  7977  	if c.header_ == nil {
  7978  		c.header_ = make(http.Header)
  7979  	}
  7980  	return c.header_
  7981  }
  7982  
  7983  func (c *ProjectsDatabasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
  7984  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7985  	var body io.Reader = nil
  7986  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
  7987  	if err != nil {
  7988  		return nil, err
  7989  	}
  7990  	c.urlParams_.Set("alt", alt)
  7991  	c.urlParams_.Set("prettyPrint", "false")
  7992  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7993  	urls += "?" + c.urlParams_.Encode()
  7994  	req, err := http.NewRequest("PATCH", urls, body)
  7995  	if err != nil {
  7996  		return nil, err
  7997  	}
  7998  	req.Header = reqHeaders
  7999  	googleapi.Expand(req.URL, map[string]string{
  8000  		"name": c.name,
  8001  	})
  8002  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8003  }
  8004  
  8005  // Do executes the "firestore.projects.databases.documents.patch" call.
  8006  // Any non-2xx status code is an error. Response headers are in either
  8007  // *Document.ServerResponse.Header or (if a response was returned at all) in
  8008  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8009  // whether the returned error was because http.StatusNotModified was returned.
  8010  func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*Document, error) {
  8011  	gensupport.SetOptions(c.urlParams_, opts...)
  8012  	res, err := c.doRequest("json")
  8013  	if res != nil && res.StatusCode == http.StatusNotModified {
  8014  		if res.Body != nil {
  8015  			res.Body.Close()
  8016  		}
  8017  		return nil, gensupport.WrapError(&googleapi.Error{
  8018  			Code:   res.StatusCode,
  8019  			Header: res.Header,
  8020  		})
  8021  	}
  8022  	if err != nil {
  8023  		return nil, err
  8024  	}
  8025  	defer googleapi.CloseBody(res)
  8026  	if err := googleapi.CheckResponse(res); err != nil {
  8027  		return nil, gensupport.WrapError(err)
  8028  	}
  8029  	ret := &Document{
  8030  		ServerResponse: googleapi.ServerResponse{
  8031  			Header:         res.Header,
  8032  			HTTPStatusCode: res.StatusCode,
  8033  		},
  8034  	}
  8035  	target := &ret
  8036  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8037  		return nil, err
  8038  	}
  8039  	return ret, nil
  8040  }
  8041  
  8042  type ProjectsDatabasesDocumentsRollbackCall struct {
  8043  	s               *Service
  8044  	database        string
  8045  	rollbackrequest *RollbackRequest
  8046  	urlParams_      gensupport.URLParams
  8047  	ctx_            context.Context
  8048  	header_         http.Header
  8049  }
  8050  
  8051  // Rollback: Rolls back a transaction.
  8052  //
  8053  //   - database: The database name. In the format:
  8054  //     `projects/{project_id}/databases/{database_id}`.
  8055  func (r *ProjectsDatabasesDocumentsService) Rollback(database string, rollbackrequest *RollbackRequest) *ProjectsDatabasesDocumentsRollbackCall {
  8056  	c := &ProjectsDatabasesDocumentsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8057  	c.database = database
  8058  	c.rollbackrequest = rollbackrequest
  8059  	return c
  8060  }
  8061  
  8062  // Fields allows partial responses to be retrieved. See
  8063  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8064  // details.
  8065  func (c *ProjectsDatabasesDocumentsRollbackCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRollbackCall {
  8066  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8067  	return c
  8068  }
  8069  
  8070  // Context sets the context to be used in this call's Do method.
  8071  func (c *ProjectsDatabasesDocumentsRollbackCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRollbackCall {
  8072  	c.ctx_ = ctx
  8073  	return c
  8074  }
  8075  
  8076  // Header returns a http.Header that can be modified by the caller to add
  8077  // headers to the request.
  8078  func (c *ProjectsDatabasesDocumentsRollbackCall) Header() http.Header {
  8079  	if c.header_ == nil {
  8080  		c.header_ = make(http.Header)
  8081  	}
  8082  	return c.header_
  8083  }
  8084  
  8085  func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Response, error) {
  8086  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8087  	var body io.Reader = nil
  8088  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
  8089  	if err != nil {
  8090  		return nil, err
  8091  	}
  8092  	c.urlParams_.Set("alt", alt)
  8093  	c.urlParams_.Set("prettyPrint", "false")
  8094  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:rollback")
  8095  	urls += "?" + c.urlParams_.Encode()
  8096  	req, err := http.NewRequest("POST", urls, body)
  8097  	if err != nil {
  8098  		return nil, err
  8099  	}
  8100  	req.Header = reqHeaders
  8101  	googleapi.Expand(req.URL, map[string]string{
  8102  		"database": c.database,
  8103  	})
  8104  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8105  }
  8106  
  8107  // Do executes the "firestore.projects.databases.documents.rollback" call.
  8108  // Any non-2xx status code is an error. Response headers are in either
  8109  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8110  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8111  // whether the returned error was because http.StatusNotModified was returned.
  8112  func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8113  	gensupport.SetOptions(c.urlParams_, opts...)
  8114  	res, err := c.doRequest("json")
  8115  	if res != nil && res.StatusCode == http.StatusNotModified {
  8116  		if res.Body != nil {
  8117  			res.Body.Close()
  8118  		}
  8119  		return nil, gensupport.WrapError(&googleapi.Error{
  8120  			Code:   res.StatusCode,
  8121  			Header: res.Header,
  8122  		})
  8123  	}
  8124  	if err != nil {
  8125  		return nil, err
  8126  	}
  8127  	defer googleapi.CloseBody(res)
  8128  	if err := googleapi.CheckResponse(res); err != nil {
  8129  		return nil, gensupport.WrapError(err)
  8130  	}
  8131  	ret := &Empty{
  8132  		ServerResponse: googleapi.ServerResponse{
  8133  			Header:         res.Header,
  8134  			HTTPStatusCode: res.StatusCode,
  8135  		},
  8136  	}
  8137  	target := &ret
  8138  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8139  		return nil, err
  8140  	}
  8141  	return ret, nil
  8142  }
  8143  
  8144  type ProjectsDatabasesDocumentsRunAggregationQueryCall struct {
  8145  	s                          *Service
  8146  	parent                     string
  8147  	runaggregationqueryrequest *RunAggregationQueryRequest
  8148  	urlParams_                 gensupport.URLParams
  8149  	ctx_                       context.Context
  8150  	header_                    http.Header
  8151  }
  8152  
  8153  // RunAggregationQuery: Runs an aggregation query. Rather than producing
  8154  // Document results like Firestore.RunQuery, this API allows running an
  8155  // aggregation to produce a series of AggregationResult server-side. High-Level
  8156  // Example: ``` -- Return the number of documents in table given a filter.
  8157  // SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```
  8158  //
  8159  //   - parent: The parent resource name. In the format:
  8160  //     `projects/{project_id}/databases/{database_id}/documents` or
  8161  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  8162  //     For example: `projects/my-project/databases/my-database/documents` or
  8163  //     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`.
  8164  func (r *ProjectsDatabasesDocumentsService) RunAggregationQuery(parent string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsDatabasesDocumentsRunAggregationQueryCall {
  8165  	c := &ProjectsDatabasesDocumentsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8166  	c.parent = parent
  8167  	c.runaggregationqueryrequest = runaggregationqueryrequest
  8168  	return c
  8169  }
  8170  
  8171  // Fields allows partial responses to be retrieved. See
  8172  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8173  // details.
  8174  func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunAggregationQueryCall {
  8175  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8176  	return c
  8177  }
  8178  
  8179  // Context sets the context to be used in this call's Do method.
  8180  func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunAggregationQueryCall {
  8181  	c.ctx_ = ctx
  8182  	return c
  8183  }
  8184  
  8185  // Header returns a http.Header that can be modified by the caller to add
  8186  // headers to the request.
  8187  func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Header() http.Header {
  8188  	if c.header_ == nil {
  8189  		c.header_ = make(http.Header)
  8190  	}
  8191  	return c.header_
  8192  }
  8193  
  8194  func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) {
  8195  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8196  	var body io.Reader = nil
  8197  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest)
  8198  	if err != nil {
  8199  		return nil, err
  8200  	}
  8201  	c.urlParams_.Set("alt", alt)
  8202  	c.urlParams_.Set("prettyPrint", "false")
  8203  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runAggregationQuery")
  8204  	urls += "?" + c.urlParams_.Encode()
  8205  	req, err := http.NewRequest("POST", urls, body)
  8206  	if err != nil {
  8207  		return nil, err
  8208  	}
  8209  	req.Header = reqHeaders
  8210  	googleapi.Expand(req.URL, map[string]string{
  8211  		"parent": c.parent,
  8212  	})
  8213  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8214  }
  8215  
  8216  // Do executes the "firestore.projects.databases.documents.runAggregationQuery" call.
  8217  // Any non-2xx status code is an error. Response headers are in either
  8218  // *RunAggregationQueryResponse.ServerResponse.Header or (if a response was
  8219  // returned at all) in error.(*googleapi.Error).Header. Use
  8220  // googleapi.IsNotModified to check whether the returned error was because
  8221  // http.StatusNotModified was returned.
  8222  func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) {
  8223  	gensupport.SetOptions(c.urlParams_, opts...)
  8224  	res, err := c.doRequest("json")
  8225  	if res != nil && res.StatusCode == http.StatusNotModified {
  8226  		if res.Body != nil {
  8227  			res.Body.Close()
  8228  		}
  8229  		return nil, gensupport.WrapError(&googleapi.Error{
  8230  			Code:   res.StatusCode,
  8231  			Header: res.Header,
  8232  		})
  8233  	}
  8234  	if err != nil {
  8235  		return nil, err
  8236  	}
  8237  	defer googleapi.CloseBody(res)
  8238  	if err := googleapi.CheckResponse(res); err != nil {
  8239  		return nil, gensupport.WrapError(err)
  8240  	}
  8241  	ret := &RunAggregationQueryResponse{
  8242  		ServerResponse: googleapi.ServerResponse{
  8243  			Header:         res.Header,
  8244  			HTTPStatusCode: res.StatusCode,
  8245  		},
  8246  	}
  8247  	target := &ret
  8248  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8249  		return nil, err
  8250  	}
  8251  	return ret, nil
  8252  }
  8253  
  8254  type ProjectsDatabasesDocumentsRunQueryCall struct {
  8255  	s               *Service
  8256  	parent          string
  8257  	runqueryrequest *RunQueryRequest
  8258  	urlParams_      gensupport.URLParams
  8259  	ctx_            context.Context
  8260  	header_         http.Header
  8261  }
  8262  
  8263  // RunQuery: Runs a query.
  8264  //
  8265  //   - parent: The parent resource name. In the format:
  8266  //     `projects/{project_id}/databases/{database_id}/documents` or
  8267  //     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  8268  //     For example: `projects/my-project/databases/my-database/documents` or
  8269  //     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`.
  8270  func (r *ProjectsDatabasesDocumentsService) RunQuery(parent string, runqueryrequest *RunQueryRequest) *ProjectsDatabasesDocumentsRunQueryCall {
  8271  	c := &ProjectsDatabasesDocumentsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8272  	c.parent = parent
  8273  	c.runqueryrequest = runqueryrequest
  8274  	return c
  8275  }
  8276  
  8277  // Fields allows partial responses to be retrieved. See
  8278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8279  // details.
  8280  func (c *ProjectsDatabasesDocumentsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunQueryCall {
  8281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8282  	return c
  8283  }
  8284  
  8285  // Context sets the context to be used in this call's Do method.
  8286  func (c *ProjectsDatabasesDocumentsRunQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunQueryCall {
  8287  	c.ctx_ = ctx
  8288  	return c
  8289  }
  8290  
  8291  // Header returns a http.Header that can be modified by the caller to add
  8292  // headers to the request.
  8293  func (c *ProjectsDatabasesDocumentsRunQueryCall) Header() http.Header {
  8294  	if c.header_ == nil {
  8295  		c.header_ = make(http.Header)
  8296  	}
  8297  	return c.header_
  8298  }
  8299  
  8300  func (c *ProjectsDatabasesDocumentsRunQueryCall) doRequest(alt string) (*http.Response, error) {
  8301  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8302  	var body io.Reader = nil
  8303  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
  8304  	if err != nil {
  8305  		return nil, err
  8306  	}
  8307  	c.urlParams_.Set("alt", alt)
  8308  	c.urlParams_.Set("prettyPrint", "false")
  8309  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runQuery")
  8310  	urls += "?" + c.urlParams_.Encode()
  8311  	req, err := http.NewRequest("POST", urls, body)
  8312  	if err != nil {
  8313  		return nil, err
  8314  	}
  8315  	req.Header = reqHeaders
  8316  	googleapi.Expand(req.URL, map[string]string{
  8317  		"parent": c.parent,
  8318  	})
  8319  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8320  }
  8321  
  8322  // Do executes the "firestore.projects.databases.documents.runQuery" call.
  8323  // Any non-2xx status code is an error. Response headers are in either
  8324  // *RunQueryResponse.ServerResponse.Header or (if a response was returned at
  8325  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8326  // check whether the returned error was because http.StatusNotModified was
  8327  // returned.
  8328  func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) {
  8329  	gensupport.SetOptions(c.urlParams_, opts...)
  8330  	res, err := c.doRequest("json")
  8331  	if res != nil && res.StatusCode == http.StatusNotModified {
  8332  		if res.Body != nil {
  8333  			res.Body.Close()
  8334  		}
  8335  		return nil, gensupport.WrapError(&googleapi.Error{
  8336  			Code:   res.StatusCode,
  8337  			Header: res.Header,
  8338  		})
  8339  	}
  8340  	if err != nil {
  8341  		return nil, err
  8342  	}
  8343  	defer googleapi.CloseBody(res)
  8344  	if err := googleapi.CheckResponse(res); err != nil {
  8345  		return nil, gensupport.WrapError(err)
  8346  	}
  8347  	ret := &RunQueryResponse{
  8348  		ServerResponse: googleapi.ServerResponse{
  8349  			Header:         res.Header,
  8350  			HTTPStatusCode: res.StatusCode,
  8351  		},
  8352  	}
  8353  	target := &ret
  8354  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8355  		return nil, err
  8356  	}
  8357  	return ret, nil
  8358  }
  8359  
  8360  type ProjectsDatabasesDocumentsWriteCall struct {
  8361  	s            *Service
  8362  	database     string
  8363  	writerequest *WriteRequest
  8364  	urlParams_   gensupport.URLParams
  8365  	ctx_         context.Context
  8366  	header_      http.Header
  8367  }
  8368  
  8369  // Write: Streams batches of document updates and deletes, in order. This
  8370  // method is only available via gRPC or WebChannel (not REST).
  8371  //
  8372  //   - database: The database name. In the format:
  8373  //     `projects/{project_id}/databases/{database_id}`. This is only required in
  8374  //     the first message.
  8375  func (r *ProjectsDatabasesDocumentsService) Write(database string, writerequest *WriteRequest) *ProjectsDatabasesDocumentsWriteCall {
  8376  	c := &ProjectsDatabasesDocumentsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8377  	c.database = database
  8378  	c.writerequest = writerequest
  8379  	return c
  8380  }
  8381  
  8382  // Fields allows partial responses to be retrieved. See
  8383  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8384  // details.
  8385  func (c *ProjectsDatabasesDocumentsWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsWriteCall {
  8386  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8387  	return c
  8388  }
  8389  
  8390  // Context sets the context to be used in this call's Do method.
  8391  func (c *ProjectsDatabasesDocumentsWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsWriteCall {
  8392  	c.ctx_ = ctx
  8393  	return c
  8394  }
  8395  
  8396  // Header returns a http.Header that can be modified by the caller to add
  8397  // headers to the request.
  8398  func (c *ProjectsDatabasesDocumentsWriteCall) Header() http.Header {
  8399  	if c.header_ == nil {
  8400  		c.header_ = make(http.Header)
  8401  	}
  8402  	return c.header_
  8403  }
  8404  
  8405  func (c *ProjectsDatabasesDocumentsWriteCall) doRequest(alt string) (*http.Response, error) {
  8406  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8407  	var body io.Reader = nil
  8408  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.writerequest)
  8409  	if err != nil {
  8410  		return nil, err
  8411  	}
  8412  	c.urlParams_.Set("alt", alt)
  8413  	c.urlParams_.Set("prettyPrint", "false")
  8414  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:write")
  8415  	urls += "?" + c.urlParams_.Encode()
  8416  	req, err := http.NewRequest("POST", urls, body)
  8417  	if err != nil {
  8418  		return nil, err
  8419  	}
  8420  	req.Header = reqHeaders
  8421  	googleapi.Expand(req.URL, map[string]string{
  8422  		"database": c.database,
  8423  	})
  8424  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8425  }
  8426  
  8427  // Do executes the "firestore.projects.databases.documents.write" call.
  8428  // Any non-2xx status code is an error. Response headers are in either
  8429  // *WriteResponse.ServerResponse.Header or (if a response was returned at all)
  8430  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8431  // whether the returned error was because http.StatusNotModified was returned.
  8432  func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) (*WriteResponse, error) {
  8433  	gensupport.SetOptions(c.urlParams_, opts...)
  8434  	res, err := c.doRequest("json")
  8435  	if res != nil && res.StatusCode == http.StatusNotModified {
  8436  		if res.Body != nil {
  8437  			res.Body.Close()
  8438  		}
  8439  		return nil, gensupport.WrapError(&googleapi.Error{
  8440  			Code:   res.StatusCode,
  8441  			Header: res.Header,
  8442  		})
  8443  	}
  8444  	if err != nil {
  8445  		return nil, err
  8446  	}
  8447  	defer googleapi.CloseBody(res)
  8448  	if err := googleapi.CheckResponse(res); err != nil {
  8449  		return nil, gensupport.WrapError(err)
  8450  	}
  8451  	ret := &WriteResponse{
  8452  		ServerResponse: googleapi.ServerResponse{
  8453  			Header:         res.Header,
  8454  			HTTPStatusCode: res.StatusCode,
  8455  		},
  8456  	}
  8457  	target := &ret
  8458  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8459  		return nil, err
  8460  	}
  8461  	return ret, nil
  8462  }
  8463  
  8464  type ProjectsDatabasesOperationsCancelCall struct {
  8465  	s                                       *Service
  8466  	name                                    string
  8467  	googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
  8468  	urlParams_                              gensupport.URLParams
  8469  	ctx_                                    context.Context
  8470  	header_                                 http.Header
  8471  }
  8472  
  8473  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  8474  // server makes a best effort to cancel the operation, but success is not
  8475  // guaranteed. If the server doesn't support this method, it returns
  8476  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  8477  // other methods to check whether the cancellation succeeded or whether the
  8478  // operation completed despite cancellation. On successful cancellation, the
  8479  // operation is not deleted; instead, it becomes an operation with an
  8480  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  8481  // `Code.CANCELLED`.
  8482  //
  8483  // - name: The name of the operation resource to be cancelled.
  8484  func (r *ProjectsDatabasesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsDatabasesOperationsCancelCall {
  8485  	c := &ProjectsDatabasesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8486  	c.name = name
  8487  	c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
  8488  	return c
  8489  }
  8490  
  8491  // Fields allows partial responses to be retrieved. See
  8492  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8493  // details.
  8494  func (c *ProjectsDatabasesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsCancelCall {
  8495  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8496  	return c
  8497  }
  8498  
  8499  // Context sets the context to be used in this call's Do method.
  8500  func (c *ProjectsDatabasesOperationsCancelCall) Context(ctx context.Context) *ProjectsDatabasesOperationsCancelCall {
  8501  	c.ctx_ = ctx
  8502  	return c
  8503  }
  8504  
  8505  // Header returns a http.Header that can be modified by the caller to add
  8506  // headers to the request.
  8507  func (c *ProjectsDatabasesOperationsCancelCall) Header() http.Header {
  8508  	if c.header_ == nil {
  8509  		c.header_ = make(http.Header)
  8510  	}
  8511  	return c.header_
  8512  }
  8513  
  8514  func (c *ProjectsDatabasesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  8515  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8516  	var body io.Reader = nil
  8517  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
  8518  	if err != nil {
  8519  		return nil, err
  8520  	}
  8521  	c.urlParams_.Set("alt", alt)
  8522  	c.urlParams_.Set("prettyPrint", "false")
  8523  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  8524  	urls += "?" + c.urlParams_.Encode()
  8525  	req, err := http.NewRequest("POST", urls, body)
  8526  	if err != nil {
  8527  		return nil, err
  8528  	}
  8529  	req.Header = reqHeaders
  8530  	googleapi.Expand(req.URL, map[string]string{
  8531  		"name": c.name,
  8532  	})
  8533  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8534  }
  8535  
  8536  // Do executes the "firestore.projects.databases.operations.cancel" call.
  8537  // Any non-2xx status code is an error. Response headers are in either
  8538  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8539  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8540  // whether the returned error was because http.StatusNotModified was returned.
  8541  func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8542  	gensupport.SetOptions(c.urlParams_, opts...)
  8543  	res, err := c.doRequest("json")
  8544  	if res != nil && res.StatusCode == http.StatusNotModified {
  8545  		if res.Body != nil {
  8546  			res.Body.Close()
  8547  		}
  8548  		return nil, gensupport.WrapError(&googleapi.Error{
  8549  			Code:   res.StatusCode,
  8550  			Header: res.Header,
  8551  		})
  8552  	}
  8553  	if err != nil {
  8554  		return nil, err
  8555  	}
  8556  	defer googleapi.CloseBody(res)
  8557  	if err := googleapi.CheckResponse(res); err != nil {
  8558  		return nil, gensupport.WrapError(err)
  8559  	}
  8560  	ret := &Empty{
  8561  		ServerResponse: googleapi.ServerResponse{
  8562  			Header:         res.Header,
  8563  			HTTPStatusCode: res.StatusCode,
  8564  		},
  8565  	}
  8566  	target := &ret
  8567  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8568  		return nil, err
  8569  	}
  8570  	return ret, nil
  8571  }
  8572  
  8573  type ProjectsDatabasesOperationsDeleteCall struct {
  8574  	s          *Service
  8575  	name       string
  8576  	urlParams_ gensupport.URLParams
  8577  	ctx_       context.Context
  8578  	header_    http.Header
  8579  }
  8580  
  8581  // Delete: Deletes a long-running operation. This method indicates that the
  8582  // client is no longer interested in the operation result. It does not cancel
  8583  // the operation. If the server doesn't support this method, it returns
  8584  // `google.rpc.Code.UNIMPLEMENTED`.
  8585  //
  8586  // - name: The name of the operation resource to be deleted.
  8587  func (r *ProjectsDatabasesOperationsService) Delete(name string) *ProjectsDatabasesOperationsDeleteCall {
  8588  	c := &ProjectsDatabasesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8589  	c.name = name
  8590  	return c
  8591  }
  8592  
  8593  // Fields allows partial responses to be retrieved. See
  8594  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8595  // details.
  8596  func (c *ProjectsDatabasesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsDeleteCall {
  8597  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8598  	return c
  8599  }
  8600  
  8601  // Context sets the context to be used in this call's Do method.
  8602  func (c *ProjectsDatabasesOperationsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesOperationsDeleteCall {
  8603  	c.ctx_ = ctx
  8604  	return c
  8605  }
  8606  
  8607  // Header returns a http.Header that can be modified by the caller to add
  8608  // headers to the request.
  8609  func (c *ProjectsDatabasesOperationsDeleteCall) Header() http.Header {
  8610  	if c.header_ == nil {
  8611  		c.header_ = make(http.Header)
  8612  	}
  8613  	return c.header_
  8614  }
  8615  
  8616  func (c *ProjectsDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8617  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8618  	var body io.Reader = nil
  8619  	c.urlParams_.Set("alt", alt)
  8620  	c.urlParams_.Set("prettyPrint", "false")
  8621  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8622  	urls += "?" + c.urlParams_.Encode()
  8623  	req, err := http.NewRequest("DELETE", urls, body)
  8624  	if err != nil {
  8625  		return nil, err
  8626  	}
  8627  	req.Header = reqHeaders
  8628  	googleapi.Expand(req.URL, map[string]string{
  8629  		"name": c.name,
  8630  	})
  8631  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8632  }
  8633  
  8634  // Do executes the "firestore.projects.databases.operations.delete" call.
  8635  // Any non-2xx status code is an error. Response headers are in either
  8636  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8637  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8638  // whether the returned error was because http.StatusNotModified was returned.
  8639  func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8640  	gensupport.SetOptions(c.urlParams_, opts...)
  8641  	res, err := c.doRequest("json")
  8642  	if res != nil && res.StatusCode == http.StatusNotModified {
  8643  		if res.Body != nil {
  8644  			res.Body.Close()
  8645  		}
  8646  		return nil, gensupport.WrapError(&googleapi.Error{
  8647  			Code:   res.StatusCode,
  8648  			Header: res.Header,
  8649  		})
  8650  	}
  8651  	if err != nil {
  8652  		return nil, err
  8653  	}
  8654  	defer googleapi.CloseBody(res)
  8655  	if err := googleapi.CheckResponse(res); err != nil {
  8656  		return nil, gensupport.WrapError(err)
  8657  	}
  8658  	ret := &Empty{
  8659  		ServerResponse: googleapi.ServerResponse{
  8660  			Header:         res.Header,
  8661  			HTTPStatusCode: res.StatusCode,
  8662  		},
  8663  	}
  8664  	target := &ret
  8665  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8666  		return nil, err
  8667  	}
  8668  	return ret, nil
  8669  }
  8670  
  8671  type ProjectsDatabasesOperationsGetCall struct {
  8672  	s            *Service
  8673  	name         string
  8674  	urlParams_   gensupport.URLParams
  8675  	ifNoneMatch_ string
  8676  	ctx_         context.Context
  8677  	header_      http.Header
  8678  }
  8679  
  8680  // Get: Gets the latest state of a long-running operation. Clients can use this
  8681  // method to poll the operation result at intervals as recommended by the API
  8682  // service.
  8683  //
  8684  // - name: The name of the operation resource.
  8685  func (r *ProjectsDatabasesOperationsService) Get(name string) *ProjectsDatabasesOperationsGetCall {
  8686  	c := &ProjectsDatabasesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8687  	c.name = name
  8688  	return c
  8689  }
  8690  
  8691  // Fields allows partial responses to be retrieved. See
  8692  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8693  // details.
  8694  func (c *ProjectsDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsGetCall {
  8695  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8696  	return c
  8697  }
  8698  
  8699  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8700  // object's ETag matches the given value. This is useful for getting updates
  8701  // only after the object has changed since the last request.
  8702  func (c *ProjectsDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsGetCall {
  8703  	c.ifNoneMatch_ = entityTag
  8704  	return c
  8705  }
  8706  
  8707  // Context sets the context to be used in this call's Do method.
  8708  func (c *ProjectsDatabasesOperationsGetCall) Context(ctx context.Context) *ProjectsDatabasesOperationsGetCall {
  8709  	c.ctx_ = ctx
  8710  	return c
  8711  }
  8712  
  8713  // Header returns a http.Header that can be modified by the caller to add
  8714  // headers to the request.
  8715  func (c *ProjectsDatabasesOperationsGetCall) Header() http.Header {
  8716  	if c.header_ == nil {
  8717  		c.header_ = make(http.Header)
  8718  	}
  8719  	return c.header_
  8720  }
  8721  
  8722  func (c *ProjectsDatabasesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  8723  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8724  	if c.ifNoneMatch_ != "" {
  8725  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8726  	}
  8727  	var body io.Reader = nil
  8728  	c.urlParams_.Set("alt", alt)
  8729  	c.urlParams_.Set("prettyPrint", "false")
  8730  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8731  	urls += "?" + c.urlParams_.Encode()
  8732  	req, err := http.NewRequest("GET", urls, body)
  8733  	if err != nil {
  8734  		return nil, err
  8735  	}
  8736  	req.Header = reqHeaders
  8737  	googleapi.Expand(req.URL, map[string]string{
  8738  		"name": c.name,
  8739  	})
  8740  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8741  }
  8742  
  8743  // Do executes the "firestore.projects.databases.operations.get" call.
  8744  // Any non-2xx status code is an error. Response headers are in either
  8745  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  8746  // returned at all) in error.(*googleapi.Error).Header. Use
  8747  // googleapi.IsNotModified to check whether the returned error was because
  8748  // http.StatusNotModified was returned.
  8749  func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  8750  	gensupport.SetOptions(c.urlParams_, opts...)
  8751  	res, err := c.doRequest("json")
  8752  	if res != nil && res.StatusCode == http.StatusNotModified {
  8753  		if res.Body != nil {
  8754  			res.Body.Close()
  8755  		}
  8756  		return nil, gensupport.WrapError(&googleapi.Error{
  8757  			Code:   res.StatusCode,
  8758  			Header: res.Header,
  8759  		})
  8760  	}
  8761  	if err != nil {
  8762  		return nil, err
  8763  	}
  8764  	defer googleapi.CloseBody(res)
  8765  	if err := googleapi.CheckResponse(res); err != nil {
  8766  		return nil, gensupport.WrapError(err)
  8767  	}
  8768  	ret := &GoogleLongrunningOperation{
  8769  		ServerResponse: googleapi.ServerResponse{
  8770  			Header:         res.Header,
  8771  			HTTPStatusCode: res.StatusCode,
  8772  		},
  8773  	}
  8774  	target := &ret
  8775  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8776  		return nil, err
  8777  	}
  8778  	return ret, nil
  8779  }
  8780  
  8781  type ProjectsDatabasesOperationsListCall struct {
  8782  	s            *Service
  8783  	name         string
  8784  	urlParams_   gensupport.URLParams
  8785  	ifNoneMatch_ string
  8786  	ctx_         context.Context
  8787  	header_      http.Header
  8788  }
  8789  
  8790  // List: Lists operations that match the specified filter in the request. If
  8791  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  8792  //
  8793  // - name: The name of the operation's parent resource.
  8794  func (r *ProjectsDatabasesOperationsService) List(name string) *ProjectsDatabasesOperationsListCall {
  8795  	c := &ProjectsDatabasesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8796  	c.name = name
  8797  	return c
  8798  }
  8799  
  8800  // Filter sets the optional parameter "filter": The standard list filter.
  8801  func (c *ProjectsDatabasesOperationsListCall) Filter(filter string) *ProjectsDatabasesOperationsListCall {
  8802  	c.urlParams_.Set("filter", filter)
  8803  	return c
  8804  }
  8805  
  8806  // PageSize sets the optional parameter "pageSize": The standard list page
  8807  // size.
  8808  func (c *ProjectsDatabasesOperationsListCall) PageSize(pageSize int64) *ProjectsDatabasesOperationsListCall {
  8809  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8810  	return c
  8811  }
  8812  
  8813  // PageToken sets the optional parameter "pageToken": The standard list page
  8814  // token.
  8815  func (c *ProjectsDatabasesOperationsListCall) PageToken(pageToken string) *ProjectsDatabasesOperationsListCall {
  8816  	c.urlParams_.Set("pageToken", pageToken)
  8817  	return c
  8818  }
  8819  
  8820  // Fields allows partial responses to be retrieved. See
  8821  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8822  // details.
  8823  func (c *ProjectsDatabasesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsListCall {
  8824  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8825  	return c
  8826  }
  8827  
  8828  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8829  // object's ETag matches the given value. This is useful for getting updates
  8830  // only after the object has changed since the last request.
  8831  func (c *ProjectsDatabasesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsListCall {
  8832  	c.ifNoneMatch_ = entityTag
  8833  	return c
  8834  }
  8835  
  8836  // Context sets the context to be used in this call's Do method.
  8837  func (c *ProjectsDatabasesOperationsListCall) Context(ctx context.Context) *ProjectsDatabasesOperationsListCall {
  8838  	c.ctx_ = ctx
  8839  	return c
  8840  }
  8841  
  8842  // Header returns a http.Header that can be modified by the caller to add
  8843  // headers to the request.
  8844  func (c *ProjectsDatabasesOperationsListCall) Header() http.Header {
  8845  	if c.header_ == nil {
  8846  		c.header_ = make(http.Header)
  8847  	}
  8848  	return c.header_
  8849  }
  8850  
  8851  func (c *ProjectsDatabasesOperationsListCall) doRequest(alt string) (*http.Response, error) {
  8852  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8853  	if c.ifNoneMatch_ != "" {
  8854  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8855  	}
  8856  	var body io.Reader = nil
  8857  	c.urlParams_.Set("alt", alt)
  8858  	c.urlParams_.Set("prettyPrint", "false")
  8859  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  8860  	urls += "?" + c.urlParams_.Encode()
  8861  	req, err := http.NewRequest("GET", urls, body)
  8862  	if err != nil {
  8863  		return nil, err
  8864  	}
  8865  	req.Header = reqHeaders
  8866  	googleapi.Expand(req.URL, map[string]string{
  8867  		"name": c.name,
  8868  	})
  8869  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8870  }
  8871  
  8872  // Do executes the "firestore.projects.databases.operations.list" call.
  8873  // Any non-2xx status code is an error. Response headers are in either
  8874  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  8875  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8876  // googleapi.IsNotModified to check whether the returned error was because
  8877  // http.StatusNotModified was returned.
  8878  func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  8879  	gensupport.SetOptions(c.urlParams_, opts...)
  8880  	res, err := c.doRequest("json")
  8881  	if res != nil && res.StatusCode == http.StatusNotModified {
  8882  		if res.Body != nil {
  8883  			res.Body.Close()
  8884  		}
  8885  		return nil, gensupport.WrapError(&googleapi.Error{
  8886  			Code:   res.StatusCode,
  8887  			Header: res.Header,
  8888  		})
  8889  	}
  8890  	if err != nil {
  8891  		return nil, err
  8892  	}
  8893  	defer googleapi.CloseBody(res)
  8894  	if err := googleapi.CheckResponse(res); err != nil {
  8895  		return nil, gensupport.WrapError(err)
  8896  	}
  8897  	ret := &GoogleLongrunningListOperationsResponse{
  8898  		ServerResponse: googleapi.ServerResponse{
  8899  			Header:         res.Header,
  8900  			HTTPStatusCode: res.StatusCode,
  8901  		},
  8902  	}
  8903  	target := &ret
  8904  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8905  		return nil, err
  8906  	}
  8907  	return ret, nil
  8908  }
  8909  
  8910  // Pages invokes f for each page of results.
  8911  // A non-nil error returned from f will halt the iteration.
  8912  // The provided context supersedes any context provided to the Context method.
  8913  func (c *ProjectsDatabasesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  8914  	c.ctx_ = ctx
  8915  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8916  	for {
  8917  		x, err := c.Do()
  8918  		if err != nil {
  8919  			return err
  8920  		}
  8921  		if err := f(x); err != nil {
  8922  			return err
  8923  		}
  8924  		if x.NextPageToken == "" {
  8925  			return nil
  8926  		}
  8927  		c.PageToken(x.NextPageToken)
  8928  	}
  8929  }
  8930  
  8931  type ProjectsLocationsGetCall struct {
  8932  	s            *Service
  8933  	name         string
  8934  	urlParams_   gensupport.URLParams
  8935  	ifNoneMatch_ string
  8936  	ctx_         context.Context
  8937  	header_      http.Header
  8938  }
  8939  
  8940  // Get: Gets information about a location.
  8941  //
  8942  // - name: Resource name for the location.
  8943  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  8944  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8945  	c.name = name
  8946  	return c
  8947  }
  8948  
  8949  // Fields allows partial responses to be retrieved. See
  8950  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8951  // details.
  8952  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  8953  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8954  	return c
  8955  }
  8956  
  8957  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8958  // object's ETag matches the given value. This is useful for getting updates
  8959  // only after the object has changed since the last request.
  8960  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  8961  	c.ifNoneMatch_ = entityTag
  8962  	return c
  8963  }
  8964  
  8965  // Context sets the context to be used in this call's Do method.
  8966  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  8967  	c.ctx_ = ctx
  8968  	return c
  8969  }
  8970  
  8971  // Header returns a http.Header that can be modified by the caller to add
  8972  // headers to the request.
  8973  func (c *ProjectsLocationsGetCall) Header() http.Header {
  8974  	if c.header_ == nil {
  8975  		c.header_ = make(http.Header)
  8976  	}
  8977  	return c.header_
  8978  }
  8979  
  8980  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  8981  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8982  	if c.ifNoneMatch_ != "" {
  8983  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8984  	}
  8985  	var body io.Reader = nil
  8986  	c.urlParams_.Set("alt", alt)
  8987  	c.urlParams_.Set("prettyPrint", "false")
  8988  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8989  	urls += "?" + c.urlParams_.Encode()
  8990  	req, err := http.NewRequest("GET", urls, body)
  8991  	if err != nil {
  8992  		return nil, err
  8993  	}
  8994  	req.Header = reqHeaders
  8995  	googleapi.Expand(req.URL, map[string]string{
  8996  		"name": c.name,
  8997  	})
  8998  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8999  }
  9000  
  9001  // Do executes the "firestore.projects.locations.get" call.
  9002  // Any non-2xx status code is an error. Response headers are in either
  9003  // *Location.ServerResponse.Header or (if a response was returned at all) in
  9004  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9005  // whether the returned error was because http.StatusNotModified was returned.
  9006  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  9007  	gensupport.SetOptions(c.urlParams_, opts...)
  9008  	res, err := c.doRequest("json")
  9009  	if res != nil && res.StatusCode == http.StatusNotModified {
  9010  		if res.Body != nil {
  9011  			res.Body.Close()
  9012  		}
  9013  		return nil, gensupport.WrapError(&googleapi.Error{
  9014  			Code:   res.StatusCode,
  9015  			Header: res.Header,
  9016  		})
  9017  	}
  9018  	if err != nil {
  9019  		return nil, err
  9020  	}
  9021  	defer googleapi.CloseBody(res)
  9022  	if err := googleapi.CheckResponse(res); err != nil {
  9023  		return nil, gensupport.WrapError(err)
  9024  	}
  9025  	ret := &Location{
  9026  		ServerResponse: googleapi.ServerResponse{
  9027  			Header:         res.Header,
  9028  			HTTPStatusCode: res.StatusCode,
  9029  		},
  9030  	}
  9031  	target := &ret
  9032  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9033  		return nil, err
  9034  	}
  9035  	return ret, nil
  9036  }
  9037  
  9038  type ProjectsLocationsListCall struct {
  9039  	s            *Service
  9040  	name         string
  9041  	urlParams_   gensupport.URLParams
  9042  	ifNoneMatch_ string
  9043  	ctx_         context.Context
  9044  	header_      http.Header
  9045  }
  9046  
  9047  // List: Lists information about the supported locations for this service.
  9048  //
  9049  // - name: The resource that owns the locations collection, if applicable.
  9050  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  9051  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9052  	c.name = name
  9053  	return c
  9054  }
  9055  
  9056  // Filter sets the optional parameter "filter": A filter to narrow down results
  9057  // to a preferred subset. The filtering language accepts strings like
  9058  // "displayName=tokyo", and is documented in more detail in AIP-160
  9059  // (https://google.aip.dev/160).
  9060  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  9061  	c.urlParams_.Set("filter", filter)
  9062  	return c
  9063  }
  9064  
  9065  // PageSize sets the optional parameter "pageSize": The maximum number of
  9066  // results to return. If not set, the service selects a default.
  9067  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  9068  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9069  	return c
  9070  }
  9071  
  9072  // PageToken sets the optional parameter "pageToken": A page token received
  9073  // from the `next_page_token` field in the response. Send that page token to
  9074  // receive the subsequent page.
  9075  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  9076  	c.urlParams_.Set("pageToken", pageToken)
  9077  	return c
  9078  }
  9079  
  9080  // Fields allows partial responses to be retrieved. See
  9081  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9082  // details.
  9083  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  9084  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9085  	return c
  9086  }
  9087  
  9088  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9089  // object's ETag matches the given value. This is useful for getting updates
  9090  // only after the object has changed since the last request.
  9091  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  9092  	c.ifNoneMatch_ = entityTag
  9093  	return c
  9094  }
  9095  
  9096  // Context sets the context to be used in this call's Do method.
  9097  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  9098  	c.ctx_ = ctx
  9099  	return c
  9100  }
  9101  
  9102  // Header returns a http.Header that can be modified by the caller to add
  9103  // headers to the request.
  9104  func (c *ProjectsLocationsListCall) Header() http.Header {
  9105  	if c.header_ == nil {
  9106  		c.header_ = make(http.Header)
  9107  	}
  9108  	return c.header_
  9109  }
  9110  
  9111  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  9112  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9113  	if c.ifNoneMatch_ != "" {
  9114  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9115  	}
  9116  	var body io.Reader = nil
  9117  	c.urlParams_.Set("alt", alt)
  9118  	c.urlParams_.Set("prettyPrint", "false")
  9119  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  9120  	urls += "?" + c.urlParams_.Encode()
  9121  	req, err := http.NewRequest("GET", urls, body)
  9122  	if err != nil {
  9123  		return nil, err
  9124  	}
  9125  	req.Header = reqHeaders
  9126  	googleapi.Expand(req.URL, map[string]string{
  9127  		"name": c.name,
  9128  	})
  9129  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9130  }
  9131  
  9132  // Do executes the "firestore.projects.locations.list" call.
  9133  // Any non-2xx status code is an error. Response headers are in either
  9134  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  9135  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9136  // check whether the returned error was because http.StatusNotModified was
  9137  // returned.
  9138  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  9139  	gensupport.SetOptions(c.urlParams_, opts...)
  9140  	res, err := c.doRequest("json")
  9141  	if res != nil && res.StatusCode == http.StatusNotModified {
  9142  		if res.Body != nil {
  9143  			res.Body.Close()
  9144  		}
  9145  		return nil, gensupport.WrapError(&googleapi.Error{
  9146  			Code:   res.StatusCode,
  9147  			Header: res.Header,
  9148  		})
  9149  	}
  9150  	if err != nil {
  9151  		return nil, err
  9152  	}
  9153  	defer googleapi.CloseBody(res)
  9154  	if err := googleapi.CheckResponse(res); err != nil {
  9155  		return nil, gensupport.WrapError(err)
  9156  	}
  9157  	ret := &ListLocationsResponse{
  9158  		ServerResponse: googleapi.ServerResponse{
  9159  			Header:         res.Header,
  9160  			HTTPStatusCode: res.StatusCode,
  9161  		},
  9162  	}
  9163  	target := &ret
  9164  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9165  		return nil, err
  9166  	}
  9167  	return ret, nil
  9168  }
  9169  
  9170  // Pages invokes f for each page of results.
  9171  // A non-nil error returned from f will halt the iteration.
  9172  // The provided context supersedes any context provided to the Context method.
  9173  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  9174  	c.ctx_ = ctx
  9175  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9176  	for {
  9177  		x, err := c.Do()
  9178  		if err != nil {
  9179  			return err
  9180  		}
  9181  		if err := f(x); err != nil {
  9182  			return err
  9183  		}
  9184  		if x.NextPageToken == "" {
  9185  			return nil
  9186  		}
  9187  		c.PageToken(x.NextPageToken)
  9188  	}
  9189  }
  9190  
  9191  type ProjectsLocationsBackupsDeleteCall struct {
  9192  	s          *Service
  9193  	name       string
  9194  	urlParams_ gensupport.URLParams
  9195  	ctx_       context.Context
  9196  	header_    http.Header
  9197  }
  9198  
  9199  // Delete: Deletes a backup.
  9200  //
  9201  //   - name: Name of the backup to delete. format is
  9202  //     `projects/{project}/locations/{location}/backups/{backup}`.
  9203  func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall {
  9204  	c := &ProjectsLocationsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9205  	c.name = name
  9206  	return c
  9207  }
  9208  
  9209  // Fields allows partial responses to be retrieved. See
  9210  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9211  // details.
  9212  func (c *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall {
  9213  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9214  	return c
  9215  }
  9216  
  9217  // Context sets the context to be used in this call's Do method.
  9218  func (c *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall {
  9219  	c.ctx_ = ctx
  9220  	return c
  9221  }
  9222  
  9223  // Header returns a http.Header that can be modified by the caller to add
  9224  // headers to the request.
  9225  func (c *ProjectsLocationsBackupsDeleteCall) Header() http.Header {
  9226  	if c.header_ == nil {
  9227  		c.header_ = make(http.Header)
  9228  	}
  9229  	return c.header_
  9230  }
  9231  
  9232  func (c *ProjectsLocationsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9233  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9234  	var body io.Reader = nil
  9235  	c.urlParams_.Set("alt", alt)
  9236  	c.urlParams_.Set("prettyPrint", "false")
  9237  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9238  	urls += "?" + c.urlParams_.Encode()
  9239  	req, err := http.NewRequest("DELETE", urls, body)
  9240  	if err != nil {
  9241  		return nil, err
  9242  	}
  9243  	req.Header = reqHeaders
  9244  	googleapi.Expand(req.URL, map[string]string{
  9245  		"name": c.name,
  9246  	})
  9247  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9248  }
  9249  
  9250  // Do executes the "firestore.projects.locations.backups.delete" call.
  9251  // Any non-2xx status code is an error. Response headers are in either
  9252  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9253  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9254  // whether the returned error was because http.StatusNotModified was returned.
  9255  func (c *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9256  	gensupport.SetOptions(c.urlParams_, opts...)
  9257  	res, err := c.doRequest("json")
  9258  	if res != nil && res.StatusCode == http.StatusNotModified {
  9259  		if res.Body != nil {
  9260  			res.Body.Close()
  9261  		}
  9262  		return nil, gensupport.WrapError(&googleapi.Error{
  9263  			Code:   res.StatusCode,
  9264  			Header: res.Header,
  9265  		})
  9266  	}
  9267  	if err != nil {
  9268  		return nil, err
  9269  	}
  9270  	defer googleapi.CloseBody(res)
  9271  	if err := googleapi.CheckResponse(res); err != nil {
  9272  		return nil, gensupport.WrapError(err)
  9273  	}
  9274  	ret := &Empty{
  9275  		ServerResponse: googleapi.ServerResponse{
  9276  			Header:         res.Header,
  9277  			HTTPStatusCode: res.StatusCode,
  9278  		},
  9279  	}
  9280  	target := &ret
  9281  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9282  		return nil, err
  9283  	}
  9284  	return ret, nil
  9285  }
  9286  
  9287  type ProjectsLocationsBackupsGetCall struct {
  9288  	s            *Service
  9289  	name         string
  9290  	urlParams_   gensupport.URLParams
  9291  	ifNoneMatch_ string
  9292  	ctx_         context.Context
  9293  	header_      http.Header
  9294  }
  9295  
  9296  // Get: Gets information about a backup.
  9297  //
  9298  //   - name: Name of the backup to fetch. Format is
  9299  //     `projects/{project}/locations/{location}/backups/{backup}`.
  9300  func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall {
  9301  	c := &ProjectsLocationsBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9302  	c.name = name
  9303  	return c
  9304  }
  9305  
  9306  // Fields allows partial responses to be retrieved. See
  9307  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9308  // details.
  9309  func (c *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall {
  9310  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9311  	return c
  9312  }
  9313  
  9314  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9315  // object's ETag matches the given value. This is useful for getting updates
  9316  // only after the object has changed since the last request.
  9317  func (c *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall {
  9318  	c.ifNoneMatch_ = entityTag
  9319  	return c
  9320  }
  9321  
  9322  // Context sets the context to be used in this call's Do method.
  9323  func (c *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall {
  9324  	c.ctx_ = ctx
  9325  	return c
  9326  }
  9327  
  9328  // Header returns a http.Header that can be modified by the caller to add
  9329  // headers to the request.
  9330  func (c *ProjectsLocationsBackupsGetCall) Header() http.Header {
  9331  	if c.header_ == nil {
  9332  		c.header_ = make(http.Header)
  9333  	}
  9334  	return c.header_
  9335  }
  9336  
  9337  func (c *ProjectsLocationsBackupsGetCall) doRequest(alt string) (*http.Response, error) {
  9338  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9339  	if c.ifNoneMatch_ != "" {
  9340  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9341  	}
  9342  	var body io.Reader = nil
  9343  	c.urlParams_.Set("alt", alt)
  9344  	c.urlParams_.Set("prettyPrint", "false")
  9345  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9346  	urls += "?" + c.urlParams_.Encode()
  9347  	req, err := http.NewRequest("GET", urls, body)
  9348  	if err != nil {
  9349  		return nil, err
  9350  	}
  9351  	req.Header = reqHeaders
  9352  	googleapi.Expand(req.URL, map[string]string{
  9353  		"name": c.name,
  9354  	})
  9355  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9356  }
  9357  
  9358  // Do executes the "firestore.projects.locations.backups.get" call.
  9359  // Any non-2xx status code is an error. Response headers are in either
  9360  // *GoogleFirestoreAdminV1Backup.ServerResponse.Header or (if a response was
  9361  // returned at all) in error.(*googleapi.Error).Header. Use
  9362  // googleapi.IsNotModified to check whether the returned error was because
  9363  // http.StatusNotModified was returned.
  9364  func (c *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Backup, error) {
  9365  	gensupport.SetOptions(c.urlParams_, opts...)
  9366  	res, err := c.doRequest("json")
  9367  	if res != nil && res.StatusCode == http.StatusNotModified {
  9368  		if res.Body != nil {
  9369  			res.Body.Close()
  9370  		}
  9371  		return nil, gensupport.WrapError(&googleapi.Error{
  9372  			Code:   res.StatusCode,
  9373  			Header: res.Header,
  9374  		})
  9375  	}
  9376  	if err != nil {
  9377  		return nil, err
  9378  	}
  9379  	defer googleapi.CloseBody(res)
  9380  	if err := googleapi.CheckResponse(res); err != nil {
  9381  		return nil, gensupport.WrapError(err)
  9382  	}
  9383  	ret := &GoogleFirestoreAdminV1Backup{
  9384  		ServerResponse: googleapi.ServerResponse{
  9385  			Header:         res.Header,
  9386  			HTTPStatusCode: res.StatusCode,
  9387  		},
  9388  	}
  9389  	target := &ret
  9390  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9391  		return nil, err
  9392  	}
  9393  	return ret, nil
  9394  }
  9395  
  9396  type ProjectsLocationsBackupsListCall struct {
  9397  	s            *Service
  9398  	parent       string
  9399  	urlParams_   gensupport.URLParams
  9400  	ifNoneMatch_ string
  9401  	ctx_         context.Context
  9402  	header_      http.Header
  9403  }
  9404  
  9405  // List: Lists all the backups.
  9406  //
  9407  //   - parent: The location to list backups from. Format is
  9408  //     `projects/{project}/locations/{location}`. Use `{location} = '-'` to list
  9409  //     backups from all locations for the given project. This allows listing
  9410  //     backups from a single location or from all locations.
  9411  func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall {
  9412  	c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9413  	c.parent = parent
  9414  	return c
  9415  }
  9416  
  9417  // Fields allows partial responses to be retrieved. See
  9418  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9419  // details.
  9420  func (c *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall {
  9421  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9422  	return c
  9423  }
  9424  
  9425  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9426  // object's ETag matches the given value. This is useful for getting updates
  9427  // only after the object has changed since the last request.
  9428  func (c *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall {
  9429  	c.ifNoneMatch_ = entityTag
  9430  	return c
  9431  }
  9432  
  9433  // Context sets the context to be used in this call's Do method.
  9434  func (c *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall {
  9435  	c.ctx_ = ctx
  9436  	return c
  9437  }
  9438  
  9439  // Header returns a http.Header that can be modified by the caller to add
  9440  // headers to the request.
  9441  func (c *ProjectsLocationsBackupsListCall) Header() http.Header {
  9442  	if c.header_ == nil {
  9443  		c.header_ = make(http.Header)
  9444  	}
  9445  	return c.header_
  9446  }
  9447  
  9448  func (c *ProjectsLocationsBackupsListCall) doRequest(alt string) (*http.Response, error) {
  9449  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9450  	if c.ifNoneMatch_ != "" {
  9451  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9452  	}
  9453  	var body io.Reader = nil
  9454  	c.urlParams_.Set("alt", alt)
  9455  	c.urlParams_.Set("prettyPrint", "false")
  9456  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  9457  	urls += "?" + c.urlParams_.Encode()
  9458  	req, err := http.NewRequest("GET", urls, body)
  9459  	if err != nil {
  9460  		return nil, err
  9461  	}
  9462  	req.Header = reqHeaders
  9463  	googleapi.Expand(req.URL, map[string]string{
  9464  		"parent": c.parent,
  9465  	})
  9466  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9467  }
  9468  
  9469  // Do executes the "firestore.projects.locations.backups.list" call.
  9470  // Any non-2xx status code is an error. Response headers are in either
  9471  // *GoogleFirestoreAdminV1ListBackupsResponse.ServerResponse.Header or (if a
  9472  // response was returned at all) in error.(*googleapi.Error).Header. Use
  9473  // googleapi.IsNotModified to check whether the returned error was because
  9474  // http.StatusNotModified was returned.
  9475  func (c *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListBackupsResponse, error) {
  9476  	gensupport.SetOptions(c.urlParams_, opts...)
  9477  	res, err := c.doRequest("json")
  9478  	if res != nil && res.StatusCode == http.StatusNotModified {
  9479  		if res.Body != nil {
  9480  			res.Body.Close()
  9481  		}
  9482  		return nil, gensupport.WrapError(&googleapi.Error{
  9483  			Code:   res.StatusCode,
  9484  			Header: res.Header,
  9485  		})
  9486  	}
  9487  	if err != nil {
  9488  		return nil, err
  9489  	}
  9490  	defer googleapi.CloseBody(res)
  9491  	if err := googleapi.CheckResponse(res); err != nil {
  9492  		return nil, gensupport.WrapError(err)
  9493  	}
  9494  	ret := &GoogleFirestoreAdminV1ListBackupsResponse{
  9495  		ServerResponse: googleapi.ServerResponse{
  9496  			Header:         res.Header,
  9497  			HTTPStatusCode: res.StatusCode,
  9498  		},
  9499  	}
  9500  	target := &ret
  9501  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9502  		return nil, err
  9503  	}
  9504  	return ret, nil
  9505  }
  9506  

View as plain text