...

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

Documentation: google.golang.org/api/datastore/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 datastore provides access to the Cloud Datastore API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/datastore instead.
    10  //
    11  // For product documentation, see: https://cloud.google.com/datastore/
    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/datastore/v1"
    29  //	...
    30  //	ctx := context.Background()
    31  //	datastoreService, err := datastore.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  //	datastoreService, err := datastore.NewService(ctx, option.WithScopes(datastore.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  //	datastoreService, err := datastore.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  //	datastoreService, err := datastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    56  //
    57  // See [google.golang.org/api/option.ClientOption] for details on options.
    58  package datastore // import "google.golang.org/api/datastore/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 = "datastore:v1"
    97  const apiName = "datastore"
    98  const apiVersion = "v1"
    99  const basePath = "https://datastore.googleapis.com/"
   100  const basePathTemplate = "https://datastore.UNIVERSE_DOMAIN/"
   101  const mtlsBasePath = "https://datastore.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.Indexes = NewProjectsIndexesService(s)
   171  	rs.Operations = NewProjectsOperationsService(s)
   172  	return rs
   173  }
   174  
   175  type ProjectsService struct {
   176  	s *Service
   177  
   178  	Indexes *ProjectsIndexesService
   179  
   180  	Operations *ProjectsOperationsService
   181  }
   182  
   183  func NewProjectsIndexesService(s *Service) *ProjectsIndexesService {
   184  	rs := &ProjectsIndexesService{s: s}
   185  	return rs
   186  }
   187  
   188  type ProjectsIndexesService struct {
   189  	s *Service
   190  }
   191  
   192  func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
   193  	rs := &ProjectsOperationsService{s: s}
   194  	return rs
   195  }
   196  
   197  type ProjectsOperationsService struct {
   198  	s *Service
   199  }
   200  
   201  // Aggregation: Defines an aggregation that produces a single result.
   202  type Aggregation struct {
   203  	// Alias: Optional. Optional name of the property to store the result of the
   204  	// aggregation. If not provided, Datastore will pick a default name following
   205  	// the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS
   206  	// count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*)
   207  	// OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1,
   208  	// COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS
   209  	// property_2 OVER ( ... ); ``` Requires: * Must be unique across all
   210  	// aggregation aliases. * Conform to entity property name limitations.
   211  	Alias string `json:"alias,omitempty"`
   212  	// Avg: Average aggregator.
   213  	Avg *Avg `json:"avg,omitempty"`
   214  	// Count: Count aggregator.
   215  	Count *Count `json:"count,omitempty"`
   216  	// Sum: Sum aggregator.
   217  	Sum *Sum `json:"sum,omitempty"`
   218  	// ForceSendFields is a list of field names (e.g. "Alias") to unconditionally
   219  	// include in API requests. By default, fields with empty or default values are
   220  	// omitted from API requests. See
   221  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   222  	// details.
   223  	ForceSendFields []string `json:"-"`
   224  	// NullFields is a list of field names (e.g. "Alias") to include in API
   225  	// requests with the JSON null value. By default, fields with empty values are
   226  	// omitted from API requests. See
   227  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   228  	NullFields []string `json:"-"`
   229  }
   230  
   231  func (s *Aggregation) MarshalJSON() ([]byte, error) {
   232  	type NoMethod Aggregation
   233  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   234  }
   235  
   236  // AggregationQuery: Datastore query for running an aggregation over a Query.
   237  type AggregationQuery struct {
   238  	// Aggregations: Optional. Series of aggregations to apply over the results of
   239  	// the `nested_query`. Requires: * A minimum of one and maximum of five
   240  	// aggregations per query.
   241  	Aggregations []*Aggregation `json:"aggregations,omitempty"`
   242  	// NestedQuery: Nested query for aggregation
   243  	NestedQuery *Query `json:"nestedQuery,omitempty"`
   244  	// ForceSendFields is a list of field names (e.g. "Aggregations") to
   245  	// unconditionally include in API requests. By default, fields with empty or
   246  	// default values are omitted from API requests. See
   247  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   248  	// details.
   249  	ForceSendFields []string `json:"-"`
   250  	// NullFields is a list of field names (e.g. "Aggregations") to include in API
   251  	// requests with the JSON null value. By default, fields with empty values are
   252  	// omitted from API requests. See
   253  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   254  	NullFields []string `json:"-"`
   255  }
   256  
   257  func (s *AggregationQuery) MarshalJSON() ([]byte, error) {
   258  	type NoMethod AggregationQuery
   259  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   260  }
   261  
   262  // AggregationResult: The result of a single bucket from a Datastore
   263  // aggregation query. The keys of `aggregate_properties` are the same for all
   264  // results in an aggregation query, unlike entity queries which can have
   265  // different fields present for each result.
   266  type AggregationResult struct {
   267  	// AggregateProperties: The result of the aggregation functions, ex: `COUNT(*)
   268  	// AS total_entities`. The key is the alias assigned to the aggregation
   269  	// function on input and the size of this map equals the number of aggregation
   270  	// functions in the query.
   271  	AggregateProperties map[string]Value `json:"aggregateProperties,omitempty"`
   272  	// ForceSendFields is a list of field names (e.g. "AggregateProperties") to
   273  	// unconditionally include in API requests. By default, fields with empty or
   274  	// default values are omitted from API requests. See
   275  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   276  	// details.
   277  	ForceSendFields []string `json:"-"`
   278  	// NullFields is a list of field names (e.g. "AggregateProperties") to include
   279  	// in API requests with the JSON null value. By default, fields with empty
   280  	// values are omitted from API requests. See
   281  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   282  	NullFields []string `json:"-"`
   283  }
   284  
   285  func (s *AggregationResult) MarshalJSON() ([]byte, error) {
   286  	type NoMethod AggregationResult
   287  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   288  }
   289  
   290  // AggregationResultBatch: A batch of aggregation results produced by an
   291  // aggregation query.
   292  type AggregationResultBatch struct {
   293  	// AggregationResults: The aggregation results for this batch.
   294  	AggregationResults []*AggregationResult `json:"aggregationResults,omitempty"`
   295  	// MoreResults: The state of the query after the current batch. Only COUNT(*)
   296  	// aggregations are supported in the initial launch. Therefore, expected result
   297  	// type is limited to `NO_MORE_RESULTS`.
   298  	//
   299  	// Possible values:
   300  	//   "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never used.
   301  	//   "NOT_FINISHED" - There may be additional batches to fetch from this query.
   302  	//   "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may be more
   303  	// results after the limit.
   304  	//   "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may be more
   305  	// results after the end cursor.
   306  	//   "NO_MORE_RESULTS" - The query is finished, and there are no more results.
   307  	MoreResults string `json:"moreResults,omitempty"`
   308  	// ReadTime: Read timestamp this batch was returned from. In a single
   309  	// transaction, subsequent query result batches for the same query can have a
   310  	// greater timestamp. Each batch's read timestamp is valid for all preceding
   311  	// batches.
   312  	ReadTime string `json:"readTime,omitempty"`
   313  	// ForceSendFields is a list of field names (e.g. "AggregationResults") to
   314  	// unconditionally include in API requests. By default, fields with empty or
   315  	// default values are omitted from API requests. See
   316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   317  	// details.
   318  	ForceSendFields []string `json:"-"`
   319  	// NullFields is a list of field names (e.g. "AggregationResults") to include
   320  	// in API requests with the JSON null value. By default, fields with empty
   321  	// values are omitted from API requests. See
   322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   323  	NullFields []string `json:"-"`
   324  }
   325  
   326  func (s *AggregationResultBatch) MarshalJSON() ([]byte, error) {
   327  	type NoMethod AggregationResultBatch
   328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   329  }
   330  
   331  // AllocateIdsRequest: The request for Datastore.AllocateIds.
   332  type AllocateIdsRequest struct {
   333  	// DatabaseId: The ID of the database against which to make the request.
   334  	// '(default)' is not allowed; please use empty string '' to refer the default
   335  	// database.
   336  	DatabaseId string `json:"databaseId,omitempty"`
   337  	// Keys: Required. A list of keys with incomplete key paths for which to
   338  	// allocate IDs. No key may be reserved/read-only.
   339  	Keys []*Key `json:"keys,omitempty"`
   340  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
   341  	// unconditionally include in API requests. By default, fields with empty or
   342  	// default values are omitted from API requests. See
   343  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   344  	// details.
   345  	ForceSendFields []string `json:"-"`
   346  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
   347  	// requests with the JSON null value. By default, fields with empty values are
   348  	// omitted from API requests. See
   349  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   350  	NullFields []string `json:"-"`
   351  }
   352  
   353  func (s *AllocateIdsRequest) MarshalJSON() ([]byte, error) {
   354  	type NoMethod AllocateIdsRequest
   355  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   356  }
   357  
   358  // AllocateIdsResponse: The response for Datastore.AllocateIds.
   359  type AllocateIdsResponse struct {
   360  	// Keys: The keys specified in the request (in the same order), each with its
   361  	// key path completed with a newly allocated ID.
   362  	Keys []*Key `json:"keys,omitempty"`
   363  
   364  	// ServerResponse contains the HTTP response code and headers from the server.
   365  	googleapi.ServerResponse `json:"-"`
   366  	// ForceSendFields is a list of field names (e.g. "Keys") to unconditionally
   367  	// include in API requests. By default, fields with empty or default values are
   368  	// omitted from API requests. See
   369  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   370  	// details.
   371  	ForceSendFields []string `json:"-"`
   372  	// NullFields is a list of field names (e.g. "Keys") to include in API requests
   373  	// with the JSON null value. By default, fields with empty values are omitted
   374  	// from API requests. See
   375  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   376  	NullFields []string `json:"-"`
   377  }
   378  
   379  func (s *AllocateIdsResponse) MarshalJSON() ([]byte, error) {
   380  	type NoMethod AllocateIdsResponse
   381  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   382  }
   383  
   384  // ArrayValue: An array value.
   385  type ArrayValue struct {
   386  	// Values: Values in the array. The order of values in an array is preserved as
   387  	// long as all values have identical settings for 'exclude_from_indexes'.
   388  	Values []*Value `json:"values,omitempty"`
   389  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   390  	// include in API requests. By default, fields with empty or default values are
   391  	// omitted from API requests. See
   392  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   393  	// details.
   394  	ForceSendFields []string `json:"-"`
   395  	// NullFields is a list of field names (e.g. "Values") to include in API
   396  	// requests with the JSON null value. By default, fields with empty values are
   397  	// omitted from API requests. See
   398  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   399  	NullFields []string `json:"-"`
   400  }
   401  
   402  func (s *ArrayValue) MarshalJSON() ([]byte, error) {
   403  	type NoMethod ArrayValue
   404  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   405  }
   406  
   407  // Avg: Average of the values of the requested property. * Only numeric values
   408  // will be aggregated. All non-numeric values including `NULL` are skipped. *
   409  // If the aggregated values contain `NaN`, returns `NaN`. Infinity math follows
   410  // IEEE-754 standards. * If the aggregated value set is empty, returns `NULL`.
   411  // * Always returns the result as a double.
   412  type Avg struct {
   413  	// Property: The property to aggregate on.
   414  	Property *PropertyReference `json:"property,omitempty"`
   415  	// ForceSendFields is a list of field names (e.g. "Property") to
   416  	// unconditionally include in API requests. By default, fields with empty or
   417  	// default values are omitted from API requests. See
   418  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   419  	// details.
   420  	ForceSendFields []string `json:"-"`
   421  	// NullFields is a list of field names (e.g. "Property") to include in API
   422  	// requests with the JSON null value. By default, fields with empty values are
   423  	// omitted from API requests. See
   424  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   425  	NullFields []string `json:"-"`
   426  }
   427  
   428  func (s *Avg) MarshalJSON() ([]byte, error) {
   429  	type NoMethod Avg
   430  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   431  }
   432  
   433  // BeginTransactionRequest: The request for Datastore.BeginTransaction.
   434  type BeginTransactionRequest struct {
   435  	// DatabaseId: The ID of the database against which to make the request.
   436  	// '(default)' is not allowed; please use empty string '' to refer the default
   437  	// database.
   438  	DatabaseId string `json:"databaseId,omitempty"`
   439  	// TransactionOptions: Options for a new transaction.
   440  	TransactionOptions *TransactionOptions `json:"transactionOptions,omitempty"`
   441  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
   442  	// unconditionally include in API requests. By default, fields with empty or
   443  	// default values are omitted from API requests. See
   444  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   445  	// details.
   446  	ForceSendFields []string `json:"-"`
   447  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
   448  	// requests with the JSON null value. By default, fields with empty values are
   449  	// omitted from API requests. See
   450  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   451  	NullFields []string `json:"-"`
   452  }
   453  
   454  func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
   455  	type NoMethod BeginTransactionRequest
   456  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   457  }
   458  
   459  // BeginTransactionResponse: The response for Datastore.BeginTransaction.
   460  type BeginTransactionResponse struct {
   461  	// Transaction: The transaction identifier (always present).
   462  	Transaction string `json:"transaction,omitempty"`
   463  
   464  	// ServerResponse contains the HTTP response code and headers from the server.
   465  	googleapi.ServerResponse `json:"-"`
   466  	// ForceSendFields is a list of field names (e.g. "Transaction") to
   467  	// unconditionally include in API requests. By default, fields with empty or
   468  	// default values are omitted from API requests. See
   469  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   470  	// details.
   471  	ForceSendFields []string `json:"-"`
   472  	// NullFields is a list of field names (e.g. "Transaction") to include in API
   473  	// requests with the JSON null value. By default, fields with empty values are
   474  	// omitted from API requests. See
   475  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   476  	NullFields []string `json:"-"`
   477  }
   478  
   479  func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) {
   480  	type NoMethod BeginTransactionResponse
   481  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   482  }
   483  
   484  // CommitRequest: The request for Datastore.Commit.
   485  type CommitRequest struct {
   486  	// DatabaseId: The ID of the database against which to make the request.
   487  	// '(default)' is not allowed; please use empty string '' to refer the default
   488  	// database.
   489  	DatabaseId string `json:"databaseId,omitempty"`
   490  	// Mode: The type of commit to perform. Defaults to `TRANSACTIONAL`.
   491  	//
   492  	// Possible values:
   493  	//   "MODE_UNSPECIFIED" - Unspecified. This value must not be used.
   494  	//   "TRANSACTIONAL" - Transactional: The mutations are either all applied, or
   495  	// none are applied. Learn about transactions
   496  	// [here](https://cloud.google.com/datastore/docs/concepts/transactions).
   497  	//   "NON_TRANSACTIONAL" - Non-transactional: The mutations may not apply as
   498  	// all or none.
   499  	Mode string `json:"mode,omitempty"`
   500  	// Mutations: The mutations to perform. When mode is `TRANSACTIONAL`, mutations
   501  	// affecting a single entity are applied in order. The following sequences of
   502  	// mutations affecting a single entity are not permitted in a single `Commit`
   503  	// request: - `insert` followed by `insert` - `update` followed by `insert` -
   504  	// `upsert` followed by `insert` - `delete` followed by `update` When mode is
   505  	// `NON_TRANSACTIONAL`, no two mutations may affect a single entity.
   506  	Mutations []*Mutation `json:"mutations,omitempty"`
   507  	// SingleUseTransaction: Options for beginning a new transaction for this
   508  	// request. The transaction is committed when the request completes. If
   509  	// specified, TransactionOptions.mode must be TransactionOptions.ReadWrite.
   510  	SingleUseTransaction *TransactionOptions `json:"singleUseTransaction,omitempty"`
   511  	// Transaction: The identifier of the transaction associated with the commit. A
   512  	// transaction identifier is returned by a call to Datastore.BeginTransaction.
   513  	Transaction string `json:"transaction,omitempty"`
   514  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
   515  	// unconditionally include in API requests. By default, fields with empty or
   516  	// default values are omitted from API requests. See
   517  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   518  	// details.
   519  	ForceSendFields []string `json:"-"`
   520  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
   521  	// requests with the JSON null value. By default, fields with empty values are
   522  	// omitted from API requests. See
   523  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   524  	NullFields []string `json:"-"`
   525  }
   526  
   527  func (s *CommitRequest) MarshalJSON() ([]byte, error) {
   528  	type NoMethod CommitRequest
   529  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   530  }
   531  
   532  // CommitResponse: The response for Datastore.Commit.
   533  type CommitResponse struct {
   534  	// CommitTime: The transaction commit timestamp. Not set for non-transactional
   535  	// commits.
   536  	CommitTime string `json:"commitTime,omitempty"`
   537  	// IndexUpdates: The number of index entries updated during the commit, or zero
   538  	// if none were updated.
   539  	IndexUpdates int64 `json:"indexUpdates,omitempty"`
   540  	// MutationResults: The result of performing the mutations. The i-th mutation
   541  	// result corresponds to the i-th mutation in the request.
   542  	MutationResults []*MutationResult `json:"mutationResults,omitempty"`
   543  
   544  	// ServerResponse contains the HTTP response code and headers from the server.
   545  	googleapi.ServerResponse `json:"-"`
   546  	// ForceSendFields is a list of field names (e.g. "CommitTime") to
   547  	// unconditionally include in API requests. By default, fields with empty or
   548  	// default values are omitted from API requests. See
   549  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   550  	// details.
   551  	ForceSendFields []string `json:"-"`
   552  	// NullFields is a list of field names (e.g. "CommitTime") to include in API
   553  	// requests with the JSON null value. By default, fields with empty values are
   554  	// omitted from API requests. See
   555  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   556  	NullFields []string `json:"-"`
   557  }
   558  
   559  func (s *CommitResponse) MarshalJSON() ([]byte, error) {
   560  	type NoMethod CommitResponse
   561  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   562  }
   563  
   564  // CompositeFilter: A filter that merges multiple other filters using the given
   565  // operator.
   566  type CompositeFilter struct {
   567  	// Filters: The list of filters to combine. Requires: * At least one filter is
   568  	// present.
   569  	Filters []*Filter `json:"filters,omitempty"`
   570  	// Op: The operator for combining multiple filters.
   571  	//
   572  	// Possible values:
   573  	//   "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
   574  	//   "AND" - The results are required to satisfy each of the combined filters.
   575  	//   "OR" - Documents are required to satisfy at least one of the combined
   576  	// filters.
   577  	Op string `json:"op,omitempty"`
   578  	// ForceSendFields is a list of field names (e.g. "Filters") to unconditionally
   579  	// include in API requests. By default, fields with empty or default values are
   580  	// omitted from API requests. See
   581  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   582  	// details.
   583  	ForceSendFields []string `json:"-"`
   584  	// NullFields is a list of field names (e.g. "Filters") to include in API
   585  	// requests with the JSON null value. By default, fields with empty values are
   586  	// omitted from API requests. See
   587  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   588  	NullFields []string `json:"-"`
   589  }
   590  
   591  func (s *CompositeFilter) MarshalJSON() ([]byte, error) {
   592  	type NoMethod CompositeFilter
   593  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   594  }
   595  
   596  // Count: Count of entities that match the query. The `COUNT(*)` aggregation
   597  // function operates on the entire entity so it does not require a field
   598  // reference.
   599  type Count struct {
   600  	// UpTo: Optional. Optional constraint on the maximum number of entities to
   601  	// count. This provides a way to set an upper bound on the number of entities
   602  	// to scan, limiting latency, and cost. Unspecified is interpreted as no bound.
   603  	// If a zero value is provided, a count result of zero should always be
   604  	// expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT
   605  	// * FROM k ); ``` Requires: * Must be non-negative when present.
   606  	UpTo int64 `json:"upTo,omitempty,string"`
   607  	// ForceSendFields is a list of field names (e.g. "UpTo") to unconditionally
   608  	// include in API requests. By default, fields with empty or default values are
   609  	// omitted from API requests. See
   610  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   611  	// details.
   612  	ForceSendFields []string `json:"-"`
   613  	// NullFields is a list of field names (e.g. "UpTo") to include in API requests
   614  	// with the JSON null value. By default, fields with empty values are omitted
   615  	// from API requests. See
   616  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   617  	NullFields []string `json:"-"`
   618  }
   619  
   620  func (s *Count) MarshalJSON() ([]byte, error) {
   621  	type NoMethod Count
   622  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   623  }
   624  
   625  // Empty: A generic empty message that you can re-use to avoid defining
   626  // duplicated empty messages in your APIs. A typical example is to use it as
   627  // the request or the response type of an API method. For instance: service Foo
   628  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   629  type Empty struct {
   630  	// ServerResponse contains the HTTP response code and headers from the server.
   631  	googleapi.ServerResponse `json:"-"`
   632  }
   633  
   634  // Entity: A Datastore data object. Must not exceed 1 MiB - 4 bytes.
   635  type Entity struct {
   636  	// Key: The entity's key. An entity must have a key, unless otherwise
   637  	// documented (for example, an entity in `Value.entity_value` may have no key).
   638  	// An entity's kind is its key path's last element's kind, or null if it has no
   639  	// key.
   640  	Key *Key `json:"key,omitempty"`
   641  	// Properties: The entity's properties. The map's keys are property names. A
   642  	// property name matching regex `__.*__` is reserved. A reserved property name
   643  	// is forbidden in certain documented contexts. The map keys, represented as
   644  	// UTF-8, must not exceed 1,500 bytes and cannot be empty.
   645  	Properties map[string]Value `json:"properties,omitempty"`
   646  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
   647  	// include in API requests. By default, fields with empty or default values are
   648  	// omitted from API requests. See
   649  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   650  	// details.
   651  	ForceSendFields []string `json:"-"`
   652  	// NullFields is a list of field names (e.g. "Key") to include in API requests
   653  	// with the JSON null value. By default, fields with empty values are omitted
   654  	// from API requests. See
   655  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   656  	NullFields []string `json:"-"`
   657  }
   658  
   659  func (s *Entity) MarshalJSON() ([]byte, error) {
   660  	type NoMethod Entity
   661  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   662  }
   663  
   664  // EntityResult: The result of fetching an entity from Datastore.
   665  type EntityResult struct {
   666  	// CreateTime: The time at which the entity was created. This field is set for
   667  	// `FULL` entity results. If this entity is missing, this field will not be
   668  	// set.
   669  	CreateTime string `json:"createTime,omitempty"`
   670  	// Cursor: A cursor that points to the position after the result entity. Set
   671  	// only when the `EntityResult` is part of a `QueryResultBatch` message.
   672  	Cursor string `json:"cursor,omitempty"`
   673  	// Entity: The resulting entity.
   674  	Entity *Entity `json:"entity,omitempty"`
   675  	// UpdateTime: The time at which the entity was last changed. This field is set
   676  	// for `FULL` entity results. If this entity is missing, this field will not be
   677  	// set.
   678  	UpdateTime string `json:"updateTime,omitempty"`
   679  	// Version: The version of the entity, a strictly positive number that
   680  	// monotonically increases with changes to the entity. This field is set for
   681  	// `FULL` entity results. For missing entities in `LookupResponse`, this is the
   682  	// version of the snapshot that was used to look up the entity, and it is
   683  	// always set except for eventually consistent reads.
   684  	Version int64 `json:"version,omitempty,string"`
   685  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   686  	// unconditionally include in API requests. By default, fields with empty or
   687  	// default values are omitted from API requests. See
   688  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   689  	// details.
   690  	ForceSendFields []string `json:"-"`
   691  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   692  	// requests with the JSON null value. By default, fields with empty values are
   693  	// omitted from API requests. See
   694  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   695  	NullFields []string `json:"-"`
   696  }
   697  
   698  func (s *EntityResult) MarshalJSON() ([]byte, error) {
   699  	type NoMethod EntityResult
   700  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   701  }
   702  
   703  // ExecutionStats: Execution statistics for the query.
   704  type ExecutionStats struct {
   705  	// DebugStats: Debugging statistics from the execution of the query. Note that
   706  	// the debugging stats are subject to change as Firestore evolves. It could
   707  	// include: { "indexes_entries_scanned": "1000", "documents_scanned": "20",
   708  	// "billing_details" : { "documents_billable": "20", "index_entries_billable":
   709  	// "1000", "min_query_cost": "0" } }
   710  	DebugStats googleapi.RawMessage `json:"debugStats,omitempty"`
   711  	// ExecutionDuration: Total time to execute the query in the backend.
   712  	ExecutionDuration string `json:"executionDuration,omitempty"`
   713  	// ReadOperations: Total billable read operations.
   714  	ReadOperations int64 `json:"readOperations,omitempty,string"`
   715  	// ResultsReturned: Total number of results returned, including documents,
   716  	// projections, aggregation results, keys.
   717  	ResultsReturned int64 `json:"resultsReturned,omitempty,string"`
   718  	// ForceSendFields is a list of field names (e.g. "DebugStats") to
   719  	// unconditionally include in API requests. By default, fields with empty or
   720  	// default values are omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   722  	// details.
   723  	ForceSendFields []string `json:"-"`
   724  	// NullFields is a list of field names (e.g. "DebugStats") to include in API
   725  	// requests with the JSON null value. By default, fields with empty values are
   726  	// omitted from API requests. See
   727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   728  	NullFields []string `json:"-"`
   729  }
   730  
   731  func (s *ExecutionStats) MarshalJSON() ([]byte, error) {
   732  	type NoMethod ExecutionStats
   733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   734  }
   735  
   736  // ExplainMetrics: Explain metrics for the query.
   737  type ExplainMetrics struct {
   738  	// ExecutionStats: Aggregated stats from the execution of the query. Only
   739  	// present when ExplainOptions.analyze is set to true.
   740  	ExecutionStats *ExecutionStats `json:"executionStats,omitempty"`
   741  	// PlanSummary: Planning phase information for the query.
   742  	PlanSummary *PlanSummary `json:"planSummary,omitempty"`
   743  	// ForceSendFields is a list of field names (e.g. "ExecutionStats") to
   744  	// unconditionally include in API requests. By default, fields with empty or
   745  	// default values are omitted from API requests. See
   746  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   747  	// details.
   748  	ForceSendFields []string `json:"-"`
   749  	// NullFields is a list of field names (e.g. "ExecutionStats") to include in
   750  	// API requests with the JSON null value. By default, fields with empty values
   751  	// are omitted from API requests. See
   752  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   753  	NullFields []string `json:"-"`
   754  }
   755  
   756  func (s *ExplainMetrics) MarshalJSON() ([]byte, error) {
   757  	type NoMethod ExplainMetrics
   758  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   759  }
   760  
   761  // ExplainOptions: Explain options for the query.
   762  type ExplainOptions struct {
   763  	// Analyze: Optional. Whether to execute this query. When false (the default),
   764  	// the query will be planned, returning only metrics from the planning stages.
   765  	// When true, the query will be planned and executed, returning the full query
   766  	// results along with both planning and execution stage metrics.
   767  	Analyze bool `json:"analyze,omitempty"`
   768  	// ForceSendFields is a list of field names (e.g. "Analyze") to unconditionally
   769  	// include in API requests. By default, fields with empty or default values are
   770  	// omitted from API requests. See
   771  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   772  	// details.
   773  	ForceSendFields []string `json:"-"`
   774  	// NullFields is a list of field names (e.g. "Analyze") to include in API
   775  	// requests with the JSON null value. By default, fields with empty values are
   776  	// omitted from API requests. See
   777  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   778  	NullFields []string `json:"-"`
   779  }
   780  
   781  func (s *ExplainOptions) MarshalJSON() ([]byte, error) {
   782  	type NoMethod ExplainOptions
   783  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   784  }
   785  
   786  // Filter: A holder for any type of filter.
   787  type Filter struct {
   788  	// CompositeFilter: A composite filter.
   789  	CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"`
   790  	// PropertyFilter: A filter on a property.
   791  	PropertyFilter *PropertyFilter `json:"propertyFilter,omitempty"`
   792  	// ForceSendFields is a list of field names (e.g. "CompositeFilter") to
   793  	// unconditionally include in API requests. By default, fields with empty or
   794  	// default values are omitted from API requests. See
   795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   796  	// details.
   797  	ForceSendFields []string `json:"-"`
   798  	// NullFields is a list of field names (e.g. "CompositeFilter") to include in
   799  	// API requests with the JSON null value. By default, fields with empty values
   800  	// are omitted from API requests. See
   801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   802  	NullFields []string `json:"-"`
   803  }
   804  
   805  func (s *Filter) MarshalJSON() ([]byte, error) {
   806  	type NoMethod Filter
   807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   808  }
   809  
   810  // GoogleDatastoreAdminV1CommonMetadata: Metadata common to all Datastore Admin
   811  // operations.
   812  type GoogleDatastoreAdminV1CommonMetadata struct {
   813  	// EndTime: The time the operation ended, either successfully or otherwise.
   814  	EndTime string `json:"endTime,omitempty"`
   815  	// Labels: The client-assigned labels which were provided when the operation
   816  	// was created. May also include additional labels.
   817  	Labels map[string]string `json:"labels,omitempty"`
   818  	// OperationType: The type of the operation. Can be used as a filter in
   819  	// ListOperationsRequest.
   820  	//
   821  	// Possible values:
   822  	//   "OPERATION_TYPE_UNSPECIFIED" - Unspecified.
   823  	//   "EXPORT_ENTITIES" - ExportEntities.
   824  	//   "IMPORT_ENTITIES" - ImportEntities.
   825  	//   "CREATE_INDEX" - CreateIndex.
   826  	//   "DELETE_INDEX" - DeleteIndex.
   827  	OperationType string `json:"operationType,omitempty"`
   828  	// StartTime: The time that work began on the operation.
   829  	StartTime string `json:"startTime,omitempty"`
   830  	// State: The current state of the Operation.
   831  	//
   832  	// Possible values:
   833  	//   "STATE_UNSPECIFIED" - Unspecified.
   834  	//   "INITIALIZING" - Request is being prepared for processing.
   835  	//   "PROCESSING" - Request is actively being processed.
   836  	//   "CANCELLING" - Request is in the process of being cancelled after user
   837  	// called google.longrunning.Operations.CancelOperation on the operation.
   838  	//   "FINALIZING" - Request has been processed and is in its finalization
   839  	// stage.
   840  	//   "SUCCESSFUL" - Request has completed successfully.
   841  	//   "FAILED" - Request has finished being processed, but encountered an error.
   842  	//   "CANCELLED" - Request has finished being cancelled after user called
   843  	// google.longrunning.Operations.CancelOperation.
   844  	State string `json:"state,omitempty"`
   845  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
   846  	// include in API requests. By default, fields with empty or default values are
   847  	// omitted from API requests. See
   848  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   849  	// details.
   850  	ForceSendFields []string `json:"-"`
   851  	// NullFields is a list of field names (e.g. "EndTime") to include in API
   852  	// requests with the JSON null value. By default, fields with empty values are
   853  	// omitted from API requests. See
   854  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   855  	NullFields []string `json:"-"`
   856  }
   857  
   858  func (s *GoogleDatastoreAdminV1CommonMetadata) MarshalJSON() ([]byte, error) {
   859  	type NoMethod GoogleDatastoreAdminV1CommonMetadata
   860  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   861  }
   862  
   863  // GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata: Metadata for
   864  // Datastore to Firestore migration operations. The DatastoreFirestoreMigration
   865  // operation is not started by the end-user via an explicit "creation" method.
   866  // This is an intentional deviation from the LRO design pattern. This singleton
   867  // resource can be accessed at:
   868  // "projects/{project_id}/operations/datastore-firestore-migration"
   869  type GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata struct {
   870  	// MigrationState: The current state of migration from Cloud Datastore to Cloud
   871  	// Firestore in Datastore mode.
   872  	//
   873  	// Possible values:
   874  	//   "MIGRATION_STATE_UNSPECIFIED" - Unspecified.
   875  	//   "RUNNING" - The migration is running.
   876  	//   "PAUSED" - The migration is paused.
   877  	//   "COMPLETE" - The migration is complete.
   878  	MigrationState string `json:"migrationState,omitempty"`
   879  	// MigrationStep: The current step of migration from Cloud Datastore to Cloud
   880  	// Firestore in Datastore mode.
   881  	//
   882  	// Possible values:
   883  	//   "MIGRATION_STEP_UNSPECIFIED" - Unspecified.
   884  	//   "PREPARE" - Pre-migration: the database is prepared for migration.
   885  	//   "START" - Start of migration.
   886  	//   "APPLY_WRITES_SYNCHRONOUSLY" - Writes are applied synchronously to at
   887  	// least one replica.
   888  	//   "COPY_AND_VERIFY" - Data is copied to Cloud Firestore and then verified to
   889  	// match the data in Cloud Datastore.
   890  	//   "REDIRECT_EVENTUALLY_CONSISTENT_READS" - Eventually-consistent reads are
   891  	// redirected to Cloud Firestore.
   892  	//   "REDIRECT_STRONGLY_CONSISTENT_READS" - Strongly-consistent reads are
   893  	// redirected to Cloud Firestore.
   894  	//   "REDIRECT_WRITES" - Writes are redirected to Cloud Firestore.
   895  	MigrationStep string `json:"migrationStep,omitempty"`
   896  	// ForceSendFields is a list of field names (e.g. "MigrationState") to
   897  	// unconditionally include in API requests. By default, fields with empty or
   898  	// default values are omitted from API requests. See
   899  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   900  	// details.
   901  	ForceSendFields []string `json:"-"`
   902  	// NullFields is a list of field names (e.g. "MigrationState") to include in
   903  	// API requests with the JSON null value. By default, fields with empty values
   904  	// are omitted from API requests. See
   905  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   906  	NullFields []string `json:"-"`
   907  }
   908  
   909  func (s *GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata) MarshalJSON() ([]byte, error) {
   910  	type NoMethod GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata
   911  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   912  }
   913  
   914  // GoogleDatastoreAdminV1EntityFilter: Identifies a subset of entities in a
   915  // project. This is specified as combinations of kinds and namespaces (either
   916  // or both of which may be all, as described in the following examples).
   917  // Example usage: Entire project: kinds=[], namespace_ids=[] Kinds Foo and Bar
   918  // in all namespaces: kinds=['Foo', 'Bar'], namespace_ids=[] Kinds Foo and Bar
   919  // only in the default namespace: kinds=['Foo', 'Bar'], namespace_ids=[”]
   920  // Kinds Foo and Bar in both the default and Baz namespaces: kinds=['Foo',
   921  // 'Bar'], namespace_ids=[”, 'Baz'] The entire Baz namespace: kinds=[],
   922  // namespace_ids=['Baz']
   923  type GoogleDatastoreAdminV1EntityFilter struct {
   924  	// Kinds: If empty, then this represents all kinds.
   925  	Kinds []string `json:"kinds,omitempty"`
   926  	// NamespaceIds: An empty list represents all namespaces. This is the preferred
   927  	// usage for projects that don't use namespaces. An empty string element
   928  	// represents the default namespace. This should be used if the project has
   929  	// data in non-default namespaces, but doesn't want to include them. Each
   930  	// namespace in this list must be unique.
   931  	NamespaceIds []string `json:"namespaceIds,omitempty"`
   932  	// ForceSendFields is a list of field names (e.g. "Kinds") to unconditionally
   933  	// include in API requests. By default, fields with empty or default values are
   934  	// omitted from API requests. See
   935  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   936  	// details.
   937  	ForceSendFields []string `json:"-"`
   938  	// NullFields is a list of field names (e.g. "Kinds") to include in API
   939  	// requests with the JSON null value. By default, fields with empty values are
   940  	// omitted from API requests. See
   941  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   942  	NullFields []string `json:"-"`
   943  }
   944  
   945  func (s *GoogleDatastoreAdminV1EntityFilter) MarshalJSON() ([]byte, error) {
   946  	type NoMethod GoogleDatastoreAdminV1EntityFilter
   947  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   948  }
   949  
   950  // GoogleDatastoreAdminV1ExportEntitiesMetadata: Metadata for ExportEntities
   951  // operations.
   952  type GoogleDatastoreAdminV1ExportEntitiesMetadata struct {
   953  	// Common: Metadata common to all Datastore Admin operations.
   954  	Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"`
   955  	// EntityFilter: Description of which entities are being exported.
   956  	EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"`
   957  	// OutputUrlPrefix: Location for the export metadata and data files. This will
   958  	// be the same value as the
   959  	// google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field. The
   960  	// final output location is provided in
   961  	// google.datastore.admin.v1.ExportEntitiesResponse.output_url.
   962  	OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"`
   963  	// ProgressBytes: An estimate of the number of bytes processed.
   964  	ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"`
   965  	// ProgressEntities: An estimate of the number of entities processed.
   966  	ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"`
   967  	// ForceSendFields is a list of field names (e.g. "Common") to unconditionally
   968  	// include in API requests. By default, fields with empty or default values are
   969  	// omitted from API requests. See
   970  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   971  	// details.
   972  	ForceSendFields []string `json:"-"`
   973  	// NullFields is a list of field names (e.g. "Common") to include in API
   974  	// requests with the JSON null value. By default, fields with empty values are
   975  	// omitted from API requests. See
   976  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   977  	NullFields []string `json:"-"`
   978  }
   979  
   980  func (s *GoogleDatastoreAdminV1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) {
   981  	type NoMethod GoogleDatastoreAdminV1ExportEntitiesMetadata
   982  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   983  }
   984  
   985  // GoogleDatastoreAdminV1ExportEntitiesRequest: The request for
   986  // google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
   987  type GoogleDatastoreAdminV1ExportEntitiesRequest struct {
   988  	// EntityFilter: Description of what data from the project is included in the
   989  	// export.
   990  	EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"`
   991  	// Labels: Client-assigned labels.
   992  	Labels map[string]string `json:"labels,omitempty"`
   993  	// OutputUrlPrefix: Required. Location for the export metadata and data files.
   994  	// The full resource URL of the external storage location. Currently, only
   995  	// Google Cloud Storage is supported. So output_url_prefix should be of the
   996  	// form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
   997  	// of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud
   998  	// Storage namespace path (this is not a Cloud Datastore namespace). For more
   999  	// information about Cloud Storage namespace paths, see Object name
  1000  	// considerations
  1001  	// (https://cloud.google.com/storage/docs/naming#object-considerations). The
  1002  	// resulting files will be nested deeper than the specified URL prefix. The
  1003  	// final output URL will be provided in the
  1004  	// google.datastore.admin.v1.ExportEntitiesResponse.output_url field. That
  1005  	// value should be used for subsequent ImportEntities operations. By nesting
  1006  	// the data files deeper, the same Cloud Storage bucket can be used in multiple
  1007  	// ExportEntities operations without conflict.
  1008  	OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"`
  1009  	// ForceSendFields is a list of field names (e.g. "EntityFilter") to
  1010  	// unconditionally include in API requests. By default, fields with empty or
  1011  	// default values are omitted from API requests. See
  1012  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1013  	// details.
  1014  	ForceSendFields []string `json:"-"`
  1015  	// NullFields is a list of field names (e.g. "EntityFilter") to include in API
  1016  	// requests with the JSON null value. By default, fields with empty values are
  1017  	// omitted from API requests. See
  1018  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1019  	NullFields []string `json:"-"`
  1020  }
  1021  
  1022  func (s *GoogleDatastoreAdminV1ExportEntitiesRequest) MarshalJSON() ([]byte, error) {
  1023  	type NoMethod GoogleDatastoreAdminV1ExportEntitiesRequest
  1024  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1025  }
  1026  
  1027  // GoogleDatastoreAdminV1ExportEntitiesResponse: The response for
  1028  // google.datastore.admin.v1.DatastoreAdmin.ExportEntities.
  1029  type GoogleDatastoreAdminV1ExportEntitiesResponse struct {
  1030  	// OutputUrl: Location of the output metadata file. This can be used to begin
  1031  	// an import into Cloud Datastore (this project or another project). See
  1032  	// google.datastore.admin.v1.ImportEntitiesRequest.input_url. Only present if
  1033  	// the operation completed successfully.
  1034  	OutputUrl string `json:"outputUrl,omitempty"`
  1035  	// ForceSendFields is a list of field names (e.g. "OutputUrl") to
  1036  	// unconditionally include in API requests. By default, fields with empty or
  1037  	// default values are omitted from API requests. See
  1038  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1039  	// details.
  1040  	ForceSendFields []string `json:"-"`
  1041  	// NullFields is a list of field names (e.g. "OutputUrl") to include in API
  1042  	// requests with the JSON null value. By default, fields with empty values are
  1043  	// omitted from API requests. See
  1044  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1045  	NullFields []string `json:"-"`
  1046  }
  1047  
  1048  func (s *GoogleDatastoreAdminV1ExportEntitiesResponse) MarshalJSON() ([]byte, error) {
  1049  	type NoMethod GoogleDatastoreAdminV1ExportEntitiesResponse
  1050  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1051  }
  1052  
  1053  // GoogleDatastoreAdminV1ImportEntitiesMetadata: Metadata for ImportEntities
  1054  // operations.
  1055  type GoogleDatastoreAdminV1ImportEntitiesMetadata struct {
  1056  	// Common: Metadata common to all Datastore Admin operations.
  1057  	Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"`
  1058  	// EntityFilter: Description of which entities are being imported.
  1059  	EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"`
  1060  	// InputUrl: The location of the import metadata file. This will be the same
  1061  	// value as the google.datastore.admin.v1.ExportEntitiesResponse.output_url
  1062  	// field.
  1063  	InputUrl string `json:"inputUrl,omitempty"`
  1064  	// ProgressBytes: An estimate of the number of bytes processed.
  1065  	ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"`
  1066  	// ProgressEntities: An estimate of the number of entities processed.
  1067  	ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"`
  1068  	// ForceSendFields is a list of field names (e.g. "Common") to unconditionally
  1069  	// include in API requests. By default, fields with empty or default values are
  1070  	// omitted from API requests. See
  1071  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1072  	// details.
  1073  	ForceSendFields []string `json:"-"`
  1074  	// NullFields is a list of field names (e.g. "Common") to include in API
  1075  	// requests with the JSON null value. By default, fields with empty values are
  1076  	// omitted from API requests. See
  1077  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1078  	NullFields []string `json:"-"`
  1079  }
  1080  
  1081  func (s *GoogleDatastoreAdminV1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) {
  1082  	type NoMethod GoogleDatastoreAdminV1ImportEntitiesMetadata
  1083  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1084  }
  1085  
  1086  // GoogleDatastoreAdminV1ImportEntitiesRequest: The request for
  1087  // google.datastore.admin.v1.DatastoreAdmin.ImportEntities.
  1088  type GoogleDatastoreAdminV1ImportEntitiesRequest struct {
  1089  	// EntityFilter: Optionally specify which kinds/namespaces are to be imported.
  1090  	// If provided, the list must be a subset of the EntityFilter used in creating
  1091  	// the export, otherwise a FAILED_PRECONDITION error will be returned. If no
  1092  	// filter is specified then all entities from the export are imported.
  1093  	EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"`
  1094  	// InputUrl: Required. The full resource URL of the external storage location.
  1095  	// Currently, only Google Cloud Storage is supported. So input_url should be of
  1096  	// the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`,
  1097  	// where `BUCKET_NAME` is the name of the Cloud Storage bucket,
  1098  	// `NAMESPACE_PATH` is an optional Cloud Storage namespace path (this is not a
  1099  	// Cloud Datastore namespace), and `OVERALL_EXPORT_METADATA_FILE` is the
  1100  	// metadata file written by the ExportEntities operation. For more information
  1101  	// about Cloud Storage namespace paths, see Object name considerations
  1102  	// (https://cloud.google.com/storage/docs/naming#object-considerations). For
  1103  	// more information, see
  1104  	// google.datastore.admin.v1.ExportEntitiesResponse.output_url.
  1105  	InputUrl string `json:"inputUrl,omitempty"`
  1106  	// Labels: Client-assigned labels.
  1107  	Labels map[string]string `json:"labels,omitempty"`
  1108  	// ForceSendFields is a list of field names (e.g. "EntityFilter") to
  1109  	// unconditionally include in API requests. By default, fields with empty or
  1110  	// default values are omitted from API requests. See
  1111  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1112  	// details.
  1113  	ForceSendFields []string `json:"-"`
  1114  	// NullFields is a list of field names (e.g. "EntityFilter") to include in API
  1115  	// requests with the JSON null value. By default, fields with empty values are
  1116  	// omitted from API requests. See
  1117  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1118  	NullFields []string `json:"-"`
  1119  }
  1120  
  1121  func (s *GoogleDatastoreAdminV1ImportEntitiesRequest) MarshalJSON() ([]byte, error) {
  1122  	type NoMethod GoogleDatastoreAdminV1ImportEntitiesRequest
  1123  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1124  }
  1125  
  1126  // GoogleDatastoreAdminV1Index: Datastore composite index definition.
  1127  type GoogleDatastoreAdminV1Index struct {
  1128  	// Ancestor: Required. The index's ancestor mode. Must not be
  1129  	// ANCESTOR_MODE_UNSPECIFIED.
  1130  	//
  1131  	// Possible values:
  1132  	//   "ANCESTOR_MODE_UNSPECIFIED" - The ancestor mode is unspecified.
  1133  	//   "NONE" - Do not include the entity's ancestors in the index.
  1134  	//   "ALL_ANCESTORS" - Include all the entity's ancestors in the index.
  1135  	Ancestor string `json:"ancestor,omitempty"`
  1136  	// IndexId: Output only. The resource ID of the index.
  1137  	IndexId string `json:"indexId,omitempty"`
  1138  	// Kind: Required. The entity kind to which this index applies.
  1139  	Kind string `json:"kind,omitempty"`
  1140  	// ProjectId: Output only. Project ID.
  1141  	ProjectId string `json:"projectId,omitempty"`
  1142  	// Properties: Required. An ordered sequence of property names and their index
  1143  	// attributes. Requires: * A maximum of 100 properties.
  1144  	Properties []*GoogleDatastoreAdminV1IndexedProperty `json:"properties,omitempty"`
  1145  	// State: Output only. The state of the index.
  1146  	//
  1147  	// Possible values:
  1148  	//   "STATE_UNSPECIFIED" - The state is unspecified.
  1149  	//   "CREATING" - The index is being created, and cannot be used by queries.
  1150  	// There is an active long-running operation for the index. The index is
  1151  	// updated when writing an entity. Some index data may exist.
  1152  	//   "READY" - The index is ready to be used. The index is updated when writing
  1153  	// an entity. The index is fully populated from all stored entities it applies
  1154  	// to.
  1155  	//   "DELETING" - The index is being deleted, and cannot be used by queries.
  1156  	// There is an active long-running operation for the index. The index is not
  1157  	// updated when writing an entity. Some index data may exist.
  1158  	//   "ERROR" - The index was being created or deleted, but something went
  1159  	// wrong. The index cannot by used by queries. There is no active long-running
  1160  	// operation for the index, and the most recently finished long-running
  1161  	// operation failed. The index is not updated when writing an entity. Some
  1162  	// index data may exist.
  1163  	State string `json:"state,omitempty"`
  1164  
  1165  	// ServerResponse contains the HTTP response code and headers from the server.
  1166  	googleapi.ServerResponse `json:"-"`
  1167  	// ForceSendFields is a list of field names (e.g. "Ancestor") to
  1168  	// unconditionally include in API requests. By default, fields with empty or
  1169  	// default values are omitted from API requests. See
  1170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1171  	// details.
  1172  	ForceSendFields []string `json:"-"`
  1173  	// NullFields is a list of field names (e.g. "Ancestor") to include in API
  1174  	// requests with the JSON null value. By default, fields with empty values are
  1175  	// omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1177  	NullFields []string `json:"-"`
  1178  }
  1179  
  1180  func (s *GoogleDatastoreAdminV1Index) MarshalJSON() ([]byte, error) {
  1181  	type NoMethod GoogleDatastoreAdminV1Index
  1182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1183  }
  1184  
  1185  // GoogleDatastoreAdminV1IndexOperationMetadata: Metadata for Index operations.
  1186  type GoogleDatastoreAdminV1IndexOperationMetadata struct {
  1187  	// Common: Metadata common to all Datastore Admin operations.
  1188  	Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"`
  1189  	// IndexId: The index resource ID that this operation is acting on.
  1190  	IndexId string `json:"indexId,omitempty"`
  1191  	// ProgressEntities: An estimate of the number of entities processed.
  1192  	ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"`
  1193  	// ForceSendFields is a list of field names (e.g. "Common") to unconditionally
  1194  	// include in API requests. By default, fields with empty or default values are
  1195  	// omitted from API requests. See
  1196  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1197  	// details.
  1198  	ForceSendFields []string `json:"-"`
  1199  	// NullFields is a list of field names (e.g. "Common") to include in API
  1200  	// requests with the JSON null value. By default, fields with empty values are
  1201  	// omitted from API requests. See
  1202  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1203  	NullFields []string `json:"-"`
  1204  }
  1205  
  1206  func (s *GoogleDatastoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, error) {
  1207  	type NoMethod GoogleDatastoreAdminV1IndexOperationMetadata
  1208  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1209  }
  1210  
  1211  // GoogleDatastoreAdminV1IndexedProperty: A property of an index.
  1212  type GoogleDatastoreAdminV1IndexedProperty struct {
  1213  	// Direction: Required. The indexed property's direction. Must not be
  1214  	// DIRECTION_UNSPECIFIED.
  1215  	//
  1216  	// Possible values:
  1217  	//   "DIRECTION_UNSPECIFIED" - The direction is unspecified.
  1218  	//   "ASCENDING" - The property's values are indexed so as to support
  1219  	// sequencing in ascending order and also query by <, >, <=, >=, and =.
  1220  	//   "DESCENDING" - The property's values are indexed so as to support
  1221  	// sequencing in descending order and also query by <, >, <=, >=, and =.
  1222  	Direction string `json:"direction,omitempty"`
  1223  	// Name: Required. The property name to index.
  1224  	Name string `json:"name,omitempty"`
  1225  	// ForceSendFields is a list of field names (e.g. "Direction") to
  1226  	// unconditionally include in API requests. By default, fields with empty or
  1227  	// default values are omitted from API requests. See
  1228  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1229  	// details.
  1230  	ForceSendFields []string `json:"-"`
  1231  	// NullFields is a list of field names (e.g. "Direction") to include in API
  1232  	// requests with the JSON null value. By default, fields with empty values are
  1233  	// omitted from API requests. See
  1234  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1235  	NullFields []string `json:"-"`
  1236  }
  1237  
  1238  func (s *GoogleDatastoreAdminV1IndexedProperty) MarshalJSON() ([]byte, error) {
  1239  	type NoMethod GoogleDatastoreAdminV1IndexedProperty
  1240  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1241  }
  1242  
  1243  // GoogleDatastoreAdminV1ListIndexesResponse: The response for
  1244  // google.datastore.admin.v1.DatastoreAdmin.ListIndexes.
  1245  type GoogleDatastoreAdminV1ListIndexesResponse struct {
  1246  	// Indexes: The indexes.
  1247  	Indexes []*GoogleDatastoreAdminV1Index `json:"indexes,omitempty"`
  1248  	// NextPageToken: The standard List next-page token.
  1249  	NextPageToken string `json:"nextPageToken,omitempty"`
  1250  
  1251  	// ServerResponse contains the HTTP response code and headers from the server.
  1252  	googleapi.ServerResponse `json:"-"`
  1253  	// ForceSendFields is a list of field names (e.g. "Indexes") to unconditionally
  1254  	// include in API requests. By default, fields with empty or default values are
  1255  	// omitted from API requests. See
  1256  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1257  	// details.
  1258  	ForceSendFields []string `json:"-"`
  1259  	// NullFields is a list of field names (e.g. "Indexes") to include in API
  1260  	// requests with the JSON null value. By default, fields with empty values are
  1261  	// omitted from API requests. See
  1262  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1263  	NullFields []string `json:"-"`
  1264  }
  1265  
  1266  func (s *GoogleDatastoreAdminV1ListIndexesResponse) MarshalJSON() ([]byte, error) {
  1267  	type NoMethod GoogleDatastoreAdminV1ListIndexesResponse
  1268  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1269  }
  1270  
  1271  // GoogleDatastoreAdminV1MigrationProgressEvent: An event signifying the start
  1272  // of a new step in a migration from Cloud Datastore to Cloud Firestore in
  1273  // Datastore mode
  1274  // (https://cloud.google.com/datastore/docs/upgrade-to-firestore).
  1275  type GoogleDatastoreAdminV1MigrationProgressEvent struct {
  1276  	// PrepareStepDetails: Details for the `PREPARE` step.
  1277  	PrepareStepDetails *GoogleDatastoreAdminV1PrepareStepDetails `json:"prepareStepDetails,omitempty"`
  1278  	// RedirectWritesStepDetails: Details for the `REDIRECT_WRITES` step.
  1279  	RedirectWritesStepDetails *GoogleDatastoreAdminV1RedirectWritesStepDetails `json:"redirectWritesStepDetails,omitempty"`
  1280  	// Step: The step that is starting. An event with step set to `START` indicates
  1281  	// that the migration has been reverted back to the initial pre-migration
  1282  	// state.
  1283  	//
  1284  	// Possible values:
  1285  	//   "MIGRATION_STEP_UNSPECIFIED" - Unspecified.
  1286  	//   "PREPARE" - Pre-migration: the database is prepared for migration.
  1287  	//   "START" - Start of migration.
  1288  	//   "APPLY_WRITES_SYNCHRONOUSLY" - Writes are applied synchronously to at
  1289  	// least one replica.
  1290  	//   "COPY_AND_VERIFY" - Data is copied to Cloud Firestore and then verified to
  1291  	// match the data in Cloud Datastore.
  1292  	//   "REDIRECT_EVENTUALLY_CONSISTENT_READS" - Eventually-consistent reads are
  1293  	// redirected to Cloud Firestore.
  1294  	//   "REDIRECT_STRONGLY_CONSISTENT_READS" - Strongly-consistent reads are
  1295  	// redirected to Cloud Firestore.
  1296  	//   "REDIRECT_WRITES" - Writes are redirected to Cloud Firestore.
  1297  	Step string `json:"step,omitempty"`
  1298  	// ForceSendFields is a list of field names (e.g. "PrepareStepDetails") to
  1299  	// unconditionally include in API requests. By default, fields with empty or
  1300  	// default values are omitted from API requests. See
  1301  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1302  	// details.
  1303  	ForceSendFields []string `json:"-"`
  1304  	// NullFields is a list of field names (e.g. "PrepareStepDetails") to include
  1305  	// in API requests with the JSON null value. By default, fields with empty
  1306  	// values are omitted from API requests. See
  1307  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1308  	NullFields []string `json:"-"`
  1309  }
  1310  
  1311  func (s *GoogleDatastoreAdminV1MigrationProgressEvent) MarshalJSON() ([]byte, error) {
  1312  	type NoMethod GoogleDatastoreAdminV1MigrationProgressEvent
  1313  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1314  }
  1315  
  1316  // GoogleDatastoreAdminV1MigrationStateEvent: An event signifying a change in
  1317  // state of a migration from Cloud Datastore to Cloud Firestore in Datastore
  1318  // mode (https://cloud.google.com/datastore/docs/upgrade-to-firestore).
  1319  type GoogleDatastoreAdminV1MigrationStateEvent struct {
  1320  	// State: The new state of the migration.
  1321  	//
  1322  	// Possible values:
  1323  	//   "MIGRATION_STATE_UNSPECIFIED" - Unspecified.
  1324  	//   "RUNNING" - The migration is running.
  1325  	//   "PAUSED" - The migration is paused.
  1326  	//   "COMPLETE" - The migration is complete.
  1327  	State string `json:"state,omitempty"`
  1328  	// ForceSendFields is a list of field names (e.g. "State") to unconditionally
  1329  	// include in API requests. By default, fields with empty or default values are
  1330  	// omitted from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1332  	// details.
  1333  	ForceSendFields []string `json:"-"`
  1334  	// NullFields is a list of field names (e.g. "State") to include in API
  1335  	// requests with the JSON null value. By default, fields with empty values are
  1336  	// omitted from API requests. See
  1337  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1338  	NullFields []string `json:"-"`
  1339  }
  1340  
  1341  func (s *GoogleDatastoreAdminV1MigrationStateEvent) MarshalJSON() ([]byte, error) {
  1342  	type NoMethod GoogleDatastoreAdminV1MigrationStateEvent
  1343  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1344  }
  1345  
  1346  // GoogleDatastoreAdminV1PrepareStepDetails: Details for the `PREPARE` step.
  1347  type GoogleDatastoreAdminV1PrepareStepDetails struct {
  1348  	// ConcurrencyMode: The concurrency mode this database will use when it reaches
  1349  	// the `REDIRECT_WRITES` step.
  1350  	//
  1351  	// Possible values:
  1352  	//   "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified.
  1353  	//   "PESSIMISTIC" - Pessimistic concurrency.
  1354  	//   "OPTIMISTIC" - Optimistic concurrency.
  1355  	//   "OPTIMISTIC_WITH_ENTITY_GROUPS" - Optimistic concurrency with entity
  1356  	// groups.
  1357  	ConcurrencyMode string `json:"concurrencyMode,omitempty"`
  1358  	// ForceSendFields is a list of field names (e.g. "ConcurrencyMode") to
  1359  	// unconditionally include in API requests. By default, fields with empty or
  1360  	// default values are omitted from API requests. See
  1361  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1362  	// details.
  1363  	ForceSendFields []string `json:"-"`
  1364  	// NullFields is a list of field names (e.g. "ConcurrencyMode") to include in
  1365  	// API requests with the JSON null value. By default, fields with empty values
  1366  	// are omitted from API requests. See
  1367  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1368  	NullFields []string `json:"-"`
  1369  }
  1370  
  1371  func (s *GoogleDatastoreAdminV1PrepareStepDetails) MarshalJSON() ([]byte, error) {
  1372  	type NoMethod GoogleDatastoreAdminV1PrepareStepDetails
  1373  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1374  }
  1375  
  1376  // GoogleDatastoreAdminV1Progress: Measures the progress of a particular
  1377  // metric.
  1378  type GoogleDatastoreAdminV1Progress struct {
  1379  	// WorkCompleted: The amount of work that has been completed. Note that this
  1380  	// may be greater than work_estimated.
  1381  	WorkCompleted int64 `json:"workCompleted,omitempty,string"`
  1382  	// WorkEstimated: An estimate of how much work needs to be performed. May be
  1383  	// zero if the work estimate is unavailable.
  1384  	WorkEstimated int64 `json:"workEstimated,omitempty,string"`
  1385  	// ForceSendFields is a list of field names (e.g. "WorkCompleted") 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. "WorkCompleted") to include in API
  1392  	// requests with the JSON null value. By default, fields with empty values are
  1393  	// 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 *GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error) {
  1399  	type NoMethod GoogleDatastoreAdminV1Progress
  1400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1401  }
  1402  
  1403  // GoogleDatastoreAdminV1RedirectWritesStepDetails: Details for the
  1404  // `REDIRECT_WRITES` step.
  1405  type GoogleDatastoreAdminV1RedirectWritesStepDetails struct {
  1406  	// ConcurrencyMode: Ths concurrency mode for this database.
  1407  	//
  1408  	// Possible values:
  1409  	//   "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified.
  1410  	//   "PESSIMISTIC" - Pessimistic concurrency.
  1411  	//   "OPTIMISTIC" - Optimistic concurrency.
  1412  	//   "OPTIMISTIC_WITH_ENTITY_GROUPS" - Optimistic concurrency with entity
  1413  	// groups.
  1414  	ConcurrencyMode string `json:"concurrencyMode,omitempty"`
  1415  	// ForceSendFields is a list of field names (e.g. "ConcurrencyMode") to
  1416  	// unconditionally include in API requests. By default, fields with empty or
  1417  	// default values are omitted from API requests. See
  1418  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1419  	// details.
  1420  	ForceSendFields []string `json:"-"`
  1421  	// NullFields is a list of field names (e.g. "ConcurrencyMode") to include in
  1422  	// API requests with the JSON null value. By default, fields with empty values
  1423  	// are omitted from API requests. See
  1424  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1425  	NullFields []string `json:"-"`
  1426  }
  1427  
  1428  func (s *GoogleDatastoreAdminV1RedirectWritesStepDetails) MarshalJSON() ([]byte, error) {
  1429  	type NoMethod GoogleDatastoreAdminV1RedirectWritesStepDetails
  1430  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1431  }
  1432  
  1433  // GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all Datastore
  1434  // Admin operations.
  1435  type GoogleDatastoreAdminV1beta1CommonMetadata struct {
  1436  	// EndTime: The time the operation ended, either successfully or otherwise.
  1437  	EndTime string `json:"endTime,omitempty"`
  1438  	// Labels: The client-assigned labels which were provided when the operation
  1439  	// was created. May also include additional labels.
  1440  	Labels map[string]string `json:"labels,omitempty"`
  1441  	// OperationType: The type of the operation. Can be used as a filter in
  1442  	// ListOperationsRequest.
  1443  	//
  1444  	// Possible values:
  1445  	//   "OPERATION_TYPE_UNSPECIFIED" - Unspecified.
  1446  	//   "EXPORT_ENTITIES" - ExportEntities.
  1447  	//   "IMPORT_ENTITIES" - ImportEntities.
  1448  	OperationType string `json:"operationType,omitempty"`
  1449  	// StartTime: The time that work began on the operation.
  1450  	StartTime string `json:"startTime,omitempty"`
  1451  	// State: The current state of the Operation.
  1452  	//
  1453  	// Possible values:
  1454  	//   "STATE_UNSPECIFIED" - Unspecified.
  1455  	//   "INITIALIZING" - Request is being prepared for processing.
  1456  	//   "PROCESSING" - Request is actively being processed.
  1457  	//   "CANCELLING" - Request is in the process of being cancelled after user
  1458  	// called google.longrunning.Operations.CancelOperation on the operation.
  1459  	//   "FINALIZING" - Request has been processed and is in its finalization
  1460  	// stage.
  1461  	//   "SUCCESSFUL" - Request has completed successfully.
  1462  	//   "FAILED" - Request has finished being processed, but encountered an error.
  1463  	//   "CANCELLED" - Request has finished being cancelled after user called
  1464  	// google.longrunning.Operations.CancelOperation.
  1465  	State string `json:"state,omitempty"`
  1466  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1467  	// include in API requests. By default, fields with empty or default values are
  1468  	// omitted from API requests. See
  1469  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1470  	// details.
  1471  	ForceSendFields []string `json:"-"`
  1472  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1473  	// requests with the JSON null value. By default, fields with empty values are
  1474  	// omitted from API requests. See
  1475  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1476  	NullFields []string `json:"-"`
  1477  }
  1478  
  1479  func (s *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error) {
  1480  	type NoMethod GoogleDatastoreAdminV1beta1CommonMetadata
  1481  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1482  }
  1483  
  1484  // GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of entities in
  1485  // a project. This is specified as combinations of kinds and namespaces (either
  1486  // or both of which may be all, as described in the following examples).
  1487  // Example usage: Entire project: kinds=[], namespace_ids=[] Kinds Foo and Bar
  1488  // in all namespaces: kinds=['Foo', 'Bar'], namespace_ids=[] Kinds Foo and Bar
  1489  // only in the default namespace: kinds=['Foo', 'Bar'], namespace_ids=[”]
  1490  // Kinds Foo and Bar in both the default and Baz namespaces: kinds=['Foo',
  1491  // 'Bar'], namespace_ids=[”, 'Baz'] The entire Baz namespace: kinds=[],
  1492  // namespace_ids=['Baz']
  1493  type GoogleDatastoreAdminV1beta1EntityFilter struct {
  1494  	// Kinds: If empty, then this represents all kinds.
  1495  	Kinds []string `json:"kinds,omitempty"`
  1496  	// NamespaceIds: An empty list represents all namespaces. This is the preferred
  1497  	// usage for projects that don't use namespaces. An empty string element
  1498  	// represents the default namespace. This should be used if the project has
  1499  	// data in non-default namespaces, but doesn't want to include them. Each
  1500  	// namespace in this list must be unique.
  1501  	NamespaceIds []string `json:"namespaceIds,omitempty"`
  1502  	// ForceSendFields is a list of field names (e.g. "Kinds") to unconditionally
  1503  	// include in API requests. By default, fields with empty or default values are
  1504  	// omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1506  	// details.
  1507  	ForceSendFields []string `json:"-"`
  1508  	// NullFields is a list of field names (e.g. "Kinds") to include in API
  1509  	// requests with the JSON null value. By default, fields with empty values are
  1510  	// omitted from API requests. See
  1511  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1512  	NullFields []string `json:"-"`
  1513  }
  1514  
  1515  func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error) {
  1516  	type NoMethod GoogleDatastoreAdminV1beta1EntityFilter
  1517  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1518  }
  1519  
  1520  // GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for
  1521  // ExportEntities operations.
  1522  type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct {
  1523  	// Common: Metadata common to all Datastore Admin operations.
  1524  	Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"`
  1525  	// EntityFilter: Description of which entities are being exported.
  1526  	EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"`
  1527  	// OutputUrlPrefix: Location for the export metadata and data files. This will
  1528  	// be the same value as the
  1529  	// google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix
  1530  	// field. The final output location is provided in
  1531  	// google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
  1532  	OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"`
  1533  	// ProgressBytes: An estimate of the number of bytes processed.
  1534  	ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"`
  1535  	// ProgressEntities: An estimate of the number of entities processed.
  1536  	ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"`
  1537  	// ForceSendFields is a list of field names (e.g. "Common") to unconditionally
  1538  	// include in API requests. By default, fields with empty or default values are
  1539  	// omitted from API requests. See
  1540  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1541  	// details.
  1542  	ForceSendFields []string `json:"-"`
  1543  	// NullFields is a list of field names (e.g. "Common") to include in API
  1544  	// requests with the JSON null value. By default, fields with empty values are
  1545  	// omitted from API requests. See
  1546  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1547  	NullFields []string `json:"-"`
  1548  }
  1549  
  1550  func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) {
  1551  	type NoMethod GoogleDatastoreAdminV1beta1ExportEntitiesMetadata
  1552  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1553  }
  1554  
  1555  // GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response for
  1556  // google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.
  1557  type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct {
  1558  	// OutputUrl: Location of the output metadata file. This can be used to begin
  1559  	// an import into Cloud Datastore (this project or another project). See
  1560  	// google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. Only present
  1561  	// if the operation completed successfully.
  1562  	OutputUrl string `json:"outputUrl,omitempty"`
  1563  	// ForceSendFields is a list of field names (e.g. "OutputUrl") to
  1564  	// unconditionally include in API requests. By default, fields with empty or
  1565  	// default values are omitted from API requests. See
  1566  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1567  	// details.
  1568  	ForceSendFields []string `json:"-"`
  1569  	// NullFields is a list of field names (e.g. "OutputUrl") to include in API
  1570  	// requests with the JSON null value. By default, fields with empty values are
  1571  	// omitted from API requests. See
  1572  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1573  	NullFields []string `json:"-"`
  1574  }
  1575  
  1576  func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error) {
  1577  	type NoMethod GoogleDatastoreAdminV1beta1ExportEntitiesResponse
  1578  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1579  }
  1580  
  1581  // GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for
  1582  // ImportEntities operations.
  1583  type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct {
  1584  	// Common: Metadata common to all Datastore Admin operations.
  1585  	Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"`
  1586  	// EntityFilter: Description of which entities are being imported.
  1587  	EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"`
  1588  	// InputUrl: The location of the import metadata file. This will be the same
  1589  	// value as the
  1590  	// google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field.
  1591  	InputUrl string `json:"inputUrl,omitempty"`
  1592  	// ProgressBytes: An estimate of the number of bytes processed.
  1593  	ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"`
  1594  	// ProgressEntities: An estimate of the number of entities processed.
  1595  	ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"`
  1596  	// ForceSendFields is a list of field names (e.g. "Common") to unconditionally
  1597  	// include in API requests. By default, fields with empty or default values are
  1598  	// omitted from API requests. See
  1599  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1600  	// details.
  1601  	ForceSendFields []string `json:"-"`
  1602  	// NullFields is a list of field names (e.g. "Common") to include in API
  1603  	// requests with the JSON null value. By default, fields with empty values are
  1604  	// omitted from API requests. See
  1605  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1606  	NullFields []string `json:"-"`
  1607  }
  1608  
  1609  func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) {
  1610  	type NoMethod GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
  1611  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1612  }
  1613  
  1614  // GoogleDatastoreAdminV1beta1Progress: Measures the progress of a particular
  1615  // metric.
  1616  type GoogleDatastoreAdminV1beta1Progress struct {
  1617  	// WorkCompleted: The amount of work that has been completed. Note that this
  1618  	// may be greater than work_estimated.
  1619  	WorkCompleted int64 `json:"workCompleted,omitempty,string"`
  1620  	// WorkEstimated: An estimate of how much work needs to be performed. May be
  1621  	// zero if the work estimate is unavailable.
  1622  	WorkEstimated int64 `json:"workEstimated,omitempty,string"`
  1623  	// ForceSendFields is a list of field names (e.g. "WorkCompleted") to
  1624  	// unconditionally include in API requests. By default, fields with empty or
  1625  	// default values are omitted from API requests. See
  1626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1627  	// details.
  1628  	ForceSendFields []string `json:"-"`
  1629  	// NullFields is a list of field names (e.g. "WorkCompleted") to include in API
  1630  	// requests with the JSON null value. By default, fields with empty values are
  1631  	// omitted from API requests. See
  1632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1633  	NullFields []string `json:"-"`
  1634  }
  1635  
  1636  func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error) {
  1637  	type NoMethod GoogleDatastoreAdminV1beta1Progress
  1638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1639  }
  1640  
  1641  // GoogleLongrunningListOperationsResponse: The response message for
  1642  // Operations.ListOperations.
  1643  type GoogleLongrunningListOperationsResponse struct {
  1644  	// NextPageToken: The standard List next-page token.
  1645  	NextPageToken string `json:"nextPageToken,omitempty"`
  1646  	// Operations: A list of operations that matches the specified filter in the
  1647  	// request.
  1648  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  1649  
  1650  	// ServerResponse contains the HTTP response code and headers from the server.
  1651  	googleapi.ServerResponse `json:"-"`
  1652  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1653  	// unconditionally include in API requests. By default, fields with empty or
  1654  	// default values are omitted from API requests. See
  1655  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1656  	// details.
  1657  	ForceSendFields []string `json:"-"`
  1658  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1659  	// requests with the JSON null value. By default, fields with empty values are
  1660  	// omitted from API requests. See
  1661  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1662  	NullFields []string `json:"-"`
  1663  }
  1664  
  1665  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  1666  	type NoMethod GoogleLongrunningListOperationsResponse
  1667  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1668  }
  1669  
  1670  // GoogleLongrunningOperation: This resource represents a long-running
  1671  // operation that is the result of a network API call.
  1672  type GoogleLongrunningOperation struct {
  1673  	// Done: If the value is `false`, it means the operation is still in progress.
  1674  	// If `true`, the operation is completed, and either `error` or `response` is
  1675  	// available.
  1676  	Done bool `json:"done,omitempty"`
  1677  	// Error: The error result of the operation in case of failure or cancellation.
  1678  	Error *Status `json:"error,omitempty"`
  1679  	// Metadata: Service-specific metadata associated with the operation. It
  1680  	// typically contains progress information and common metadata such as create
  1681  	// time. Some services might not provide such metadata. Any method that returns
  1682  	// a long-running operation should document the metadata type, if any.
  1683  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1684  	// Name: The server-assigned name, which is only unique within the same service
  1685  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1686  	// should be a resource name ending with `operations/{unique_id}`.
  1687  	Name string `json:"name,omitempty"`
  1688  	// Response: The normal, successful response of the operation. If the original
  1689  	// method returns no data on success, such as `Delete`, the response is
  1690  	// `google.protobuf.Empty`. If the original method is standard
  1691  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1692  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1693  	// original method name. For example, if the original method name is
  1694  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1695  	Response googleapi.RawMessage `json:"response,omitempty"`
  1696  
  1697  	// ServerResponse contains the HTTP response code and headers from the server.
  1698  	googleapi.ServerResponse `json:"-"`
  1699  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1700  	// include in API requests. By default, fields with empty or default values are
  1701  	// omitted from API requests. See
  1702  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1703  	// details.
  1704  	ForceSendFields []string `json:"-"`
  1705  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1706  	// with the JSON null value. By default, fields with empty values are omitted
  1707  	// from API requests. See
  1708  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1709  	NullFields []string `json:"-"`
  1710  }
  1711  
  1712  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  1713  	type NoMethod GoogleLongrunningOperation
  1714  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1715  }
  1716  
  1717  // GqlQuery: A GQL query
  1718  // (https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
  1719  type GqlQuery struct {
  1720  	// AllowLiterals: When false, the query string must not contain any literals
  1721  	// and instead must bind all values. For example, `SELECT * FROM Kind WHERE a =
  1722  	// 'string literal'` is not allowed, while `SELECT * FROM Kind WHERE a =
  1723  	// @value` is.
  1724  	AllowLiterals bool `json:"allowLiterals,omitempty"`
  1725  	// NamedBindings: For each non-reserved named binding site in the query string,
  1726  	// there must be a named parameter with that name, but not necessarily the
  1727  	// inverse. Key must match regex `A-Za-z_$*`, must not match regex `__.*__`,
  1728  	// and must not be "".
  1729  	NamedBindings map[string]GqlQueryParameter `json:"namedBindings,omitempty"`
  1730  	// PositionalBindings: Numbered binding site @1 references the first numbered
  1731  	// parameter, effectively using 1-based indexing, rather than the usual 0. For
  1732  	// each binding site numbered i in `query_string`, there must be an i-th
  1733  	// numbered parameter. The inverse must also be true.
  1734  	PositionalBindings []*GqlQueryParameter `json:"positionalBindings,omitempty"`
  1735  	// QueryString: A string of the format described here
  1736  	// (https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
  1737  	QueryString string `json:"queryString,omitempty"`
  1738  	// ForceSendFields is a list of field names (e.g. "AllowLiterals") to
  1739  	// unconditionally include in API requests. By default, fields with empty or
  1740  	// default values are omitted from API requests. See
  1741  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1742  	// details.
  1743  	ForceSendFields []string `json:"-"`
  1744  	// NullFields is a list of field names (e.g. "AllowLiterals") to include in API
  1745  	// requests with the JSON null value. By default, fields with empty values are
  1746  	// omitted from API requests. See
  1747  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1748  	NullFields []string `json:"-"`
  1749  }
  1750  
  1751  func (s *GqlQuery) MarshalJSON() ([]byte, error) {
  1752  	type NoMethod GqlQuery
  1753  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1754  }
  1755  
  1756  // GqlQueryParameter: A binding parameter for a GQL query.
  1757  type GqlQueryParameter struct {
  1758  	// Cursor: A query cursor. Query cursors are returned in query result batches.
  1759  	Cursor string `json:"cursor,omitempty"`
  1760  	// Value: A value parameter.
  1761  	Value *Value `json:"value,omitempty"`
  1762  	// ForceSendFields is a list of field names (e.g. "Cursor") to unconditionally
  1763  	// include in API requests. By default, fields with empty or default values are
  1764  	// omitted from API requests. See
  1765  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1766  	// details.
  1767  	ForceSendFields []string `json:"-"`
  1768  	// NullFields is a list of field names (e.g. "Cursor") to include in API
  1769  	// requests with the JSON null value. By default, fields with empty values are
  1770  	// omitted from API requests. See
  1771  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1772  	NullFields []string `json:"-"`
  1773  }
  1774  
  1775  func (s *GqlQueryParameter) MarshalJSON() ([]byte, error) {
  1776  	type NoMethod GqlQueryParameter
  1777  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1778  }
  1779  
  1780  // Key: A unique identifier for an entity. If a key's partition ID or any of
  1781  // its path kinds or names are reserved/read-only, the key is
  1782  // reserved/read-only. A reserved/read-only key is forbidden in certain
  1783  // documented contexts.
  1784  type Key struct {
  1785  	// PartitionId: Entities are partitioned into subsets, currently identified by
  1786  	// a project ID and namespace ID. Queries are scoped to a single partition.
  1787  	PartitionId *PartitionId `json:"partitionId,omitempty"`
  1788  	// Path: The entity path. An entity path consists of one or more elements
  1789  	// composed of a kind and a string or numerical identifier, which identify
  1790  	// entities. The first element identifies a _root entity_, the second element
  1791  	// identifies a _child_ of the root entity, the third element identifies a
  1792  	// child of the second entity, and so forth. The entities identified by all
  1793  	// prefixes of the path are called the element's _ancestors_. An entity path is
  1794  	// always fully complete: *all* of the entity's ancestors are required to be in
  1795  	// the path along with the entity identifier itself. The only exception is that
  1796  	// in some documented cases, the identifier in the last path element (for the
  1797  	// entity) itself may be omitted. For example, the last path element of the key
  1798  	// of `Mutation.insert` may have no identifier. A path can never be empty, and
  1799  	// a path can have at most 100 elements.
  1800  	Path []*PathElement `json:"path,omitempty"`
  1801  	// ForceSendFields is a list of field names (e.g. "PartitionId") to
  1802  	// unconditionally include in API requests. By default, fields with empty or
  1803  	// default values are omitted from API requests. See
  1804  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1805  	// details.
  1806  	ForceSendFields []string `json:"-"`
  1807  	// NullFields is a list of field names (e.g. "PartitionId") to include in API
  1808  	// requests with the JSON null value. By default, fields with empty values are
  1809  	// omitted from API requests. See
  1810  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1811  	NullFields []string `json:"-"`
  1812  }
  1813  
  1814  func (s *Key) MarshalJSON() ([]byte, error) {
  1815  	type NoMethod Key
  1816  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1817  }
  1818  
  1819  // KindExpression: A representation of a kind.
  1820  type KindExpression struct {
  1821  	// Name: The name of the kind.
  1822  	Name string `json:"name,omitempty"`
  1823  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1824  	// include in API requests. By default, fields with empty or default values are
  1825  	// omitted from API requests. See
  1826  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1827  	// details.
  1828  	ForceSendFields []string `json:"-"`
  1829  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1830  	// with the JSON null value. By default, fields with empty values are omitted
  1831  	// from API requests. See
  1832  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1833  	NullFields []string `json:"-"`
  1834  }
  1835  
  1836  func (s *KindExpression) MarshalJSON() ([]byte, error) {
  1837  	type NoMethod KindExpression
  1838  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1839  }
  1840  
  1841  // LatLng: An object that represents a latitude/longitude pair. This is
  1842  // expressed as a pair of doubles to represent degrees latitude and degrees
  1843  // longitude. Unless specified otherwise, this object must conform to the WGS84
  1844  // standard. Values must be within normalized ranges.
  1845  type LatLng struct {
  1846  	// Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0].
  1847  	Latitude float64 `json:"latitude,omitempty"`
  1848  	// Longitude: The longitude in degrees. It must be in the range [-180.0,
  1849  	// +180.0].
  1850  	Longitude float64 `json:"longitude,omitempty"`
  1851  	// ForceSendFields is a list of field names (e.g. "Latitude") to
  1852  	// unconditionally include in API requests. By default, fields with empty or
  1853  	// default values are omitted from API requests. See
  1854  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1855  	// details.
  1856  	ForceSendFields []string `json:"-"`
  1857  	// NullFields is a list of field names (e.g. "Latitude") to include in API
  1858  	// requests with the JSON null value. By default, fields with empty values are
  1859  	// omitted from API requests. See
  1860  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1861  	NullFields []string `json:"-"`
  1862  }
  1863  
  1864  func (s *LatLng) MarshalJSON() ([]byte, error) {
  1865  	type NoMethod LatLng
  1866  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1867  }
  1868  
  1869  func (s *LatLng) UnmarshalJSON(data []byte) error {
  1870  	type NoMethod LatLng
  1871  	var s1 struct {
  1872  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
  1873  		Longitude gensupport.JSONFloat64 `json:"longitude"`
  1874  		*NoMethod
  1875  	}
  1876  	s1.NoMethod = (*NoMethod)(s)
  1877  	if err := json.Unmarshal(data, &s1); err != nil {
  1878  		return err
  1879  	}
  1880  	s.Latitude = float64(s1.Latitude)
  1881  	s.Longitude = float64(s1.Longitude)
  1882  	return nil
  1883  }
  1884  
  1885  // LookupRequest: The request for Datastore.Lookup.
  1886  type LookupRequest struct {
  1887  	// DatabaseId: The ID of the database against which to make the request.
  1888  	// '(default)' is not allowed; please use empty string '' to refer the default
  1889  	// database.
  1890  	DatabaseId string `json:"databaseId,omitempty"`
  1891  	// Keys: Required. Keys of entities to look up.
  1892  	Keys []*Key `json:"keys,omitempty"`
  1893  	// PropertyMask: The properties to return. Defaults to returning all
  1894  	// properties. If this field is set and an entity has a property not referenced
  1895  	// in the mask, it will be absent from LookupResponse.found.entity.properties.
  1896  	// The entity's key is always returned.
  1897  	PropertyMask *PropertyMask `json:"propertyMask,omitempty"`
  1898  	// ReadOptions: The options for this lookup request.
  1899  	ReadOptions *ReadOptions `json:"readOptions,omitempty"`
  1900  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
  1901  	// unconditionally include in API requests. By default, fields with empty or
  1902  	// default values are omitted from API requests. See
  1903  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1904  	// details.
  1905  	ForceSendFields []string `json:"-"`
  1906  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
  1907  	// requests with the JSON null value. By default, fields with empty values are
  1908  	// omitted from API requests. See
  1909  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1910  	NullFields []string `json:"-"`
  1911  }
  1912  
  1913  func (s *LookupRequest) MarshalJSON() ([]byte, error) {
  1914  	type NoMethod LookupRequest
  1915  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1916  }
  1917  
  1918  // LookupResponse: The response for Datastore.Lookup.
  1919  type LookupResponse struct {
  1920  	// Deferred: A list of keys that were not looked up due to resource
  1921  	// constraints. The order of results in this field is undefined and has no
  1922  	// relation to the order of the keys in the input.
  1923  	Deferred []*Key `json:"deferred,omitempty"`
  1924  	// Found: Entities found as `ResultType.FULL` entities. The order of results in
  1925  	// this field is undefined and has no relation to the order of the keys in the
  1926  	// input.
  1927  	Found []*EntityResult `json:"found,omitempty"`
  1928  	// Missing: Entities not found as `ResultType.KEY_ONLY` entities. The order of
  1929  	// results in this field is undefined and has no relation to the order of the
  1930  	// keys in the input.
  1931  	Missing []*EntityResult `json:"missing,omitempty"`
  1932  	// ReadTime: The time at which these entities were read or found missing.
  1933  	ReadTime string `json:"readTime,omitempty"`
  1934  	// Transaction: The identifier of the transaction that was started as part of
  1935  	// this Lookup request. Set only when ReadOptions.new_transaction was set in
  1936  	// LookupRequest.read_options.
  1937  	Transaction string `json:"transaction,omitempty"`
  1938  
  1939  	// ServerResponse contains the HTTP response code and headers from the server.
  1940  	googleapi.ServerResponse `json:"-"`
  1941  	// ForceSendFields is a list of field names (e.g. "Deferred") to
  1942  	// unconditionally include in API requests. By default, fields with empty or
  1943  	// default values are omitted from API requests. See
  1944  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1945  	// details.
  1946  	ForceSendFields []string `json:"-"`
  1947  	// NullFields is a list of field names (e.g. "Deferred") to include in API
  1948  	// requests with the JSON null value. By default, fields with empty values are
  1949  	// omitted from API requests. See
  1950  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1951  	NullFields []string `json:"-"`
  1952  }
  1953  
  1954  func (s *LookupResponse) MarshalJSON() ([]byte, error) {
  1955  	type NoMethod LookupResponse
  1956  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1957  }
  1958  
  1959  // Mutation: A mutation to apply to an entity.
  1960  type Mutation struct {
  1961  	// BaseVersion: The version of the entity that this mutation is being applied
  1962  	// to. If this does not match the current version on the server, the mutation
  1963  	// conflicts.
  1964  	BaseVersion int64 `json:"baseVersion,omitempty,string"`
  1965  	// Delete: The key of the entity to delete. The entity may or may not already
  1966  	// exist. Must have a complete key path and must not be reserved/read-only.
  1967  	Delete *Key `json:"delete,omitempty"`
  1968  	// Insert: The entity to insert. The entity must not already exist. The entity
  1969  	// key's final path element may be incomplete.
  1970  	Insert *Entity `json:"insert,omitempty"`
  1971  	// PropertyMask: The properties to write in this mutation. None of the
  1972  	// properties in the mask may have a reserved name, except for `__key__`. This
  1973  	// field is ignored for `delete`. If the entity already exists, only properties
  1974  	// referenced in the mask are updated, others are left untouched. Properties
  1975  	// referenced in the mask but not in the entity are deleted.
  1976  	PropertyMask *PropertyMask `json:"propertyMask,omitempty"`
  1977  	// Update: The entity to update. The entity must already exist. Must have a
  1978  	// complete key path.
  1979  	Update *Entity `json:"update,omitempty"`
  1980  	// UpdateTime: The update time of the entity that this mutation is being
  1981  	// applied to. If this does not match the current update time on the server,
  1982  	// the mutation conflicts.
  1983  	UpdateTime string `json:"updateTime,omitempty"`
  1984  	// Upsert: The entity to upsert. The entity may or may not already exist. The
  1985  	// entity key's final path element may be incomplete.
  1986  	Upsert *Entity `json:"upsert,omitempty"`
  1987  	// ForceSendFields is a list of field names (e.g. "BaseVersion") to
  1988  	// unconditionally include in API requests. By default, fields with empty or
  1989  	// default values are omitted from API requests. See
  1990  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1991  	// details.
  1992  	ForceSendFields []string `json:"-"`
  1993  	// NullFields is a list of field names (e.g. "BaseVersion") to include in API
  1994  	// requests with the JSON null value. By default, fields with empty values are
  1995  	// omitted from API requests. See
  1996  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1997  	NullFields []string `json:"-"`
  1998  }
  1999  
  2000  func (s *Mutation) MarshalJSON() ([]byte, error) {
  2001  	type NoMethod Mutation
  2002  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2003  }
  2004  
  2005  // MutationResult: The result of applying a mutation.
  2006  type MutationResult struct {
  2007  	// ConflictDetected: Whether a conflict was detected for this mutation. Always
  2008  	// false when a conflict detection strategy field is not set in the mutation.
  2009  	ConflictDetected bool `json:"conflictDetected,omitempty"`
  2010  	// CreateTime: The create time of the entity. This field will not be set after
  2011  	// a 'delete'.
  2012  	CreateTime string `json:"createTime,omitempty"`
  2013  	// Key: The automatically allocated key. Set only when the mutation allocated a
  2014  	// key.
  2015  	Key *Key `json:"key,omitempty"`
  2016  	// UpdateTime: The update time of the entity on the server after processing the
  2017  	// mutation. If the mutation doesn't change anything on the server, then the
  2018  	// timestamp will be the update timestamp of the current entity. This field
  2019  	// will not be set after a 'delete'.
  2020  	UpdateTime string `json:"updateTime,omitempty"`
  2021  	// Version: The version of the entity on the server after processing the
  2022  	// mutation. If the mutation doesn't change anything on the server, then the
  2023  	// version will be the version of the current entity or, if no entity is
  2024  	// present, a version that is strictly greater than the version of any previous
  2025  	// entity and less than the version of any possible future entity.
  2026  	Version int64 `json:"version,omitempty,string"`
  2027  	// ForceSendFields is a list of field names (e.g. "ConflictDetected") to
  2028  	// unconditionally include in API requests. By default, fields with empty or
  2029  	// default values are omitted from API requests. See
  2030  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2031  	// details.
  2032  	ForceSendFields []string `json:"-"`
  2033  	// NullFields is a list of field names (e.g. "ConflictDetected") to include in
  2034  	// API requests with the JSON null value. By default, fields with empty values
  2035  	// are omitted from API requests. See
  2036  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2037  	NullFields []string `json:"-"`
  2038  }
  2039  
  2040  func (s *MutationResult) MarshalJSON() ([]byte, error) {
  2041  	type NoMethod MutationResult
  2042  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2043  }
  2044  
  2045  // PartitionId: A partition ID identifies a grouping of entities. The grouping
  2046  // is always by project and namespace, however the namespace ID may be empty. A
  2047  // partition ID contains several dimensions: project ID and namespace ID.
  2048  // Partition dimensions: - May be "". - Must be valid UTF-8 bytes. - Must
  2049  // have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any
  2050  // dimension matches regex `__.*__`, the partition is reserved/read-only. A
  2051  // reserved/read-only partition ID is forbidden in certain documented contexts.
  2052  // Foreign partition IDs (in which the project ID does not match the context
  2053  // project ID ) are discouraged. Reads and writes of foreign partition IDs may
  2054  // fail if the project is not in an active state.
  2055  type PartitionId struct {
  2056  	// DatabaseId: If not empty, the ID of the database to which the entities
  2057  	// belong.
  2058  	DatabaseId string `json:"databaseId,omitempty"`
  2059  	// NamespaceId: If not empty, the ID of the namespace to which the entities
  2060  	// belong.
  2061  	NamespaceId string `json:"namespaceId,omitempty"`
  2062  	// ProjectId: The ID of the project to which the entities belong.
  2063  	ProjectId string `json:"projectId,omitempty"`
  2064  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
  2065  	// unconditionally include in API requests. By default, fields with empty or
  2066  	// default values are omitted from API requests. See
  2067  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2068  	// details.
  2069  	ForceSendFields []string `json:"-"`
  2070  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
  2071  	// requests with the JSON null value. By default, fields with empty values are
  2072  	// omitted from API requests. See
  2073  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2074  	NullFields []string `json:"-"`
  2075  }
  2076  
  2077  func (s *PartitionId) MarshalJSON() ([]byte, error) {
  2078  	type NoMethod PartitionId
  2079  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2080  }
  2081  
  2082  // PathElement: A (kind, ID/name) pair used to construct a key path. If either
  2083  // name or ID is set, the element is complete. If neither is set, the element
  2084  // is incomplete.
  2085  type PathElement struct {
  2086  	// Id: The auto-allocated ID of the entity. Never equal to zero. Values less
  2087  	// than zero are discouraged and may not be supported in the future.
  2088  	Id int64 `json:"id,omitempty,string"`
  2089  	// Kind: The kind of the entity. A kind matching regex `__.*__` is
  2090  	// reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8
  2091  	// encoded. Cannot be "". Must be valid UTF-8 bytes. Legacy values that are
  2092  	// not valid UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding
  2093  	// of the bytes.
  2094  	Kind string `json:"kind,omitempty"`
  2095  	// Name: The name of the entity. A name matching regex `__.*__` is
  2096  	// reserved/read-only. A name must not be more than 1500 bytes when UTF-8
  2097  	// encoded. Cannot be "". Must be valid UTF-8 bytes. Legacy values that are
  2098  	// not valid UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding
  2099  	// of the bytes.
  2100  	Name string `json:"name,omitempty"`
  2101  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2102  	// include in API requests. By default, fields with empty or default values are
  2103  	// omitted from API requests. See
  2104  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2105  	// details.
  2106  	ForceSendFields []string `json:"-"`
  2107  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2108  	// with the JSON null value. By default, fields with empty values are omitted
  2109  	// from API requests. See
  2110  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2111  	NullFields []string `json:"-"`
  2112  }
  2113  
  2114  func (s *PathElement) MarshalJSON() ([]byte, error) {
  2115  	type NoMethod PathElement
  2116  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2117  }
  2118  
  2119  // PlanSummary: Planning phase information for the query.
  2120  type PlanSummary struct {
  2121  	// IndexesUsed: The indexes selected for the query. For example: [
  2122  	// {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
  2123  	// {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} ]
  2124  	IndexesUsed []googleapi.RawMessage `json:"indexesUsed,omitempty"`
  2125  	// ForceSendFields is a list of field names (e.g. "IndexesUsed") to
  2126  	// unconditionally include in API requests. By default, fields with empty or
  2127  	// default values are omitted from API requests. See
  2128  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2129  	// details.
  2130  	ForceSendFields []string `json:"-"`
  2131  	// NullFields is a list of field names (e.g. "IndexesUsed") to include in API
  2132  	// requests with the JSON null value. By default, fields with empty values are
  2133  	// omitted from API requests. See
  2134  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2135  	NullFields []string `json:"-"`
  2136  }
  2137  
  2138  func (s *PlanSummary) MarshalJSON() ([]byte, error) {
  2139  	type NoMethod PlanSummary
  2140  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2141  }
  2142  
  2143  // Projection: A representation of a property in a projection.
  2144  type Projection struct {
  2145  	// Property: The property to project.
  2146  	Property *PropertyReference `json:"property,omitempty"`
  2147  	// ForceSendFields is a list of field names (e.g. "Property") to
  2148  	// unconditionally include in API requests. By default, fields with empty or
  2149  	// default values are omitted from API requests. See
  2150  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2151  	// details.
  2152  	ForceSendFields []string `json:"-"`
  2153  	// NullFields is a list of field names (e.g. "Property") to include in API
  2154  	// requests with the JSON null value. By default, fields with empty values are
  2155  	// omitted from API requests. See
  2156  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2157  	NullFields []string `json:"-"`
  2158  }
  2159  
  2160  func (s *Projection) MarshalJSON() ([]byte, error) {
  2161  	type NoMethod Projection
  2162  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2163  }
  2164  
  2165  // PropertyFilter: A filter on a specific property.
  2166  type PropertyFilter struct {
  2167  	// Op: The operator to filter by.
  2168  	//
  2169  	// Possible values:
  2170  	//   "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
  2171  	//   "LESS_THAN" - The given `property` is less than the given `value`.
  2172  	// Requires: * That `property` comes first in `order_by`.
  2173  	//   "LESS_THAN_OR_EQUAL" - The given `property` is less than or equal to the
  2174  	// given `value`. Requires: * That `property` comes first in `order_by`.
  2175  	//   "GREATER_THAN" - The given `property` is greater than the given `value`.
  2176  	// Requires: * That `property` comes first in `order_by`.
  2177  	//   "GREATER_THAN_OR_EQUAL" - The given `property` is greater than or equal to
  2178  	// the given `value`. Requires: * That `property` comes first in `order_by`.
  2179  	//   "EQUAL" - The given `property` is equal to the given `value`.
  2180  	//   "IN" - The given `property` is equal to at least one value in the given
  2181  	// array. Requires: * That `value` is a non-empty `ArrayValue`, subject to
  2182  	// disjunction limits. * No `NOT_IN` is in the same query.
  2183  	//   "NOT_EQUAL" - The given `property` is not equal to the given `value`.
  2184  	// Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That
  2185  	// `property` comes first in the `order_by`.
  2186  	//   "HAS_ANCESTOR" - Limit the result set to the given entity and its
  2187  	// descendants. Requires: * That `value` is an entity key. * All evaluated
  2188  	// disjunctions must have the same `HAS_ANCESTOR` filter.
  2189  	//   "NOT_IN" - The value of the `property` is not in the given array.
  2190  	// Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values.
  2191  	// * No other `OR`, `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That
  2192  	// `field` comes first in the `order_by`.
  2193  	Op string `json:"op,omitempty"`
  2194  	// Property: The property to filter by.
  2195  	Property *PropertyReference `json:"property,omitempty"`
  2196  	// Value: The value to compare the property to.
  2197  	Value *Value `json:"value,omitempty"`
  2198  	// ForceSendFields is a list of field names (e.g. "Op") to unconditionally
  2199  	// include in API requests. By default, fields with empty or default values are
  2200  	// omitted from API requests. See
  2201  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2202  	// details.
  2203  	ForceSendFields []string `json:"-"`
  2204  	// NullFields is a list of field names (e.g. "Op") to include in API requests
  2205  	// with the JSON null value. By default, fields with empty values are omitted
  2206  	// from API requests. See
  2207  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2208  	NullFields []string `json:"-"`
  2209  }
  2210  
  2211  func (s *PropertyFilter) MarshalJSON() ([]byte, error) {
  2212  	type NoMethod PropertyFilter
  2213  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2214  }
  2215  
  2216  // PropertyMask: The set of arbitrarily nested property paths used to restrict
  2217  // an operation to only a subset of properties in an entity.
  2218  type PropertyMask struct {
  2219  	// Paths: The paths to the properties covered by this mask. A path is a list of
  2220  	// property names separated by dots (`.`), for example `foo.bar` means the
  2221  	// property `bar` inside the entity property `foo` inside the entity associated
  2222  	// with this path. If a property name contains a dot `.` or a backslash `\`,
  2223  	// then that name must be escaped. A path must not be empty, and may not
  2224  	// reference a value inside an array value.
  2225  	Paths []string `json:"paths,omitempty"`
  2226  	// ForceSendFields is a list of field names (e.g. "Paths") to unconditionally
  2227  	// include in API requests. By default, fields with empty or default values are
  2228  	// omitted from API requests. See
  2229  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2230  	// details.
  2231  	ForceSendFields []string `json:"-"`
  2232  	// NullFields is a list of field names (e.g. "Paths") to include in API
  2233  	// requests with the JSON null value. By default, fields with empty values are
  2234  	// omitted from API requests. See
  2235  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2236  	NullFields []string `json:"-"`
  2237  }
  2238  
  2239  func (s *PropertyMask) MarshalJSON() ([]byte, error) {
  2240  	type NoMethod PropertyMask
  2241  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2242  }
  2243  
  2244  // PropertyOrder: The desired order for a specific property.
  2245  type PropertyOrder struct {
  2246  	// Direction: The direction to order by. Defaults to `ASCENDING`.
  2247  	//
  2248  	// Possible values:
  2249  	//   "DIRECTION_UNSPECIFIED" - Unspecified. This value must not be used.
  2250  	//   "ASCENDING" - Ascending.
  2251  	//   "DESCENDING" - Descending.
  2252  	Direction string `json:"direction,omitempty"`
  2253  	// Property: The property to order by.
  2254  	Property *PropertyReference `json:"property,omitempty"`
  2255  	// ForceSendFields is a list of field names (e.g. "Direction") to
  2256  	// unconditionally include in API requests. By default, fields with empty or
  2257  	// default values are omitted from API requests. See
  2258  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2259  	// details.
  2260  	ForceSendFields []string `json:"-"`
  2261  	// NullFields is a list of field names (e.g. "Direction") to include in API
  2262  	// requests with the JSON null value. By default, fields with empty values are
  2263  	// omitted from API requests. See
  2264  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2265  	NullFields []string `json:"-"`
  2266  }
  2267  
  2268  func (s *PropertyOrder) MarshalJSON() ([]byte, error) {
  2269  	type NoMethod PropertyOrder
  2270  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2271  }
  2272  
  2273  // PropertyReference: A reference to a property relative to the kind
  2274  // expressions.
  2275  type PropertyReference struct {
  2276  	// Name: A reference to a property. Requires: * MUST be a dot-delimited (`.`)
  2277  	// string of segments, where each segment conforms to entity property name
  2278  	// limitations.
  2279  	Name string `json:"name,omitempty"`
  2280  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2281  	// include in API requests. By default, fields with empty or default values are
  2282  	// omitted from API requests. See
  2283  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2284  	// details.
  2285  	ForceSendFields []string `json:"-"`
  2286  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2287  	// with the JSON null value. By default, fields with empty values are omitted
  2288  	// from API requests. See
  2289  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2290  	NullFields []string `json:"-"`
  2291  }
  2292  
  2293  func (s *PropertyReference) MarshalJSON() ([]byte, error) {
  2294  	type NoMethod PropertyReference
  2295  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2296  }
  2297  
  2298  // Query: A query for entities.
  2299  type Query struct {
  2300  	// DistinctOn: The properties to make distinct. The query results will contain
  2301  	// the first result for each distinct combination of values for the given
  2302  	// properties (if empty, all results are returned). Requires: * If `order` is
  2303  	// specified, the set of distinct on properties must appear before the
  2304  	// non-distinct on properties in `order`.
  2305  	DistinctOn []*PropertyReference `json:"distinctOn,omitempty"`
  2306  	// EndCursor: An ending point for the query results. Query cursors are returned
  2307  	// in query result batches and can only be used to limit the same query
  2308  	// (https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
  2309  	EndCursor string `json:"endCursor,omitempty"`
  2310  	// Filter: The filter to apply.
  2311  	Filter *Filter `json:"filter,omitempty"`
  2312  	// Kind: The kinds to query (if empty, returns entities of all kinds).
  2313  	// Currently at most 1 kind may be specified.
  2314  	Kind []*KindExpression `json:"kind,omitempty"`
  2315  	// Limit: The maximum number of results to return. Applies after all other
  2316  	// constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0
  2317  	// if specified.
  2318  	Limit int64 `json:"limit,omitempty"`
  2319  	// Offset: The number of results to skip. Applies before limit, but after all
  2320  	// other constraints. Optional. Must be >= 0 if specified.
  2321  	Offset int64 `json:"offset,omitempty"`
  2322  	// Order: The order to apply to the query results (if empty, order is
  2323  	// unspecified).
  2324  	Order []*PropertyOrder `json:"order,omitempty"`
  2325  	// Projection: The projection to return. Defaults to returning all properties.
  2326  	Projection []*Projection `json:"projection,omitempty"`
  2327  	// StartCursor: A starting point for the query results. Query cursors are
  2328  	// returned in query result batches and can only be used to continue the same
  2329  	// query
  2330  	// (https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
  2331  	StartCursor string `json:"startCursor,omitempty"`
  2332  	// ForceSendFields is a list of field names (e.g. "DistinctOn") to
  2333  	// unconditionally include in API requests. By default, fields with empty or
  2334  	// default values are omitted from API requests. See
  2335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2336  	// details.
  2337  	ForceSendFields []string `json:"-"`
  2338  	// NullFields is a list of field names (e.g. "DistinctOn") to include in API
  2339  	// requests with the JSON null value. By default, fields with empty values are
  2340  	// omitted from API requests. See
  2341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2342  	NullFields []string `json:"-"`
  2343  }
  2344  
  2345  func (s *Query) MarshalJSON() ([]byte, error) {
  2346  	type NoMethod Query
  2347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2348  }
  2349  
  2350  // QueryResultBatch: A batch of results produced by a query.
  2351  type QueryResultBatch struct {
  2352  	// EndCursor: A cursor that points to the position after the last result in the
  2353  	// batch.
  2354  	EndCursor string `json:"endCursor,omitempty"`
  2355  	// EntityResultType: The result type for every entity in `entity_results`.
  2356  	//
  2357  	// Possible values:
  2358  	//   "RESULT_TYPE_UNSPECIFIED" - Unspecified. This value is never used.
  2359  	//   "FULL" - The key and properties.
  2360  	//   "PROJECTION" - A projected subset of properties. The entity may have no
  2361  	// key.
  2362  	//   "KEY_ONLY" - Only the key.
  2363  	EntityResultType string `json:"entityResultType,omitempty"`
  2364  	// EntityResults: The results for this batch.
  2365  	EntityResults []*EntityResult `json:"entityResults,omitempty"`
  2366  	// MoreResults: The state of the query after the current batch.
  2367  	//
  2368  	// Possible values:
  2369  	//   "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never used.
  2370  	//   "NOT_FINISHED" - There may be additional batches to fetch from this query.
  2371  	//   "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may be more
  2372  	// results after the limit.
  2373  	//   "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may be more
  2374  	// results after the end cursor.
  2375  	//   "NO_MORE_RESULTS" - The query is finished, and there are no more results.
  2376  	MoreResults string `json:"moreResults,omitempty"`
  2377  	// ReadTime: Read timestamp this batch was returned from. This applies to the
  2378  	// range of results from the query's `start_cursor` (or the beginning of the
  2379  	// query if no cursor was given) to this batch's `end_cursor` (not the query's
  2380  	// `end_cursor`). In a single transaction, subsequent query result batches for
  2381  	// the same query can have a greater timestamp. Each batch's read timestamp is
  2382  	// valid for all preceding batches. This value will not be set for eventually
  2383  	// consistent queries in Cloud Datastore.
  2384  	ReadTime string `json:"readTime,omitempty"`
  2385  	// SkippedCursor: A cursor that points to the position after the last skipped
  2386  	// result. Will be set when `skipped_results` != 0.
  2387  	SkippedCursor string `json:"skippedCursor,omitempty"`
  2388  	// SkippedResults: The number of results skipped, typically because of an
  2389  	// offset.
  2390  	SkippedResults int64 `json:"skippedResults,omitempty"`
  2391  	// SnapshotVersion: The version number of the snapshot this batch was returned
  2392  	// from. This applies to the range of results from the query's `start_cursor`
  2393  	// (or the beginning of the query if no cursor was given) to this batch's
  2394  	// `end_cursor` (not the query's `end_cursor`). In a single transaction,
  2395  	// subsequent query result batches for the same query can have a greater
  2396  	// snapshot version number. Each batch's snapshot version is valid for all
  2397  	// preceding batches. The value will be zero for eventually consistent queries.
  2398  	SnapshotVersion int64 `json:"snapshotVersion,omitempty,string"`
  2399  	// ForceSendFields is a list of field names (e.g. "EndCursor") to
  2400  	// unconditionally include in API requests. By default, fields with empty or
  2401  	// default values are omitted from API requests. See
  2402  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2403  	// details.
  2404  	ForceSendFields []string `json:"-"`
  2405  	// NullFields is a list of field names (e.g. "EndCursor") to include in API
  2406  	// requests with the JSON null value. By default, fields with empty values are
  2407  	// omitted from API requests. See
  2408  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2409  	NullFields []string `json:"-"`
  2410  }
  2411  
  2412  func (s *QueryResultBatch) MarshalJSON() ([]byte, error) {
  2413  	type NoMethod QueryResultBatch
  2414  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2415  }
  2416  
  2417  // ReadOnly: Options specific to read-only transactions.
  2418  type ReadOnly struct {
  2419  	// ReadTime: Reads entities at the given time. This must be a microsecond
  2420  	// precision timestamp within the past one hour, or if Point-in-Time Recovery
  2421  	// is enabled, can additionally be a whole minute timestamp within the past 7
  2422  	// days.
  2423  	ReadTime string `json:"readTime,omitempty"`
  2424  	// ForceSendFields is a list of field names (e.g. "ReadTime") to
  2425  	// unconditionally include in API requests. By default, fields with empty or
  2426  	// default values are omitted from API requests. See
  2427  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2428  	// details.
  2429  	ForceSendFields []string `json:"-"`
  2430  	// NullFields is a list of field names (e.g. "ReadTime") to include in API
  2431  	// requests with the JSON null value. By default, fields with empty values are
  2432  	// omitted from API requests. See
  2433  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2434  	NullFields []string `json:"-"`
  2435  }
  2436  
  2437  func (s *ReadOnly) MarshalJSON() ([]byte, error) {
  2438  	type NoMethod ReadOnly
  2439  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2440  }
  2441  
  2442  // ReadOptions: The options shared by read requests.
  2443  type ReadOptions struct {
  2444  	// NewTransaction: Options for beginning a new transaction for this request.
  2445  	// The new transaction identifier will be returned in the corresponding
  2446  	// response as either LookupResponse.transaction or
  2447  	// RunQueryResponse.transaction.
  2448  	NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
  2449  	// ReadConsistency: The non-transactional read consistency to use.
  2450  	//
  2451  	// Possible values:
  2452  	//   "READ_CONSISTENCY_UNSPECIFIED" - Unspecified. This value must not be used.
  2453  	//   "STRONG" - Strong consistency.
  2454  	//   "EVENTUAL" - Eventual consistency.
  2455  	ReadConsistency string `json:"readConsistency,omitempty"`
  2456  	// ReadTime: Reads entities as they were at the given time. This value is only
  2457  	// supported for Cloud Firestore in Datastore mode. This must be a microsecond
  2458  	// precision timestamp within the past one hour, or if Point-in-Time Recovery
  2459  	// is enabled, can additionally be a whole minute timestamp within the past 7
  2460  	// days.
  2461  	ReadTime string `json:"readTime,omitempty"`
  2462  	// Transaction: The identifier of the transaction in which to read. A
  2463  	// transaction identifier is returned by a call to Datastore.BeginTransaction.
  2464  	Transaction string `json:"transaction,omitempty"`
  2465  	// ForceSendFields is a list of field names (e.g. "NewTransaction") to
  2466  	// unconditionally include in API requests. By default, fields with empty or
  2467  	// default values are omitted from API requests. See
  2468  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2469  	// details.
  2470  	ForceSendFields []string `json:"-"`
  2471  	// NullFields is a list of field names (e.g. "NewTransaction") to include in
  2472  	// API requests with the JSON null value. By default, fields with empty values
  2473  	// are omitted from API requests. See
  2474  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2475  	NullFields []string `json:"-"`
  2476  }
  2477  
  2478  func (s *ReadOptions) MarshalJSON() ([]byte, error) {
  2479  	type NoMethod ReadOptions
  2480  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2481  }
  2482  
  2483  // ReadWrite: Options specific to read / write transactions.
  2484  type ReadWrite struct {
  2485  	// PreviousTransaction: The transaction identifier of the transaction being
  2486  	// retried.
  2487  	PreviousTransaction string `json:"previousTransaction,omitempty"`
  2488  	// ForceSendFields is a list of field names (e.g. "PreviousTransaction") to
  2489  	// unconditionally include in API requests. By default, fields with empty or
  2490  	// default values are omitted from API requests. See
  2491  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2492  	// details.
  2493  	ForceSendFields []string `json:"-"`
  2494  	// NullFields is a list of field names (e.g. "PreviousTransaction") to include
  2495  	// in API requests with the JSON null value. By default, fields with empty
  2496  	// values are omitted from API requests. See
  2497  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2498  	NullFields []string `json:"-"`
  2499  }
  2500  
  2501  func (s *ReadWrite) MarshalJSON() ([]byte, error) {
  2502  	type NoMethod ReadWrite
  2503  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2504  }
  2505  
  2506  // ReserveIdsRequest: The request for Datastore.ReserveIds.
  2507  type ReserveIdsRequest struct {
  2508  	// DatabaseId: The ID of the database against which to make the request.
  2509  	// '(default)' is not allowed; please use empty string '' to refer the default
  2510  	// database.
  2511  	DatabaseId string `json:"databaseId,omitempty"`
  2512  	// Keys: Required. A list of keys with complete key paths whose numeric IDs
  2513  	// should not be auto-allocated.
  2514  	Keys []*Key `json:"keys,omitempty"`
  2515  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
  2516  	// unconditionally include in API requests. By default, fields with empty or
  2517  	// default values are omitted from API requests. See
  2518  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2519  	// details.
  2520  	ForceSendFields []string `json:"-"`
  2521  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
  2522  	// requests with the JSON null value. By default, fields with empty values are
  2523  	// omitted from API requests. See
  2524  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2525  	NullFields []string `json:"-"`
  2526  }
  2527  
  2528  func (s *ReserveIdsRequest) MarshalJSON() ([]byte, error) {
  2529  	type NoMethod ReserveIdsRequest
  2530  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2531  }
  2532  
  2533  // ReserveIdsResponse: The response for Datastore.ReserveIds.
  2534  type ReserveIdsResponse struct {
  2535  	// ServerResponse contains the HTTP response code and headers from the server.
  2536  	googleapi.ServerResponse `json:"-"`
  2537  }
  2538  
  2539  // RollbackRequest: The request for Datastore.Rollback.
  2540  type RollbackRequest struct {
  2541  	// DatabaseId: The ID of the database against which to make the request.
  2542  	// '(default)' is not allowed; please use empty string '' to refer the default
  2543  	// database.
  2544  	DatabaseId string `json:"databaseId,omitempty"`
  2545  	// Transaction: Required. The transaction identifier, returned by a call to
  2546  	// Datastore.BeginTransaction.
  2547  	Transaction string `json:"transaction,omitempty"`
  2548  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
  2549  	// unconditionally include in API requests. By default, fields with empty or
  2550  	// default values are omitted from API requests. See
  2551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2552  	// details.
  2553  	ForceSendFields []string `json:"-"`
  2554  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
  2555  	// requests with the JSON null value. By default, fields with empty values are
  2556  	// omitted from API requests. See
  2557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2558  	NullFields []string `json:"-"`
  2559  }
  2560  
  2561  func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
  2562  	type NoMethod RollbackRequest
  2563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2564  }
  2565  
  2566  // RollbackResponse: The response for Datastore.Rollback. (an empty message).
  2567  type RollbackResponse struct {
  2568  	// ServerResponse contains the HTTP response code and headers from the server.
  2569  	googleapi.ServerResponse `json:"-"`
  2570  }
  2571  
  2572  // RunAggregationQueryRequest: The request for Datastore.RunAggregationQuery.
  2573  type RunAggregationQueryRequest struct {
  2574  	// AggregationQuery: The query to run.
  2575  	AggregationQuery *AggregationQuery `json:"aggregationQuery,omitempty"`
  2576  	// DatabaseId: The ID of the database against which to make the request.
  2577  	// '(default)' is not allowed; please use empty string '' to refer the default
  2578  	// database.
  2579  	DatabaseId string `json:"databaseId,omitempty"`
  2580  	// ExplainOptions: Optional. Explain options for the query. If set, additional
  2581  	// query statistics will be returned. If not, only query results will be
  2582  	// returned.
  2583  	ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"`
  2584  	// GqlQuery: The GQL query to run. This query must be an aggregation query.
  2585  	GqlQuery *GqlQuery `json:"gqlQuery,omitempty"`
  2586  	// PartitionId: Entities are partitioned into subsets, identified by a
  2587  	// partition ID. Queries are scoped to a single partition. This partition ID is
  2588  	// normalized with the standard default context partition ID.
  2589  	PartitionId *PartitionId `json:"partitionId,omitempty"`
  2590  	// ReadOptions: The options for this query.
  2591  	ReadOptions *ReadOptions `json:"readOptions,omitempty"`
  2592  	// ForceSendFields is a list of field names (e.g. "AggregationQuery") to
  2593  	// unconditionally include in API requests. By default, fields with empty or
  2594  	// default values are omitted from API requests. See
  2595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2596  	// details.
  2597  	ForceSendFields []string `json:"-"`
  2598  	// NullFields is a list of field names (e.g. "AggregationQuery") to include in
  2599  	// API requests with the JSON null value. By default, fields with empty values
  2600  	// are omitted from API requests. See
  2601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2602  	NullFields []string `json:"-"`
  2603  }
  2604  
  2605  func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) {
  2606  	type NoMethod RunAggregationQueryRequest
  2607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2608  }
  2609  
  2610  // RunAggregationQueryResponse: The response for Datastore.RunAggregationQuery.
  2611  type RunAggregationQueryResponse struct {
  2612  	// Batch: A batch of aggregation results. Always present.
  2613  	Batch *AggregationResultBatch `json:"batch,omitempty"`
  2614  	// ExplainMetrics: Query explain metrics. This is only present when the
  2615  	// RunAggregationQueryRequest.explain_options is provided, and it is sent only
  2616  	// once with the last response in the stream.
  2617  	ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"`
  2618  	// Query: The parsed form of the `GqlQuery` from the request, if it was set.
  2619  	Query *AggregationQuery `json:"query,omitempty"`
  2620  	// Transaction: The identifier of the transaction that was started as part of
  2621  	// this RunAggregationQuery request. Set only when ReadOptions.new_transaction
  2622  	// was set in RunAggregationQueryRequest.read_options.
  2623  	Transaction string `json:"transaction,omitempty"`
  2624  
  2625  	// ServerResponse contains the HTTP response code and headers from the server.
  2626  	googleapi.ServerResponse `json:"-"`
  2627  	// ForceSendFields is a list of field names (e.g. "Batch") to unconditionally
  2628  	// include in API requests. By default, fields with empty or default values are
  2629  	// omitted from API requests. See
  2630  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2631  	// details.
  2632  	ForceSendFields []string `json:"-"`
  2633  	// NullFields is a list of field names (e.g. "Batch") to include in API
  2634  	// requests with the JSON null value. By default, fields with empty values are
  2635  	// omitted from API requests. See
  2636  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2637  	NullFields []string `json:"-"`
  2638  }
  2639  
  2640  func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) {
  2641  	type NoMethod RunAggregationQueryResponse
  2642  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2643  }
  2644  
  2645  // RunQueryRequest: The request for Datastore.RunQuery.
  2646  type RunQueryRequest struct {
  2647  	// DatabaseId: The ID of the database against which to make the request.
  2648  	// '(default)' is not allowed; please use empty string '' to refer the default
  2649  	// database.
  2650  	DatabaseId string `json:"databaseId,omitempty"`
  2651  	// ExplainOptions: Optional. Explain options for the query. If set, additional
  2652  	// query statistics will be returned. If not, only query results will be
  2653  	// returned.
  2654  	ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"`
  2655  	// GqlQuery: The GQL query to run. This query must be a non-aggregation query.
  2656  	GqlQuery *GqlQuery `json:"gqlQuery,omitempty"`
  2657  	// PartitionId: Entities are partitioned into subsets, identified by a
  2658  	// partition ID. Queries are scoped to a single partition. This partition ID is
  2659  	// normalized with the standard default context partition ID.
  2660  	PartitionId *PartitionId `json:"partitionId,omitempty"`
  2661  	// PropertyMask: The properties to return. This field must not be set for a
  2662  	// projection query. See LookupRequest.property_mask.
  2663  	PropertyMask *PropertyMask `json:"propertyMask,omitempty"`
  2664  	// Query: The query to run.
  2665  	Query *Query `json:"query,omitempty"`
  2666  	// ReadOptions: The options for this query.
  2667  	ReadOptions *ReadOptions `json:"readOptions,omitempty"`
  2668  	// ForceSendFields is a list of field names (e.g. "DatabaseId") to
  2669  	// unconditionally include in API requests. By default, fields with empty or
  2670  	// default values are omitted from API requests. See
  2671  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2672  	// details.
  2673  	ForceSendFields []string `json:"-"`
  2674  	// NullFields is a list of field names (e.g. "DatabaseId") to include in API
  2675  	// requests with the JSON null value. By default, fields with empty values are
  2676  	// omitted from API requests. See
  2677  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2678  	NullFields []string `json:"-"`
  2679  }
  2680  
  2681  func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
  2682  	type NoMethod RunQueryRequest
  2683  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2684  }
  2685  
  2686  // RunQueryResponse: The response for Datastore.RunQuery.
  2687  type RunQueryResponse struct {
  2688  	// Batch: A batch of query results (always present).
  2689  	Batch *QueryResultBatch `json:"batch,omitempty"`
  2690  	// ExplainMetrics: Query explain metrics. This is only present when the
  2691  	// RunQueryRequest.explain_options is provided, and it is sent only once with
  2692  	// the last response in the stream.
  2693  	ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"`
  2694  	// Query: The parsed form of the `GqlQuery` from the request, if it was set.
  2695  	Query *Query `json:"query,omitempty"`
  2696  	// Transaction: The identifier of the transaction that was started as part of
  2697  	// this RunQuery request. Set only when ReadOptions.new_transaction was set in
  2698  	// RunQueryRequest.read_options.
  2699  	Transaction string `json:"transaction,omitempty"`
  2700  
  2701  	// ServerResponse contains the HTTP response code and headers from the server.
  2702  	googleapi.ServerResponse `json:"-"`
  2703  	// ForceSendFields is a list of field names (e.g. "Batch") to unconditionally
  2704  	// include in API requests. By default, fields with empty or default values are
  2705  	// omitted from API requests. See
  2706  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2707  	// details.
  2708  	ForceSendFields []string `json:"-"`
  2709  	// NullFields is a list of field names (e.g. "Batch") to include in API
  2710  	// requests with the JSON null value. By default, fields with empty values are
  2711  	// omitted from API requests. See
  2712  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2713  	NullFields []string `json:"-"`
  2714  }
  2715  
  2716  func (s *RunQueryResponse) MarshalJSON() ([]byte, error) {
  2717  	type NoMethod RunQueryResponse
  2718  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2719  }
  2720  
  2721  // Status: The `Status` type defines a logical error model that is suitable for
  2722  // different programming environments, including REST APIs and RPC APIs. It is
  2723  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2724  // pieces of data: error code, error message, and error details. You can find
  2725  // out more about this error model and how to work with it in the API Design
  2726  // Guide (https://cloud.google.com/apis/design/errors).
  2727  type Status struct {
  2728  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2729  	Code int64 `json:"code,omitempty"`
  2730  	// Details: A list of messages that carry the error details. There is a common
  2731  	// set of message types for APIs to use.
  2732  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2733  	// Message: A developer-facing error message, which should be in English. Any
  2734  	// user-facing error message should be localized and sent in the
  2735  	// google.rpc.Status.details field, or localized by the client.
  2736  	Message string `json:"message,omitempty"`
  2737  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2738  	// include in API requests. By default, fields with empty or default values are
  2739  	// omitted from API requests. See
  2740  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2741  	// details.
  2742  	ForceSendFields []string `json:"-"`
  2743  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2744  	// with the JSON null value. By default, fields with empty values are omitted
  2745  	// from API requests. See
  2746  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2747  	NullFields []string `json:"-"`
  2748  }
  2749  
  2750  func (s *Status) MarshalJSON() ([]byte, error) {
  2751  	type NoMethod Status
  2752  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2753  }
  2754  
  2755  // Sum: Sum of the values of the requested property. * Only numeric values will
  2756  // be aggregated. All non-numeric values including `NULL` are skipped. * If the
  2757  // aggregated values contain `NaN`, returns `NaN`. Infinity math follows
  2758  // IEEE-754 standards. * If the aggregated value set is empty, returns 0. *
  2759  // Returns a 64-bit integer if all aggregated numbers are integers and the sum
  2760  // result does not overflow. Otherwise, the result is returned as a double.
  2761  // Note that even if all the aggregated values are integers, the result is
  2762  // returned as a double if it cannot fit within a 64-bit signed integer. When
  2763  // this occurs, the returned value will lose precision. * When underflow
  2764  // occurs, floating-point aggregation is non-deterministic. This means that
  2765  // running the same query repeatedly without any changes to the underlying
  2766  // values could produce slightly different results each time. In those cases,
  2767  // values should be stored as integers over floating-point numbers.
  2768  type Sum struct {
  2769  	// Property: The property to aggregate on.
  2770  	Property *PropertyReference `json:"property,omitempty"`
  2771  	// ForceSendFields is a list of field names (e.g. "Property") to
  2772  	// unconditionally include in API requests. By default, fields with empty or
  2773  	// default values are omitted from API requests. See
  2774  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2775  	// details.
  2776  	ForceSendFields []string `json:"-"`
  2777  	// NullFields is a list of field names (e.g. "Property") to include in API
  2778  	// requests with the JSON null value. By default, fields with empty values are
  2779  	// omitted from API requests. See
  2780  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2781  	NullFields []string `json:"-"`
  2782  }
  2783  
  2784  func (s *Sum) MarshalJSON() ([]byte, error) {
  2785  	type NoMethod Sum
  2786  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2787  }
  2788  
  2789  // TransactionOptions: Options for beginning a new transaction. Transactions
  2790  // can be created explicitly with calls to Datastore.BeginTransaction or
  2791  // implicitly by setting ReadOptions.new_transaction in read requests.
  2792  type TransactionOptions struct {
  2793  	// ReadOnly: The transaction should only allow reads.
  2794  	ReadOnly *ReadOnly `json:"readOnly,omitempty"`
  2795  	// ReadWrite: The transaction should allow both reads and writes.
  2796  	ReadWrite *ReadWrite `json:"readWrite,omitempty"`
  2797  	// ForceSendFields is a list of field names (e.g. "ReadOnly") to
  2798  	// unconditionally include in API requests. By default, fields with empty or
  2799  	// default values are omitted from API requests. See
  2800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2801  	// details.
  2802  	ForceSendFields []string `json:"-"`
  2803  	// NullFields is a list of field names (e.g. "ReadOnly") to include in API
  2804  	// requests with the JSON null value. By default, fields with empty values are
  2805  	// omitted from API requests. See
  2806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2807  	NullFields []string `json:"-"`
  2808  }
  2809  
  2810  func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
  2811  	type NoMethod TransactionOptions
  2812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2813  }
  2814  
  2815  // Value: A message that can hold any of the supported value types and
  2816  // associated metadata.
  2817  type Value struct {
  2818  	// ArrayValue: An array value. Cannot contain another array value. A `Value`
  2819  	// instance that sets field `array_value` must not set fields `meaning` or
  2820  	// `exclude_from_indexes`.
  2821  	ArrayValue *ArrayValue `json:"arrayValue,omitempty"`
  2822  	// BlobValue: A blob value. May have at most 1,000,000 bytes. When
  2823  	// `exclude_from_indexes` is false, may have at most 1500 bytes. In JSON
  2824  	// requests, must be base64-encoded.
  2825  	BlobValue string `json:"blobValue,omitempty"`
  2826  	// BooleanValue: A boolean value.
  2827  	BooleanValue bool `json:"booleanValue,omitempty"`
  2828  	// DoubleValue: A double value.
  2829  	DoubleValue float64 `json:"doubleValue,omitempty"`
  2830  	// EntityValue: An entity value. - May have no key. - May have a key with an
  2831  	// incomplete key path. - May have a reserved/read-only key.
  2832  	EntityValue *Entity `json:"entityValue,omitempty"`
  2833  	// ExcludeFromIndexes: If the value should be excluded from all indexes
  2834  	// including those defined explicitly.
  2835  	ExcludeFromIndexes bool `json:"excludeFromIndexes,omitempty"`
  2836  	// GeoPointValue: A geo point value representing a point on the surface of
  2837  	// Earth.
  2838  	GeoPointValue *LatLng `json:"geoPointValue,omitempty"`
  2839  	// IntegerValue: An integer value.
  2840  	IntegerValue int64 `json:"integerValue,omitempty,string"`
  2841  	// KeyValue: A key value.
  2842  	KeyValue *Key `json:"keyValue,omitempty"`
  2843  	// Meaning: The `meaning` field should only be populated for backwards
  2844  	// compatibility.
  2845  	Meaning int64 `json:"meaning,omitempty"`
  2846  	// NullValue: A null value.
  2847  	//
  2848  	// Possible values:
  2849  	//   "NULL_VALUE" - Null value.
  2850  	NullValue string `json:"nullValue,omitempty"`
  2851  	// StringValue: A UTF-8 encoded string value. When `exclude_from_indexes` is
  2852  	// false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set
  2853  	// to at most 1,000,000 bytes.
  2854  	StringValue string `json:"stringValue,omitempty"`
  2855  	// TimestampValue: A timestamp value. When stored in the Datastore, precise
  2856  	// only to microseconds; any additional precision is rounded down.
  2857  	TimestampValue string `json:"timestampValue,omitempty"`
  2858  	// ForceSendFields is a list of field names (e.g. "ArrayValue") to
  2859  	// unconditionally include in API requests. By default, fields with empty or
  2860  	// default values are omitted from API requests. See
  2861  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2862  	// details.
  2863  	ForceSendFields []string `json:"-"`
  2864  	// NullFields is a list of field names (e.g. "ArrayValue") to include in API
  2865  	// requests with the JSON null value. By default, fields with empty values are
  2866  	// omitted from API requests. See
  2867  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2868  	NullFields []string `json:"-"`
  2869  }
  2870  
  2871  func (s *Value) MarshalJSON() ([]byte, error) {
  2872  	type NoMethod Value
  2873  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2874  }
  2875  
  2876  func (s *Value) UnmarshalJSON(data []byte) error {
  2877  	type NoMethod Value
  2878  	var s1 struct {
  2879  		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
  2880  		*NoMethod
  2881  	}
  2882  	s1.NoMethod = (*NoMethod)(s)
  2883  	if err := json.Unmarshal(data, &s1); err != nil {
  2884  		return err
  2885  	}
  2886  	s.DoubleValue = float64(s1.DoubleValue)
  2887  	return nil
  2888  }
  2889  
  2890  type ProjectsAllocateIdsCall struct {
  2891  	s                  *Service
  2892  	projectId          string
  2893  	allocateidsrequest *AllocateIdsRequest
  2894  	urlParams_         gensupport.URLParams
  2895  	ctx_               context.Context
  2896  	header_            http.Header
  2897  }
  2898  
  2899  // AllocateIds: Allocates IDs for the given keys, which is useful for
  2900  // referencing an entity before it is inserted.
  2901  //
  2902  // - projectId: The ID of the project against which to make the request.
  2903  func (r *ProjectsService) AllocateIds(projectId string, allocateidsrequest *AllocateIdsRequest) *ProjectsAllocateIdsCall {
  2904  	c := &ProjectsAllocateIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2905  	c.projectId = projectId
  2906  	c.allocateidsrequest = allocateidsrequest
  2907  	return c
  2908  }
  2909  
  2910  // Fields allows partial responses to be retrieved. See
  2911  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2912  // details.
  2913  func (c *ProjectsAllocateIdsCall) Fields(s ...googleapi.Field) *ProjectsAllocateIdsCall {
  2914  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2915  	return c
  2916  }
  2917  
  2918  // Context sets the context to be used in this call's Do method.
  2919  func (c *ProjectsAllocateIdsCall) Context(ctx context.Context) *ProjectsAllocateIdsCall {
  2920  	c.ctx_ = ctx
  2921  	return c
  2922  }
  2923  
  2924  // Header returns a http.Header that can be modified by the caller to add
  2925  // headers to the request.
  2926  func (c *ProjectsAllocateIdsCall) Header() http.Header {
  2927  	if c.header_ == nil {
  2928  		c.header_ = make(http.Header)
  2929  	}
  2930  	return c.header_
  2931  }
  2932  
  2933  func (c *ProjectsAllocateIdsCall) doRequest(alt string) (*http.Response, error) {
  2934  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2935  	var body io.Reader = nil
  2936  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocateidsrequest)
  2937  	if err != nil {
  2938  		return nil, err
  2939  	}
  2940  	c.urlParams_.Set("alt", alt)
  2941  	c.urlParams_.Set("prettyPrint", "false")
  2942  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:allocateIds")
  2943  	urls += "?" + c.urlParams_.Encode()
  2944  	req, err := http.NewRequest("POST", urls, body)
  2945  	if err != nil {
  2946  		return nil, err
  2947  	}
  2948  	req.Header = reqHeaders
  2949  	googleapi.Expand(req.URL, map[string]string{
  2950  		"projectId": c.projectId,
  2951  	})
  2952  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2953  }
  2954  
  2955  // Do executes the "datastore.projects.allocateIds" call.
  2956  // Any non-2xx status code is an error. Response headers are in either
  2957  // *AllocateIdsResponse.ServerResponse.Header or (if a response was returned at
  2958  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2959  // check whether the returned error was because http.StatusNotModified was
  2960  // returned.
  2961  func (c *ProjectsAllocateIdsCall) Do(opts ...googleapi.CallOption) (*AllocateIdsResponse, error) {
  2962  	gensupport.SetOptions(c.urlParams_, opts...)
  2963  	res, err := c.doRequest("json")
  2964  	if res != nil && res.StatusCode == http.StatusNotModified {
  2965  		if res.Body != nil {
  2966  			res.Body.Close()
  2967  		}
  2968  		return nil, gensupport.WrapError(&googleapi.Error{
  2969  			Code:   res.StatusCode,
  2970  			Header: res.Header,
  2971  		})
  2972  	}
  2973  	if err != nil {
  2974  		return nil, err
  2975  	}
  2976  	defer googleapi.CloseBody(res)
  2977  	if err := googleapi.CheckResponse(res); err != nil {
  2978  		return nil, gensupport.WrapError(err)
  2979  	}
  2980  	ret := &AllocateIdsResponse{
  2981  		ServerResponse: googleapi.ServerResponse{
  2982  			Header:         res.Header,
  2983  			HTTPStatusCode: res.StatusCode,
  2984  		},
  2985  	}
  2986  	target := &ret
  2987  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2988  		return nil, err
  2989  	}
  2990  	return ret, nil
  2991  }
  2992  
  2993  type ProjectsBeginTransactionCall struct {
  2994  	s                       *Service
  2995  	projectId               string
  2996  	begintransactionrequest *BeginTransactionRequest
  2997  	urlParams_              gensupport.URLParams
  2998  	ctx_                    context.Context
  2999  	header_                 http.Header
  3000  }
  3001  
  3002  // BeginTransaction: Begins a new transaction.
  3003  //
  3004  // - projectId: The ID of the project against which to make the request.
  3005  func (r *ProjectsService) BeginTransaction(projectId string, begintransactionrequest *BeginTransactionRequest) *ProjectsBeginTransactionCall {
  3006  	c := &ProjectsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3007  	c.projectId = projectId
  3008  	c.begintransactionrequest = begintransactionrequest
  3009  	return c
  3010  }
  3011  
  3012  // Fields allows partial responses to be retrieved. See
  3013  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3014  // details.
  3015  func (c *ProjectsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsBeginTransactionCall {
  3016  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3017  	return c
  3018  }
  3019  
  3020  // Context sets the context to be used in this call's Do method.
  3021  func (c *ProjectsBeginTransactionCall) Context(ctx context.Context) *ProjectsBeginTransactionCall {
  3022  	c.ctx_ = ctx
  3023  	return c
  3024  }
  3025  
  3026  // Header returns a http.Header that can be modified by the caller to add
  3027  // headers to the request.
  3028  func (c *ProjectsBeginTransactionCall) Header() http.Header {
  3029  	if c.header_ == nil {
  3030  		c.header_ = make(http.Header)
  3031  	}
  3032  	return c.header_
  3033  }
  3034  
  3035  func (c *ProjectsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
  3036  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3037  	var body io.Reader = nil
  3038  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
  3039  	if err != nil {
  3040  		return nil, err
  3041  	}
  3042  	c.urlParams_.Set("alt", alt)
  3043  	c.urlParams_.Set("prettyPrint", "false")
  3044  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:beginTransaction")
  3045  	urls += "?" + c.urlParams_.Encode()
  3046  	req, err := http.NewRequest("POST", urls, body)
  3047  	if err != nil {
  3048  		return nil, err
  3049  	}
  3050  	req.Header = reqHeaders
  3051  	googleapi.Expand(req.URL, map[string]string{
  3052  		"projectId": c.projectId,
  3053  	})
  3054  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3055  }
  3056  
  3057  // Do executes the "datastore.projects.beginTransaction" call.
  3058  // Any non-2xx status code is an error. Response headers are in either
  3059  // *BeginTransactionResponse.ServerResponse.Header or (if a response was
  3060  // returned at all) in error.(*googleapi.Error).Header. Use
  3061  // googleapi.IsNotModified to check whether the returned error was because
  3062  // http.StatusNotModified was returned.
  3063  func (c *ProjectsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) {
  3064  	gensupport.SetOptions(c.urlParams_, opts...)
  3065  	res, err := c.doRequest("json")
  3066  	if res != nil && res.StatusCode == http.StatusNotModified {
  3067  		if res.Body != nil {
  3068  			res.Body.Close()
  3069  		}
  3070  		return nil, gensupport.WrapError(&googleapi.Error{
  3071  			Code:   res.StatusCode,
  3072  			Header: res.Header,
  3073  		})
  3074  	}
  3075  	if err != nil {
  3076  		return nil, err
  3077  	}
  3078  	defer googleapi.CloseBody(res)
  3079  	if err := googleapi.CheckResponse(res); err != nil {
  3080  		return nil, gensupport.WrapError(err)
  3081  	}
  3082  	ret := &BeginTransactionResponse{
  3083  		ServerResponse: googleapi.ServerResponse{
  3084  			Header:         res.Header,
  3085  			HTTPStatusCode: res.StatusCode,
  3086  		},
  3087  	}
  3088  	target := &ret
  3089  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3090  		return nil, err
  3091  	}
  3092  	return ret, nil
  3093  }
  3094  
  3095  type ProjectsCommitCall struct {
  3096  	s             *Service
  3097  	projectId     string
  3098  	commitrequest *CommitRequest
  3099  	urlParams_    gensupport.URLParams
  3100  	ctx_          context.Context
  3101  	header_       http.Header
  3102  }
  3103  
  3104  // Commit: Commits a transaction, optionally creating, deleting or modifying
  3105  // some entities.
  3106  //
  3107  // - projectId: The ID of the project against which to make the request.
  3108  func (r *ProjectsService) Commit(projectId string, commitrequest *CommitRequest) *ProjectsCommitCall {
  3109  	c := &ProjectsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3110  	c.projectId = projectId
  3111  	c.commitrequest = commitrequest
  3112  	return c
  3113  }
  3114  
  3115  // Fields allows partial responses to be retrieved. See
  3116  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3117  // details.
  3118  func (c *ProjectsCommitCall) Fields(s ...googleapi.Field) *ProjectsCommitCall {
  3119  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3120  	return c
  3121  }
  3122  
  3123  // Context sets the context to be used in this call's Do method.
  3124  func (c *ProjectsCommitCall) Context(ctx context.Context) *ProjectsCommitCall {
  3125  	c.ctx_ = ctx
  3126  	return c
  3127  }
  3128  
  3129  // Header returns a http.Header that can be modified by the caller to add
  3130  // headers to the request.
  3131  func (c *ProjectsCommitCall) Header() http.Header {
  3132  	if c.header_ == nil {
  3133  		c.header_ = make(http.Header)
  3134  	}
  3135  	return c.header_
  3136  }
  3137  
  3138  func (c *ProjectsCommitCall) doRequest(alt string) (*http.Response, error) {
  3139  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3140  	var body io.Reader = nil
  3141  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
  3142  	if err != nil {
  3143  		return nil, err
  3144  	}
  3145  	c.urlParams_.Set("alt", alt)
  3146  	c.urlParams_.Set("prettyPrint", "false")
  3147  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:commit")
  3148  	urls += "?" + c.urlParams_.Encode()
  3149  	req, err := http.NewRequest("POST", urls, body)
  3150  	if err != nil {
  3151  		return nil, err
  3152  	}
  3153  	req.Header = reqHeaders
  3154  	googleapi.Expand(req.URL, map[string]string{
  3155  		"projectId": c.projectId,
  3156  	})
  3157  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3158  }
  3159  
  3160  // Do executes the "datastore.projects.commit" call.
  3161  // Any non-2xx status code is an error. Response headers are in either
  3162  // *CommitResponse.ServerResponse.Header or (if a response was returned at all)
  3163  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3164  // whether the returned error was because http.StatusNotModified was returned.
  3165  func (c *ProjectsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
  3166  	gensupport.SetOptions(c.urlParams_, opts...)
  3167  	res, err := c.doRequest("json")
  3168  	if res != nil && res.StatusCode == http.StatusNotModified {
  3169  		if res.Body != nil {
  3170  			res.Body.Close()
  3171  		}
  3172  		return nil, gensupport.WrapError(&googleapi.Error{
  3173  			Code:   res.StatusCode,
  3174  			Header: res.Header,
  3175  		})
  3176  	}
  3177  	if err != nil {
  3178  		return nil, err
  3179  	}
  3180  	defer googleapi.CloseBody(res)
  3181  	if err := googleapi.CheckResponse(res); err != nil {
  3182  		return nil, gensupport.WrapError(err)
  3183  	}
  3184  	ret := &CommitResponse{
  3185  		ServerResponse: googleapi.ServerResponse{
  3186  			Header:         res.Header,
  3187  			HTTPStatusCode: res.StatusCode,
  3188  		},
  3189  	}
  3190  	target := &ret
  3191  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3192  		return nil, err
  3193  	}
  3194  	return ret, nil
  3195  }
  3196  
  3197  type ProjectsExportCall struct {
  3198  	s                                           *Service
  3199  	projectId                                   string
  3200  	googledatastoreadminv1exportentitiesrequest *GoogleDatastoreAdminV1ExportEntitiesRequest
  3201  	urlParams_                                  gensupport.URLParams
  3202  	ctx_                                        context.Context
  3203  	header_                                     http.Header
  3204  }
  3205  
  3206  // Export: Exports a copy of all or a subset of entities from Google Cloud
  3207  // Datastore to another storage system, such as Google Cloud Storage. Recent
  3208  // updates to entities may not be reflected in the export. The export occurs in
  3209  // the background and its progress can be monitored and managed via the
  3210  // Operation resource that is created. The output of an export may only be used
  3211  // once the associated operation is done. If an export operation is cancelled
  3212  // before completion it may leave partial data behind in Google Cloud Storage.
  3213  //
  3214  // - projectId: Project ID against which to make the request.
  3215  func (r *ProjectsService) Export(projectId string, googledatastoreadminv1exportentitiesrequest *GoogleDatastoreAdminV1ExportEntitiesRequest) *ProjectsExportCall {
  3216  	c := &ProjectsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3217  	c.projectId = projectId
  3218  	c.googledatastoreadminv1exportentitiesrequest = googledatastoreadminv1exportentitiesrequest
  3219  	return c
  3220  }
  3221  
  3222  // Fields allows partial responses to be retrieved. See
  3223  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3224  // details.
  3225  func (c *ProjectsExportCall) Fields(s ...googleapi.Field) *ProjectsExportCall {
  3226  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3227  	return c
  3228  }
  3229  
  3230  // Context sets the context to be used in this call's Do method.
  3231  func (c *ProjectsExportCall) Context(ctx context.Context) *ProjectsExportCall {
  3232  	c.ctx_ = ctx
  3233  	return c
  3234  }
  3235  
  3236  // Header returns a http.Header that can be modified by the caller to add
  3237  // headers to the request.
  3238  func (c *ProjectsExportCall) Header() http.Header {
  3239  	if c.header_ == nil {
  3240  		c.header_ = make(http.Header)
  3241  	}
  3242  	return c.header_
  3243  }
  3244  
  3245  func (c *ProjectsExportCall) doRequest(alt string) (*http.Response, error) {
  3246  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3247  	var body io.Reader = nil
  3248  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledatastoreadminv1exportentitiesrequest)
  3249  	if err != nil {
  3250  		return nil, err
  3251  	}
  3252  	c.urlParams_.Set("alt", alt)
  3253  	c.urlParams_.Set("prettyPrint", "false")
  3254  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:export")
  3255  	urls += "?" + c.urlParams_.Encode()
  3256  	req, err := http.NewRequest("POST", urls, body)
  3257  	if err != nil {
  3258  		return nil, err
  3259  	}
  3260  	req.Header = reqHeaders
  3261  	googleapi.Expand(req.URL, map[string]string{
  3262  		"projectId": c.projectId,
  3263  	})
  3264  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3265  }
  3266  
  3267  // Do executes the "datastore.projects.export" call.
  3268  // Any non-2xx status code is an error. Response headers are in either
  3269  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3270  // returned at all) in error.(*googleapi.Error).Header. Use
  3271  // googleapi.IsNotModified to check whether the returned error was because
  3272  // http.StatusNotModified was returned.
  3273  func (c *ProjectsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3274  	gensupport.SetOptions(c.urlParams_, opts...)
  3275  	res, err := c.doRequest("json")
  3276  	if res != nil && res.StatusCode == http.StatusNotModified {
  3277  		if res.Body != nil {
  3278  			res.Body.Close()
  3279  		}
  3280  		return nil, gensupport.WrapError(&googleapi.Error{
  3281  			Code:   res.StatusCode,
  3282  			Header: res.Header,
  3283  		})
  3284  	}
  3285  	if err != nil {
  3286  		return nil, err
  3287  	}
  3288  	defer googleapi.CloseBody(res)
  3289  	if err := googleapi.CheckResponse(res); err != nil {
  3290  		return nil, gensupport.WrapError(err)
  3291  	}
  3292  	ret := &GoogleLongrunningOperation{
  3293  		ServerResponse: googleapi.ServerResponse{
  3294  			Header:         res.Header,
  3295  			HTTPStatusCode: res.StatusCode,
  3296  		},
  3297  	}
  3298  	target := &ret
  3299  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3300  		return nil, err
  3301  	}
  3302  	return ret, nil
  3303  }
  3304  
  3305  type ProjectsImportCall struct {
  3306  	s                                           *Service
  3307  	projectId                                   string
  3308  	googledatastoreadminv1importentitiesrequest *GoogleDatastoreAdminV1ImportEntitiesRequest
  3309  	urlParams_                                  gensupport.URLParams
  3310  	ctx_                                        context.Context
  3311  	header_                                     http.Header
  3312  }
  3313  
  3314  // Import: Imports entities into Google Cloud Datastore. Existing entities with
  3315  // the same key are overwritten. The import occurs in the background and its
  3316  // progress can be monitored and managed via the Operation resource that is
  3317  // created. If an ImportEntities operation is cancelled, it is possible that a
  3318  // subset of the data has already been imported to Cloud Datastore.
  3319  //
  3320  // - projectId: Project ID against which to make the request.
  3321  func (r *ProjectsService) Import(projectId string, googledatastoreadminv1importentitiesrequest *GoogleDatastoreAdminV1ImportEntitiesRequest) *ProjectsImportCall {
  3322  	c := &ProjectsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3323  	c.projectId = projectId
  3324  	c.googledatastoreadminv1importentitiesrequest = googledatastoreadminv1importentitiesrequest
  3325  	return c
  3326  }
  3327  
  3328  // Fields allows partial responses to be retrieved. See
  3329  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3330  // details.
  3331  func (c *ProjectsImportCall) Fields(s ...googleapi.Field) *ProjectsImportCall {
  3332  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3333  	return c
  3334  }
  3335  
  3336  // Context sets the context to be used in this call's Do method.
  3337  func (c *ProjectsImportCall) Context(ctx context.Context) *ProjectsImportCall {
  3338  	c.ctx_ = ctx
  3339  	return c
  3340  }
  3341  
  3342  // Header returns a http.Header that can be modified by the caller to add
  3343  // headers to the request.
  3344  func (c *ProjectsImportCall) Header() http.Header {
  3345  	if c.header_ == nil {
  3346  		c.header_ = make(http.Header)
  3347  	}
  3348  	return c.header_
  3349  }
  3350  
  3351  func (c *ProjectsImportCall) doRequest(alt string) (*http.Response, error) {
  3352  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3353  	var body io.Reader = nil
  3354  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledatastoreadminv1importentitiesrequest)
  3355  	if err != nil {
  3356  		return nil, err
  3357  	}
  3358  	c.urlParams_.Set("alt", alt)
  3359  	c.urlParams_.Set("prettyPrint", "false")
  3360  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:import")
  3361  	urls += "?" + c.urlParams_.Encode()
  3362  	req, err := http.NewRequest("POST", urls, body)
  3363  	if err != nil {
  3364  		return nil, err
  3365  	}
  3366  	req.Header = reqHeaders
  3367  	googleapi.Expand(req.URL, map[string]string{
  3368  		"projectId": c.projectId,
  3369  	})
  3370  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3371  }
  3372  
  3373  // Do executes the "datastore.projects.import" call.
  3374  // Any non-2xx status code is an error. Response headers are in either
  3375  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3376  // returned at all) in error.(*googleapi.Error).Header. Use
  3377  // googleapi.IsNotModified to check whether the returned error was because
  3378  // http.StatusNotModified was returned.
  3379  func (c *ProjectsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3380  	gensupport.SetOptions(c.urlParams_, opts...)
  3381  	res, err := c.doRequest("json")
  3382  	if res != nil && res.StatusCode == http.StatusNotModified {
  3383  		if res.Body != nil {
  3384  			res.Body.Close()
  3385  		}
  3386  		return nil, gensupport.WrapError(&googleapi.Error{
  3387  			Code:   res.StatusCode,
  3388  			Header: res.Header,
  3389  		})
  3390  	}
  3391  	if err != nil {
  3392  		return nil, err
  3393  	}
  3394  	defer googleapi.CloseBody(res)
  3395  	if err := googleapi.CheckResponse(res); err != nil {
  3396  		return nil, gensupport.WrapError(err)
  3397  	}
  3398  	ret := &GoogleLongrunningOperation{
  3399  		ServerResponse: googleapi.ServerResponse{
  3400  			Header:         res.Header,
  3401  			HTTPStatusCode: res.StatusCode,
  3402  		},
  3403  	}
  3404  	target := &ret
  3405  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3406  		return nil, err
  3407  	}
  3408  	return ret, nil
  3409  }
  3410  
  3411  type ProjectsLookupCall struct {
  3412  	s             *Service
  3413  	projectId     string
  3414  	lookuprequest *LookupRequest
  3415  	urlParams_    gensupport.URLParams
  3416  	ctx_          context.Context
  3417  	header_       http.Header
  3418  }
  3419  
  3420  // Lookup: Looks up entities by key.
  3421  //
  3422  // - projectId: The ID of the project against which to make the request.
  3423  func (r *ProjectsService) Lookup(projectId string, lookuprequest *LookupRequest) *ProjectsLookupCall {
  3424  	c := &ProjectsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3425  	c.projectId = projectId
  3426  	c.lookuprequest = lookuprequest
  3427  	return c
  3428  }
  3429  
  3430  // Fields allows partial responses to be retrieved. See
  3431  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3432  // details.
  3433  func (c *ProjectsLookupCall) Fields(s ...googleapi.Field) *ProjectsLookupCall {
  3434  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3435  	return c
  3436  }
  3437  
  3438  // Context sets the context to be used in this call's Do method.
  3439  func (c *ProjectsLookupCall) Context(ctx context.Context) *ProjectsLookupCall {
  3440  	c.ctx_ = ctx
  3441  	return c
  3442  }
  3443  
  3444  // Header returns a http.Header that can be modified by the caller to add
  3445  // headers to the request.
  3446  func (c *ProjectsLookupCall) Header() http.Header {
  3447  	if c.header_ == nil {
  3448  		c.header_ = make(http.Header)
  3449  	}
  3450  	return c.header_
  3451  }
  3452  
  3453  func (c *ProjectsLookupCall) doRequest(alt string) (*http.Response, error) {
  3454  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3455  	var body io.Reader = nil
  3456  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuprequest)
  3457  	if err != nil {
  3458  		return nil, err
  3459  	}
  3460  	c.urlParams_.Set("alt", alt)
  3461  	c.urlParams_.Set("prettyPrint", "false")
  3462  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:lookup")
  3463  	urls += "?" + c.urlParams_.Encode()
  3464  	req, err := http.NewRequest("POST", urls, body)
  3465  	if err != nil {
  3466  		return nil, err
  3467  	}
  3468  	req.Header = reqHeaders
  3469  	googleapi.Expand(req.URL, map[string]string{
  3470  		"projectId": c.projectId,
  3471  	})
  3472  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3473  }
  3474  
  3475  // Do executes the "datastore.projects.lookup" call.
  3476  // Any non-2xx status code is an error. Response headers are in either
  3477  // *LookupResponse.ServerResponse.Header or (if a response was returned at all)
  3478  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3479  // whether the returned error was because http.StatusNotModified was returned.
  3480  func (c *ProjectsLookupCall) Do(opts ...googleapi.CallOption) (*LookupResponse, error) {
  3481  	gensupport.SetOptions(c.urlParams_, opts...)
  3482  	res, err := c.doRequest("json")
  3483  	if res != nil && res.StatusCode == http.StatusNotModified {
  3484  		if res.Body != nil {
  3485  			res.Body.Close()
  3486  		}
  3487  		return nil, gensupport.WrapError(&googleapi.Error{
  3488  			Code:   res.StatusCode,
  3489  			Header: res.Header,
  3490  		})
  3491  	}
  3492  	if err != nil {
  3493  		return nil, err
  3494  	}
  3495  	defer googleapi.CloseBody(res)
  3496  	if err := googleapi.CheckResponse(res); err != nil {
  3497  		return nil, gensupport.WrapError(err)
  3498  	}
  3499  	ret := &LookupResponse{
  3500  		ServerResponse: googleapi.ServerResponse{
  3501  			Header:         res.Header,
  3502  			HTTPStatusCode: res.StatusCode,
  3503  		},
  3504  	}
  3505  	target := &ret
  3506  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3507  		return nil, err
  3508  	}
  3509  	return ret, nil
  3510  }
  3511  
  3512  type ProjectsReserveIdsCall struct {
  3513  	s                 *Service
  3514  	projectId         string
  3515  	reserveidsrequest *ReserveIdsRequest
  3516  	urlParams_        gensupport.URLParams
  3517  	ctx_              context.Context
  3518  	header_           http.Header
  3519  }
  3520  
  3521  // ReserveIds: Prevents the supplied keys' IDs from being auto-allocated by
  3522  // Cloud Datastore.
  3523  //
  3524  // - projectId: The ID of the project against which to make the request.
  3525  func (r *ProjectsService) ReserveIds(projectId string, reserveidsrequest *ReserveIdsRequest) *ProjectsReserveIdsCall {
  3526  	c := &ProjectsReserveIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3527  	c.projectId = projectId
  3528  	c.reserveidsrequest = reserveidsrequest
  3529  	return c
  3530  }
  3531  
  3532  // Fields allows partial responses to be retrieved. See
  3533  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3534  // details.
  3535  func (c *ProjectsReserveIdsCall) Fields(s ...googleapi.Field) *ProjectsReserveIdsCall {
  3536  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3537  	return c
  3538  }
  3539  
  3540  // Context sets the context to be used in this call's Do method.
  3541  func (c *ProjectsReserveIdsCall) Context(ctx context.Context) *ProjectsReserveIdsCall {
  3542  	c.ctx_ = ctx
  3543  	return c
  3544  }
  3545  
  3546  // Header returns a http.Header that can be modified by the caller to add
  3547  // headers to the request.
  3548  func (c *ProjectsReserveIdsCall) Header() http.Header {
  3549  	if c.header_ == nil {
  3550  		c.header_ = make(http.Header)
  3551  	}
  3552  	return c.header_
  3553  }
  3554  
  3555  func (c *ProjectsReserveIdsCall) doRequest(alt string) (*http.Response, error) {
  3556  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3557  	var body io.Reader = nil
  3558  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reserveidsrequest)
  3559  	if err != nil {
  3560  		return nil, err
  3561  	}
  3562  	c.urlParams_.Set("alt", alt)
  3563  	c.urlParams_.Set("prettyPrint", "false")
  3564  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:reserveIds")
  3565  	urls += "?" + c.urlParams_.Encode()
  3566  	req, err := http.NewRequest("POST", urls, body)
  3567  	if err != nil {
  3568  		return nil, err
  3569  	}
  3570  	req.Header = reqHeaders
  3571  	googleapi.Expand(req.URL, map[string]string{
  3572  		"projectId": c.projectId,
  3573  	})
  3574  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3575  }
  3576  
  3577  // Do executes the "datastore.projects.reserveIds" call.
  3578  // Any non-2xx status code is an error. Response headers are in either
  3579  // *ReserveIdsResponse.ServerResponse.Header or (if a response was returned at
  3580  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3581  // check whether the returned error was because http.StatusNotModified was
  3582  // returned.
  3583  func (c *ProjectsReserveIdsCall) Do(opts ...googleapi.CallOption) (*ReserveIdsResponse, error) {
  3584  	gensupport.SetOptions(c.urlParams_, opts...)
  3585  	res, err := c.doRequest("json")
  3586  	if res != nil && res.StatusCode == http.StatusNotModified {
  3587  		if res.Body != nil {
  3588  			res.Body.Close()
  3589  		}
  3590  		return nil, gensupport.WrapError(&googleapi.Error{
  3591  			Code:   res.StatusCode,
  3592  			Header: res.Header,
  3593  		})
  3594  	}
  3595  	if err != nil {
  3596  		return nil, err
  3597  	}
  3598  	defer googleapi.CloseBody(res)
  3599  	if err := googleapi.CheckResponse(res); err != nil {
  3600  		return nil, gensupport.WrapError(err)
  3601  	}
  3602  	ret := &ReserveIdsResponse{
  3603  		ServerResponse: googleapi.ServerResponse{
  3604  			Header:         res.Header,
  3605  			HTTPStatusCode: res.StatusCode,
  3606  		},
  3607  	}
  3608  	target := &ret
  3609  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3610  		return nil, err
  3611  	}
  3612  	return ret, nil
  3613  }
  3614  
  3615  type ProjectsRollbackCall struct {
  3616  	s               *Service
  3617  	projectId       string
  3618  	rollbackrequest *RollbackRequest
  3619  	urlParams_      gensupport.URLParams
  3620  	ctx_            context.Context
  3621  	header_         http.Header
  3622  }
  3623  
  3624  // Rollback: Rolls back a transaction.
  3625  //
  3626  // - projectId: The ID of the project against which to make the request.
  3627  func (r *ProjectsService) Rollback(projectId string, rollbackrequest *RollbackRequest) *ProjectsRollbackCall {
  3628  	c := &ProjectsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3629  	c.projectId = projectId
  3630  	c.rollbackrequest = rollbackrequest
  3631  	return c
  3632  }
  3633  
  3634  // Fields allows partial responses to be retrieved. See
  3635  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3636  // details.
  3637  func (c *ProjectsRollbackCall) Fields(s ...googleapi.Field) *ProjectsRollbackCall {
  3638  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3639  	return c
  3640  }
  3641  
  3642  // Context sets the context to be used in this call's Do method.
  3643  func (c *ProjectsRollbackCall) Context(ctx context.Context) *ProjectsRollbackCall {
  3644  	c.ctx_ = ctx
  3645  	return c
  3646  }
  3647  
  3648  // Header returns a http.Header that can be modified by the caller to add
  3649  // headers to the request.
  3650  func (c *ProjectsRollbackCall) Header() http.Header {
  3651  	if c.header_ == nil {
  3652  		c.header_ = make(http.Header)
  3653  	}
  3654  	return c.header_
  3655  }
  3656  
  3657  func (c *ProjectsRollbackCall) doRequest(alt string) (*http.Response, error) {
  3658  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3659  	var body io.Reader = nil
  3660  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
  3661  	if err != nil {
  3662  		return nil, err
  3663  	}
  3664  	c.urlParams_.Set("alt", alt)
  3665  	c.urlParams_.Set("prettyPrint", "false")
  3666  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:rollback")
  3667  	urls += "?" + c.urlParams_.Encode()
  3668  	req, err := http.NewRequest("POST", urls, body)
  3669  	if err != nil {
  3670  		return nil, err
  3671  	}
  3672  	req.Header = reqHeaders
  3673  	googleapi.Expand(req.URL, map[string]string{
  3674  		"projectId": c.projectId,
  3675  	})
  3676  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3677  }
  3678  
  3679  // Do executes the "datastore.projects.rollback" call.
  3680  // Any non-2xx status code is an error. Response headers are in either
  3681  // *RollbackResponse.ServerResponse.Header or (if a response was returned at
  3682  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3683  // check whether the returned error was because http.StatusNotModified was
  3684  // returned.
  3685  func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackResponse, error) {
  3686  	gensupport.SetOptions(c.urlParams_, opts...)
  3687  	res, err := c.doRequest("json")
  3688  	if res != nil && res.StatusCode == http.StatusNotModified {
  3689  		if res.Body != nil {
  3690  			res.Body.Close()
  3691  		}
  3692  		return nil, gensupport.WrapError(&googleapi.Error{
  3693  			Code:   res.StatusCode,
  3694  			Header: res.Header,
  3695  		})
  3696  	}
  3697  	if err != nil {
  3698  		return nil, err
  3699  	}
  3700  	defer googleapi.CloseBody(res)
  3701  	if err := googleapi.CheckResponse(res); err != nil {
  3702  		return nil, gensupport.WrapError(err)
  3703  	}
  3704  	ret := &RollbackResponse{
  3705  		ServerResponse: googleapi.ServerResponse{
  3706  			Header:         res.Header,
  3707  			HTTPStatusCode: res.StatusCode,
  3708  		},
  3709  	}
  3710  	target := &ret
  3711  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3712  		return nil, err
  3713  	}
  3714  	return ret, nil
  3715  }
  3716  
  3717  type ProjectsRunAggregationQueryCall struct {
  3718  	s                          *Service
  3719  	projectId                  string
  3720  	runaggregationqueryrequest *RunAggregationQueryRequest
  3721  	urlParams_                 gensupport.URLParams
  3722  	ctx_                       context.Context
  3723  	header_                    http.Header
  3724  }
  3725  
  3726  // RunAggregationQuery: Runs an aggregation query.
  3727  //
  3728  // - projectId: The ID of the project against which to make the request.
  3729  func (r *ProjectsService) RunAggregationQuery(projectId string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsRunAggregationQueryCall {
  3730  	c := &ProjectsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3731  	c.projectId = projectId
  3732  	c.runaggregationqueryrequest = runaggregationqueryrequest
  3733  	return c
  3734  }
  3735  
  3736  // Fields allows partial responses to be retrieved. See
  3737  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3738  // details.
  3739  func (c *ProjectsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsRunAggregationQueryCall {
  3740  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3741  	return c
  3742  }
  3743  
  3744  // Context sets the context to be used in this call's Do method.
  3745  func (c *ProjectsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsRunAggregationQueryCall {
  3746  	c.ctx_ = ctx
  3747  	return c
  3748  }
  3749  
  3750  // Header returns a http.Header that can be modified by the caller to add
  3751  // headers to the request.
  3752  func (c *ProjectsRunAggregationQueryCall) Header() http.Header {
  3753  	if c.header_ == nil {
  3754  		c.header_ = make(http.Header)
  3755  	}
  3756  	return c.header_
  3757  }
  3758  
  3759  func (c *ProjectsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) {
  3760  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3761  	var body io.Reader = nil
  3762  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest)
  3763  	if err != nil {
  3764  		return nil, err
  3765  	}
  3766  	c.urlParams_.Set("alt", alt)
  3767  	c.urlParams_.Set("prettyPrint", "false")
  3768  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:runAggregationQuery")
  3769  	urls += "?" + c.urlParams_.Encode()
  3770  	req, err := http.NewRequest("POST", urls, body)
  3771  	if err != nil {
  3772  		return nil, err
  3773  	}
  3774  	req.Header = reqHeaders
  3775  	googleapi.Expand(req.URL, map[string]string{
  3776  		"projectId": c.projectId,
  3777  	})
  3778  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3779  }
  3780  
  3781  // Do executes the "datastore.projects.runAggregationQuery" call.
  3782  // Any non-2xx status code is an error. Response headers are in either
  3783  // *RunAggregationQueryResponse.ServerResponse.Header or (if a response was
  3784  // returned at all) in error.(*googleapi.Error).Header. Use
  3785  // googleapi.IsNotModified to check whether the returned error was because
  3786  // http.StatusNotModified was returned.
  3787  func (c *ProjectsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) {
  3788  	gensupport.SetOptions(c.urlParams_, opts...)
  3789  	res, err := c.doRequest("json")
  3790  	if res != nil && res.StatusCode == http.StatusNotModified {
  3791  		if res.Body != nil {
  3792  			res.Body.Close()
  3793  		}
  3794  		return nil, gensupport.WrapError(&googleapi.Error{
  3795  			Code:   res.StatusCode,
  3796  			Header: res.Header,
  3797  		})
  3798  	}
  3799  	if err != nil {
  3800  		return nil, err
  3801  	}
  3802  	defer googleapi.CloseBody(res)
  3803  	if err := googleapi.CheckResponse(res); err != nil {
  3804  		return nil, gensupport.WrapError(err)
  3805  	}
  3806  	ret := &RunAggregationQueryResponse{
  3807  		ServerResponse: googleapi.ServerResponse{
  3808  			Header:         res.Header,
  3809  			HTTPStatusCode: res.StatusCode,
  3810  		},
  3811  	}
  3812  	target := &ret
  3813  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3814  		return nil, err
  3815  	}
  3816  	return ret, nil
  3817  }
  3818  
  3819  type ProjectsRunQueryCall struct {
  3820  	s               *Service
  3821  	projectId       string
  3822  	runqueryrequest *RunQueryRequest
  3823  	urlParams_      gensupport.URLParams
  3824  	ctx_            context.Context
  3825  	header_         http.Header
  3826  }
  3827  
  3828  // RunQuery: Queries for entities.
  3829  //
  3830  // - projectId: The ID of the project against which to make the request.
  3831  func (r *ProjectsService) RunQuery(projectId string, runqueryrequest *RunQueryRequest) *ProjectsRunQueryCall {
  3832  	c := &ProjectsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3833  	c.projectId = projectId
  3834  	c.runqueryrequest = runqueryrequest
  3835  	return c
  3836  }
  3837  
  3838  // Fields allows partial responses to be retrieved. See
  3839  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3840  // details.
  3841  func (c *ProjectsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsRunQueryCall {
  3842  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3843  	return c
  3844  }
  3845  
  3846  // Context sets the context to be used in this call's Do method.
  3847  func (c *ProjectsRunQueryCall) Context(ctx context.Context) *ProjectsRunQueryCall {
  3848  	c.ctx_ = ctx
  3849  	return c
  3850  }
  3851  
  3852  // Header returns a http.Header that can be modified by the caller to add
  3853  // headers to the request.
  3854  func (c *ProjectsRunQueryCall) Header() http.Header {
  3855  	if c.header_ == nil {
  3856  		c.header_ = make(http.Header)
  3857  	}
  3858  	return c.header_
  3859  }
  3860  
  3861  func (c *ProjectsRunQueryCall) doRequest(alt string) (*http.Response, error) {
  3862  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3863  	var body io.Reader = nil
  3864  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
  3865  	if err != nil {
  3866  		return nil, err
  3867  	}
  3868  	c.urlParams_.Set("alt", alt)
  3869  	c.urlParams_.Set("prettyPrint", "false")
  3870  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:runQuery")
  3871  	urls += "?" + c.urlParams_.Encode()
  3872  	req, err := http.NewRequest("POST", urls, body)
  3873  	if err != nil {
  3874  		return nil, err
  3875  	}
  3876  	req.Header = reqHeaders
  3877  	googleapi.Expand(req.URL, map[string]string{
  3878  		"projectId": c.projectId,
  3879  	})
  3880  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3881  }
  3882  
  3883  // Do executes the "datastore.projects.runQuery" call.
  3884  // Any non-2xx status code is an error. Response headers are in either
  3885  // *RunQueryResponse.ServerResponse.Header or (if a response was returned at
  3886  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3887  // check whether the returned error was because http.StatusNotModified was
  3888  // returned.
  3889  func (c *ProjectsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) {
  3890  	gensupport.SetOptions(c.urlParams_, opts...)
  3891  	res, err := c.doRequest("json")
  3892  	if res != nil && res.StatusCode == http.StatusNotModified {
  3893  		if res.Body != nil {
  3894  			res.Body.Close()
  3895  		}
  3896  		return nil, gensupport.WrapError(&googleapi.Error{
  3897  			Code:   res.StatusCode,
  3898  			Header: res.Header,
  3899  		})
  3900  	}
  3901  	if err != nil {
  3902  		return nil, err
  3903  	}
  3904  	defer googleapi.CloseBody(res)
  3905  	if err := googleapi.CheckResponse(res); err != nil {
  3906  		return nil, gensupport.WrapError(err)
  3907  	}
  3908  	ret := &RunQueryResponse{
  3909  		ServerResponse: googleapi.ServerResponse{
  3910  			Header:         res.Header,
  3911  			HTTPStatusCode: res.StatusCode,
  3912  		},
  3913  	}
  3914  	target := &ret
  3915  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3916  		return nil, err
  3917  	}
  3918  	return ret, nil
  3919  }
  3920  
  3921  type ProjectsIndexesCreateCall struct {
  3922  	s                           *Service
  3923  	projectId                   string
  3924  	googledatastoreadminv1index *GoogleDatastoreAdminV1Index
  3925  	urlParams_                  gensupport.URLParams
  3926  	ctx_                        context.Context
  3927  	header_                     http.Header
  3928  }
  3929  
  3930  // Create: Creates the specified index. A newly created index's initial state
  3931  // is `CREATING`. On completion of the returned google.longrunning.Operation,
  3932  // the state will be `READY`. If the index already exists, the call will return
  3933  // an `ALREADY_EXISTS` status. During index creation, the process could result
  3934  // in an error, in which case the index will move to the `ERROR` state. The
  3935  // process can be recovered by fixing the data that caused the error, removing
  3936  // the index with delete, then re-creating the index with create. Indexes with
  3937  // a single property cannot be created.
  3938  //
  3939  // - projectId: Project ID against which to make the request.
  3940  func (r *ProjectsIndexesService) Create(projectId string, googledatastoreadminv1index *GoogleDatastoreAdminV1Index) *ProjectsIndexesCreateCall {
  3941  	c := &ProjectsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3942  	c.projectId = projectId
  3943  	c.googledatastoreadminv1index = googledatastoreadminv1index
  3944  	return c
  3945  }
  3946  
  3947  // Fields allows partial responses to be retrieved. See
  3948  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3949  // details.
  3950  func (c *ProjectsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsIndexesCreateCall {
  3951  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3952  	return c
  3953  }
  3954  
  3955  // Context sets the context to be used in this call's Do method.
  3956  func (c *ProjectsIndexesCreateCall) Context(ctx context.Context) *ProjectsIndexesCreateCall {
  3957  	c.ctx_ = ctx
  3958  	return c
  3959  }
  3960  
  3961  // Header returns a http.Header that can be modified by the caller to add
  3962  // headers to the request.
  3963  func (c *ProjectsIndexesCreateCall) Header() http.Header {
  3964  	if c.header_ == nil {
  3965  		c.header_ = make(http.Header)
  3966  	}
  3967  	return c.header_
  3968  }
  3969  
  3970  func (c *ProjectsIndexesCreateCall) doRequest(alt string) (*http.Response, error) {
  3971  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3972  	var body io.Reader = nil
  3973  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledatastoreadminv1index)
  3974  	if err != nil {
  3975  		return nil, err
  3976  	}
  3977  	c.urlParams_.Set("alt", alt)
  3978  	c.urlParams_.Set("prettyPrint", "false")
  3979  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/indexes")
  3980  	urls += "?" + c.urlParams_.Encode()
  3981  	req, err := http.NewRequest("POST", urls, body)
  3982  	if err != nil {
  3983  		return nil, err
  3984  	}
  3985  	req.Header = reqHeaders
  3986  	googleapi.Expand(req.URL, map[string]string{
  3987  		"projectId": c.projectId,
  3988  	})
  3989  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3990  }
  3991  
  3992  // Do executes the "datastore.projects.indexes.create" call.
  3993  // Any non-2xx status code is an error. Response headers are in either
  3994  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3995  // returned at all) in error.(*googleapi.Error).Header. Use
  3996  // googleapi.IsNotModified to check whether the returned error was because
  3997  // http.StatusNotModified was returned.
  3998  func (c *ProjectsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3999  	gensupport.SetOptions(c.urlParams_, opts...)
  4000  	res, err := c.doRequest("json")
  4001  	if res != nil && res.StatusCode == http.StatusNotModified {
  4002  		if res.Body != nil {
  4003  			res.Body.Close()
  4004  		}
  4005  		return nil, gensupport.WrapError(&googleapi.Error{
  4006  			Code:   res.StatusCode,
  4007  			Header: res.Header,
  4008  		})
  4009  	}
  4010  	if err != nil {
  4011  		return nil, err
  4012  	}
  4013  	defer googleapi.CloseBody(res)
  4014  	if err := googleapi.CheckResponse(res); err != nil {
  4015  		return nil, gensupport.WrapError(err)
  4016  	}
  4017  	ret := &GoogleLongrunningOperation{
  4018  		ServerResponse: googleapi.ServerResponse{
  4019  			Header:         res.Header,
  4020  			HTTPStatusCode: res.StatusCode,
  4021  		},
  4022  	}
  4023  	target := &ret
  4024  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4025  		return nil, err
  4026  	}
  4027  	return ret, nil
  4028  }
  4029  
  4030  type ProjectsIndexesDeleteCall struct {
  4031  	s          *Service
  4032  	projectId  string
  4033  	indexId    string
  4034  	urlParams_ gensupport.URLParams
  4035  	ctx_       context.Context
  4036  	header_    http.Header
  4037  }
  4038  
  4039  // Delete: Deletes an existing index. An index can only be deleted if it is in
  4040  // a `READY` or `ERROR` state. On successful execution of the request, the
  4041  // index will be in a `DELETING` state. And on completion of the returned
  4042  // google.longrunning.Operation, the index will be removed. During index
  4043  // deletion, the process could result in an error, in which case the index will
  4044  // move to the `ERROR` state. The process can be recovered by fixing the data
  4045  // that caused the error, followed by calling delete again.
  4046  //
  4047  // - indexId: The resource ID of the index to delete.
  4048  // - projectId: Project ID against which to make the request.
  4049  func (r *ProjectsIndexesService) Delete(projectId string, indexId string) *ProjectsIndexesDeleteCall {
  4050  	c := &ProjectsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4051  	c.projectId = projectId
  4052  	c.indexId = indexId
  4053  	return c
  4054  }
  4055  
  4056  // Fields allows partial responses to be retrieved. See
  4057  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4058  // details.
  4059  func (c *ProjectsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsIndexesDeleteCall {
  4060  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4061  	return c
  4062  }
  4063  
  4064  // Context sets the context to be used in this call's Do method.
  4065  func (c *ProjectsIndexesDeleteCall) Context(ctx context.Context) *ProjectsIndexesDeleteCall {
  4066  	c.ctx_ = ctx
  4067  	return c
  4068  }
  4069  
  4070  // Header returns a http.Header that can be modified by the caller to add
  4071  // headers to the request.
  4072  func (c *ProjectsIndexesDeleteCall) Header() http.Header {
  4073  	if c.header_ == nil {
  4074  		c.header_ = make(http.Header)
  4075  	}
  4076  	return c.header_
  4077  }
  4078  
  4079  func (c *ProjectsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4080  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4081  	var body io.Reader = nil
  4082  	c.urlParams_.Set("alt", alt)
  4083  	c.urlParams_.Set("prettyPrint", "false")
  4084  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/indexes/{indexId}")
  4085  	urls += "?" + c.urlParams_.Encode()
  4086  	req, err := http.NewRequest("DELETE", urls, body)
  4087  	if err != nil {
  4088  		return nil, err
  4089  	}
  4090  	req.Header = reqHeaders
  4091  	googleapi.Expand(req.URL, map[string]string{
  4092  		"projectId": c.projectId,
  4093  		"indexId":   c.indexId,
  4094  	})
  4095  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4096  }
  4097  
  4098  // Do executes the "datastore.projects.indexes.delete" call.
  4099  // Any non-2xx status code is an error. Response headers are in either
  4100  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4101  // returned at all) in error.(*googleapi.Error).Header. Use
  4102  // googleapi.IsNotModified to check whether the returned error was because
  4103  // http.StatusNotModified was returned.
  4104  func (c *ProjectsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4105  	gensupport.SetOptions(c.urlParams_, opts...)
  4106  	res, err := c.doRequest("json")
  4107  	if res != nil && res.StatusCode == http.StatusNotModified {
  4108  		if res.Body != nil {
  4109  			res.Body.Close()
  4110  		}
  4111  		return nil, gensupport.WrapError(&googleapi.Error{
  4112  			Code:   res.StatusCode,
  4113  			Header: res.Header,
  4114  		})
  4115  	}
  4116  	if err != nil {
  4117  		return nil, err
  4118  	}
  4119  	defer googleapi.CloseBody(res)
  4120  	if err := googleapi.CheckResponse(res); err != nil {
  4121  		return nil, gensupport.WrapError(err)
  4122  	}
  4123  	ret := &GoogleLongrunningOperation{
  4124  		ServerResponse: googleapi.ServerResponse{
  4125  			Header:         res.Header,
  4126  			HTTPStatusCode: res.StatusCode,
  4127  		},
  4128  	}
  4129  	target := &ret
  4130  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4131  		return nil, err
  4132  	}
  4133  	return ret, nil
  4134  }
  4135  
  4136  type ProjectsIndexesGetCall struct {
  4137  	s            *Service
  4138  	projectId    string
  4139  	indexId      string
  4140  	urlParams_   gensupport.URLParams
  4141  	ifNoneMatch_ string
  4142  	ctx_         context.Context
  4143  	header_      http.Header
  4144  }
  4145  
  4146  // Get: Gets an index.
  4147  //
  4148  // - indexId: The resource ID of the index to get.
  4149  // - projectId: Project ID against which to make the request.
  4150  func (r *ProjectsIndexesService) Get(projectId string, indexId string) *ProjectsIndexesGetCall {
  4151  	c := &ProjectsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4152  	c.projectId = projectId
  4153  	c.indexId = indexId
  4154  	return c
  4155  }
  4156  
  4157  // Fields allows partial responses to be retrieved. See
  4158  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4159  // details.
  4160  func (c *ProjectsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsIndexesGetCall {
  4161  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4162  	return c
  4163  }
  4164  
  4165  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4166  // object's ETag matches the given value. This is useful for getting updates
  4167  // only after the object has changed since the last request.
  4168  func (c *ProjectsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsIndexesGetCall {
  4169  	c.ifNoneMatch_ = entityTag
  4170  	return c
  4171  }
  4172  
  4173  // Context sets the context to be used in this call's Do method.
  4174  func (c *ProjectsIndexesGetCall) Context(ctx context.Context) *ProjectsIndexesGetCall {
  4175  	c.ctx_ = ctx
  4176  	return c
  4177  }
  4178  
  4179  // Header returns a http.Header that can be modified by the caller to add
  4180  // headers to the request.
  4181  func (c *ProjectsIndexesGetCall) Header() http.Header {
  4182  	if c.header_ == nil {
  4183  		c.header_ = make(http.Header)
  4184  	}
  4185  	return c.header_
  4186  }
  4187  
  4188  func (c *ProjectsIndexesGetCall) doRequest(alt string) (*http.Response, error) {
  4189  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4190  	if c.ifNoneMatch_ != "" {
  4191  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4192  	}
  4193  	var body io.Reader = nil
  4194  	c.urlParams_.Set("alt", alt)
  4195  	c.urlParams_.Set("prettyPrint", "false")
  4196  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/indexes/{indexId}")
  4197  	urls += "?" + c.urlParams_.Encode()
  4198  	req, err := http.NewRequest("GET", urls, body)
  4199  	if err != nil {
  4200  		return nil, err
  4201  	}
  4202  	req.Header = reqHeaders
  4203  	googleapi.Expand(req.URL, map[string]string{
  4204  		"projectId": c.projectId,
  4205  		"indexId":   c.indexId,
  4206  	})
  4207  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4208  }
  4209  
  4210  // Do executes the "datastore.projects.indexes.get" call.
  4211  // Any non-2xx status code is an error. Response headers are in either
  4212  // *GoogleDatastoreAdminV1Index.ServerResponse.Header or (if a response was
  4213  // returned at all) in error.(*googleapi.Error).Header. Use
  4214  // googleapi.IsNotModified to check whether the returned error was because
  4215  // http.StatusNotModified was returned.
  4216  func (c *ProjectsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDatastoreAdminV1Index, error) {
  4217  	gensupport.SetOptions(c.urlParams_, opts...)
  4218  	res, err := c.doRequest("json")
  4219  	if res != nil && res.StatusCode == http.StatusNotModified {
  4220  		if res.Body != nil {
  4221  			res.Body.Close()
  4222  		}
  4223  		return nil, gensupport.WrapError(&googleapi.Error{
  4224  			Code:   res.StatusCode,
  4225  			Header: res.Header,
  4226  		})
  4227  	}
  4228  	if err != nil {
  4229  		return nil, err
  4230  	}
  4231  	defer googleapi.CloseBody(res)
  4232  	if err := googleapi.CheckResponse(res); err != nil {
  4233  		return nil, gensupport.WrapError(err)
  4234  	}
  4235  	ret := &GoogleDatastoreAdminV1Index{
  4236  		ServerResponse: googleapi.ServerResponse{
  4237  			Header:         res.Header,
  4238  			HTTPStatusCode: res.StatusCode,
  4239  		},
  4240  	}
  4241  	target := &ret
  4242  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4243  		return nil, err
  4244  	}
  4245  	return ret, nil
  4246  }
  4247  
  4248  type ProjectsIndexesListCall struct {
  4249  	s            *Service
  4250  	projectId    string
  4251  	urlParams_   gensupport.URLParams
  4252  	ifNoneMatch_ string
  4253  	ctx_         context.Context
  4254  	header_      http.Header
  4255  }
  4256  
  4257  // List: Lists the indexes that match the specified filters. Datastore uses an
  4258  // eventually consistent query to fetch the list of indexes and may
  4259  // occasionally return stale results.
  4260  //
  4261  // - projectId: Project ID against which to make the request.
  4262  func (r *ProjectsIndexesService) List(projectId string) *ProjectsIndexesListCall {
  4263  	c := &ProjectsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4264  	c.projectId = projectId
  4265  	return c
  4266  }
  4267  
  4268  // Filter sets the optional parameter "filter":
  4269  func (c *ProjectsIndexesListCall) Filter(filter string) *ProjectsIndexesListCall {
  4270  	c.urlParams_.Set("filter", filter)
  4271  	return c
  4272  }
  4273  
  4274  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4275  // to return. If zero, then all results will be returned.
  4276  func (c *ProjectsIndexesListCall) PageSize(pageSize int64) *ProjectsIndexesListCall {
  4277  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4278  	return c
  4279  }
  4280  
  4281  // PageToken sets the optional parameter "pageToken": The next_page_token value
  4282  // returned from a previous List request, if any.
  4283  func (c *ProjectsIndexesListCall) PageToken(pageToken string) *ProjectsIndexesListCall {
  4284  	c.urlParams_.Set("pageToken", pageToken)
  4285  	return c
  4286  }
  4287  
  4288  // Fields allows partial responses to be retrieved. See
  4289  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4290  // details.
  4291  func (c *ProjectsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsIndexesListCall {
  4292  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4293  	return c
  4294  }
  4295  
  4296  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4297  // object's ETag matches the given value. This is useful for getting updates
  4298  // only after the object has changed since the last request.
  4299  func (c *ProjectsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsIndexesListCall {
  4300  	c.ifNoneMatch_ = entityTag
  4301  	return c
  4302  }
  4303  
  4304  // Context sets the context to be used in this call's Do method.
  4305  func (c *ProjectsIndexesListCall) Context(ctx context.Context) *ProjectsIndexesListCall {
  4306  	c.ctx_ = ctx
  4307  	return c
  4308  }
  4309  
  4310  // Header returns a http.Header that can be modified by the caller to add
  4311  // headers to the request.
  4312  func (c *ProjectsIndexesListCall) Header() http.Header {
  4313  	if c.header_ == nil {
  4314  		c.header_ = make(http.Header)
  4315  	}
  4316  	return c.header_
  4317  }
  4318  
  4319  func (c *ProjectsIndexesListCall) doRequest(alt string) (*http.Response, error) {
  4320  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4321  	if c.ifNoneMatch_ != "" {
  4322  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4323  	}
  4324  	var body io.Reader = nil
  4325  	c.urlParams_.Set("alt", alt)
  4326  	c.urlParams_.Set("prettyPrint", "false")
  4327  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/indexes")
  4328  	urls += "?" + c.urlParams_.Encode()
  4329  	req, err := http.NewRequest("GET", urls, body)
  4330  	if err != nil {
  4331  		return nil, err
  4332  	}
  4333  	req.Header = reqHeaders
  4334  	googleapi.Expand(req.URL, map[string]string{
  4335  		"projectId": c.projectId,
  4336  	})
  4337  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4338  }
  4339  
  4340  // Do executes the "datastore.projects.indexes.list" call.
  4341  // Any non-2xx status code is an error. Response headers are in either
  4342  // *GoogleDatastoreAdminV1ListIndexesResponse.ServerResponse.Header or (if a
  4343  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4344  // googleapi.IsNotModified to check whether the returned error was because
  4345  // http.StatusNotModified was returned.
  4346  func (c *ProjectsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleDatastoreAdminV1ListIndexesResponse, error) {
  4347  	gensupport.SetOptions(c.urlParams_, opts...)
  4348  	res, err := c.doRequest("json")
  4349  	if res != nil && res.StatusCode == http.StatusNotModified {
  4350  		if res.Body != nil {
  4351  			res.Body.Close()
  4352  		}
  4353  		return nil, gensupport.WrapError(&googleapi.Error{
  4354  			Code:   res.StatusCode,
  4355  			Header: res.Header,
  4356  		})
  4357  	}
  4358  	if err != nil {
  4359  		return nil, err
  4360  	}
  4361  	defer googleapi.CloseBody(res)
  4362  	if err := googleapi.CheckResponse(res); err != nil {
  4363  		return nil, gensupport.WrapError(err)
  4364  	}
  4365  	ret := &GoogleDatastoreAdminV1ListIndexesResponse{
  4366  		ServerResponse: googleapi.ServerResponse{
  4367  			Header:         res.Header,
  4368  			HTTPStatusCode: res.StatusCode,
  4369  		},
  4370  	}
  4371  	target := &ret
  4372  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4373  		return nil, err
  4374  	}
  4375  	return ret, nil
  4376  }
  4377  
  4378  // Pages invokes f for each page of results.
  4379  // A non-nil error returned from f will halt the iteration.
  4380  // The provided context supersedes any context provided to the Context method.
  4381  func (c *ProjectsIndexesListCall) Pages(ctx context.Context, f func(*GoogleDatastoreAdminV1ListIndexesResponse) error) error {
  4382  	c.ctx_ = ctx
  4383  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4384  	for {
  4385  		x, err := c.Do()
  4386  		if err != nil {
  4387  			return err
  4388  		}
  4389  		if err := f(x); err != nil {
  4390  			return err
  4391  		}
  4392  		if x.NextPageToken == "" {
  4393  			return nil
  4394  		}
  4395  		c.PageToken(x.NextPageToken)
  4396  	}
  4397  }
  4398  
  4399  type ProjectsOperationsCancelCall struct {
  4400  	s          *Service
  4401  	name       string
  4402  	urlParams_ gensupport.URLParams
  4403  	ctx_       context.Context
  4404  	header_    http.Header
  4405  }
  4406  
  4407  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  4408  // server makes a best effort to cancel the operation, but success is not
  4409  // guaranteed. If the server doesn't support this method, it returns
  4410  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  4411  // other methods to check whether the cancellation succeeded or whether the
  4412  // operation completed despite cancellation. On successful cancellation, the
  4413  // operation is not deleted; instead, it becomes an operation with an
  4414  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  4415  // `Code.CANCELLED`.
  4416  //
  4417  // - name: The name of the operation resource to be cancelled.
  4418  func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
  4419  	c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4420  	c.name = name
  4421  	return c
  4422  }
  4423  
  4424  // Fields allows partial responses to be retrieved. See
  4425  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4426  // details.
  4427  func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
  4428  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4429  	return c
  4430  }
  4431  
  4432  // Context sets the context to be used in this call's Do method.
  4433  func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
  4434  	c.ctx_ = ctx
  4435  	return c
  4436  }
  4437  
  4438  // Header returns a http.Header that can be modified by the caller to add
  4439  // headers to the request.
  4440  func (c *ProjectsOperationsCancelCall) Header() http.Header {
  4441  	if c.header_ == nil {
  4442  		c.header_ = make(http.Header)
  4443  	}
  4444  	return c.header_
  4445  }
  4446  
  4447  func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4448  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4449  	var body io.Reader = nil
  4450  	c.urlParams_.Set("alt", alt)
  4451  	c.urlParams_.Set("prettyPrint", "false")
  4452  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  4453  	urls += "?" + c.urlParams_.Encode()
  4454  	req, err := http.NewRequest("POST", urls, body)
  4455  	if err != nil {
  4456  		return nil, err
  4457  	}
  4458  	req.Header = reqHeaders
  4459  	googleapi.Expand(req.URL, map[string]string{
  4460  		"name": c.name,
  4461  	})
  4462  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4463  }
  4464  
  4465  // Do executes the "datastore.projects.operations.cancel" call.
  4466  // Any non-2xx status code is an error. Response headers are in either
  4467  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4468  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4469  // whether the returned error was because http.StatusNotModified was returned.
  4470  func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4471  	gensupport.SetOptions(c.urlParams_, opts...)
  4472  	res, err := c.doRequest("json")
  4473  	if res != nil && res.StatusCode == http.StatusNotModified {
  4474  		if res.Body != nil {
  4475  			res.Body.Close()
  4476  		}
  4477  		return nil, gensupport.WrapError(&googleapi.Error{
  4478  			Code:   res.StatusCode,
  4479  			Header: res.Header,
  4480  		})
  4481  	}
  4482  	if err != nil {
  4483  		return nil, err
  4484  	}
  4485  	defer googleapi.CloseBody(res)
  4486  	if err := googleapi.CheckResponse(res); err != nil {
  4487  		return nil, gensupport.WrapError(err)
  4488  	}
  4489  	ret := &Empty{
  4490  		ServerResponse: googleapi.ServerResponse{
  4491  			Header:         res.Header,
  4492  			HTTPStatusCode: res.StatusCode,
  4493  		},
  4494  	}
  4495  	target := &ret
  4496  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4497  		return nil, err
  4498  	}
  4499  	return ret, nil
  4500  }
  4501  
  4502  type ProjectsOperationsDeleteCall struct {
  4503  	s          *Service
  4504  	name       string
  4505  	urlParams_ gensupport.URLParams
  4506  	ctx_       context.Context
  4507  	header_    http.Header
  4508  }
  4509  
  4510  // Delete: Deletes a long-running operation. This method indicates that the
  4511  // client is no longer interested in the operation result. It does not cancel
  4512  // the operation. If the server doesn't support this method, it returns
  4513  // `google.rpc.Code.UNIMPLEMENTED`.
  4514  //
  4515  // - name: The name of the operation resource to be deleted.
  4516  func (r *ProjectsOperationsService) Delete(name string) *ProjectsOperationsDeleteCall {
  4517  	c := &ProjectsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4518  	c.name = name
  4519  	return c
  4520  }
  4521  
  4522  // Fields allows partial responses to be retrieved. See
  4523  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4524  // details.
  4525  func (c *ProjectsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsOperationsDeleteCall {
  4526  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4527  	return c
  4528  }
  4529  
  4530  // Context sets the context to be used in this call's Do method.
  4531  func (c *ProjectsOperationsDeleteCall) Context(ctx context.Context) *ProjectsOperationsDeleteCall {
  4532  	c.ctx_ = ctx
  4533  	return c
  4534  }
  4535  
  4536  // Header returns a http.Header that can be modified by the caller to add
  4537  // headers to the request.
  4538  func (c *ProjectsOperationsDeleteCall) Header() http.Header {
  4539  	if c.header_ == nil {
  4540  		c.header_ = make(http.Header)
  4541  	}
  4542  	return c.header_
  4543  }
  4544  
  4545  func (c *ProjectsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4546  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4547  	var body io.Reader = nil
  4548  	c.urlParams_.Set("alt", alt)
  4549  	c.urlParams_.Set("prettyPrint", "false")
  4550  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4551  	urls += "?" + c.urlParams_.Encode()
  4552  	req, err := http.NewRequest("DELETE", urls, body)
  4553  	if err != nil {
  4554  		return nil, err
  4555  	}
  4556  	req.Header = reqHeaders
  4557  	googleapi.Expand(req.URL, map[string]string{
  4558  		"name": c.name,
  4559  	})
  4560  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4561  }
  4562  
  4563  // Do executes the "datastore.projects.operations.delete" call.
  4564  // Any non-2xx status code is an error. Response headers are in either
  4565  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4566  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4567  // whether the returned error was because http.StatusNotModified was returned.
  4568  func (c *ProjectsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4569  	gensupport.SetOptions(c.urlParams_, opts...)
  4570  	res, err := c.doRequest("json")
  4571  	if res != nil && res.StatusCode == http.StatusNotModified {
  4572  		if res.Body != nil {
  4573  			res.Body.Close()
  4574  		}
  4575  		return nil, gensupport.WrapError(&googleapi.Error{
  4576  			Code:   res.StatusCode,
  4577  			Header: res.Header,
  4578  		})
  4579  	}
  4580  	if err != nil {
  4581  		return nil, err
  4582  	}
  4583  	defer googleapi.CloseBody(res)
  4584  	if err := googleapi.CheckResponse(res); err != nil {
  4585  		return nil, gensupport.WrapError(err)
  4586  	}
  4587  	ret := &Empty{
  4588  		ServerResponse: googleapi.ServerResponse{
  4589  			Header:         res.Header,
  4590  			HTTPStatusCode: res.StatusCode,
  4591  		},
  4592  	}
  4593  	target := &ret
  4594  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4595  		return nil, err
  4596  	}
  4597  	return ret, nil
  4598  }
  4599  
  4600  type ProjectsOperationsGetCall struct {
  4601  	s            *Service
  4602  	name         string
  4603  	urlParams_   gensupport.URLParams
  4604  	ifNoneMatch_ string
  4605  	ctx_         context.Context
  4606  	header_      http.Header
  4607  }
  4608  
  4609  // Get: Gets the latest state of a long-running operation. Clients can use this
  4610  // method to poll the operation result at intervals as recommended by the API
  4611  // service.
  4612  //
  4613  // - name: The name of the operation resource.
  4614  func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
  4615  	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4616  	c.name = name
  4617  	return c
  4618  }
  4619  
  4620  // Fields allows partial responses to be retrieved. See
  4621  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4622  // details.
  4623  func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
  4624  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4625  	return c
  4626  }
  4627  
  4628  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4629  // object's ETag matches the given value. This is useful for getting updates
  4630  // only after the object has changed since the last request.
  4631  func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
  4632  	c.ifNoneMatch_ = entityTag
  4633  	return c
  4634  }
  4635  
  4636  // Context sets the context to be used in this call's Do method.
  4637  func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
  4638  	c.ctx_ = ctx
  4639  	return c
  4640  }
  4641  
  4642  // Header returns a http.Header that can be modified by the caller to add
  4643  // headers to the request.
  4644  func (c *ProjectsOperationsGetCall) Header() http.Header {
  4645  	if c.header_ == nil {
  4646  		c.header_ = make(http.Header)
  4647  	}
  4648  	return c.header_
  4649  }
  4650  
  4651  func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4652  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4653  	if c.ifNoneMatch_ != "" {
  4654  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4655  	}
  4656  	var body io.Reader = nil
  4657  	c.urlParams_.Set("alt", alt)
  4658  	c.urlParams_.Set("prettyPrint", "false")
  4659  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4660  	urls += "?" + c.urlParams_.Encode()
  4661  	req, err := http.NewRequest("GET", urls, body)
  4662  	if err != nil {
  4663  		return nil, err
  4664  	}
  4665  	req.Header = reqHeaders
  4666  	googleapi.Expand(req.URL, map[string]string{
  4667  		"name": c.name,
  4668  	})
  4669  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4670  }
  4671  
  4672  // Do executes the "datastore.projects.operations.get" call.
  4673  // Any non-2xx status code is an error. Response headers are in either
  4674  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4675  // returned at all) in error.(*googleapi.Error).Header. Use
  4676  // googleapi.IsNotModified to check whether the returned error was because
  4677  // http.StatusNotModified was returned.
  4678  func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4679  	gensupport.SetOptions(c.urlParams_, opts...)
  4680  	res, err := c.doRequest("json")
  4681  	if res != nil && res.StatusCode == http.StatusNotModified {
  4682  		if res.Body != nil {
  4683  			res.Body.Close()
  4684  		}
  4685  		return nil, gensupport.WrapError(&googleapi.Error{
  4686  			Code:   res.StatusCode,
  4687  			Header: res.Header,
  4688  		})
  4689  	}
  4690  	if err != nil {
  4691  		return nil, err
  4692  	}
  4693  	defer googleapi.CloseBody(res)
  4694  	if err := googleapi.CheckResponse(res); err != nil {
  4695  		return nil, gensupport.WrapError(err)
  4696  	}
  4697  	ret := &GoogleLongrunningOperation{
  4698  		ServerResponse: googleapi.ServerResponse{
  4699  			Header:         res.Header,
  4700  			HTTPStatusCode: res.StatusCode,
  4701  		},
  4702  	}
  4703  	target := &ret
  4704  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4705  		return nil, err
  4706  	}
  4707  	return ret, nil
  4708  }
  4709  
  4710  type ProjectsOperationsListCall struct {
  4711  	s            *Service
  4712  	name         string
  4713  	urlParams_   gensupport.URLParams
  4714  	ifNoneMatch_ string
  4715  	ctx_         context.Context
  4716  	header_      http.Header
  4717  }
  4718  
  4719  // List: Lists operations that match the specified filter in the request. If
  4720  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4721  //
  4722  // - name: The name of the operation's parent resource.
  4723  func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
  4724  	c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4725  	c.name = name
  4726  	return c
  4727  }
  4728  
  4729  // Filter sets the optional parameter "filter": The standard list filter.
  4730  func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
  4731  	c.urlParams_.Set("filter", filter)
  4732  	return c
  4733  }
  4734  
  4735  // PageSize sets the optional parameter "pageSize": The standard list page
  4736  // size.
  4737  func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
  4738  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4739  	return c
  4740  }
  4741  
  4742  // PageToken sets the optional parameter "pageToken": The standard list page
  4743  // token.
  4744  func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
  4745  	c.urlParams_.Set("pageToken", pageToken)
  4746  	return c
  4747  }
  4748  
  4749  // Fields allows partial responses to be retrieved. See
  4750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4751  // details.
  4752  func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
  4753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4754  	return c
  4755  }
  4756  
  4757  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4758  // object's ETag matches the given value. This is useful for getting updates
  4759  // only after the object has changed since the last request.
  4760  func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
  4761  	c.ifNoneMatch_ = entityTag
  4762  	return c
  4763  }
  4764  
  4765  // Context sets the context to be used in this call's Do method.
  4766  func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
  4767  	c.ctx_ = ctx
  4768  	return c
  4769  }
  4770  
  4771  // Header returns a http.Header that can be modified by the caller to add
  4772  // headers to the request.
  4773  func (c *ProjectsOperationsListCall) Header() http.Header {
  4774  	if c.header_ == nil {
  4775  		c.header_ = make(http.Header)
  4776  	}
  4777  	return c.header_
  4778  }
  4779  
  4780  func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4781  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4782  	if c.ifNoneMatch_ != "" {
  4783  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4784  	}
  4785  	var body io.Reader = nil
  4786  	c.urlParams_.Set("alt", alt)
  4787  	c.urlParams_.Set("prettyPrint", "false")
  4788  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  4789  	urls += "?" + c.urlParams_.Encode()
  4790  	req, err := http.NewRequest("GET", urls, body)
  4791  	if err != nil {
  4792  		return nil, err
  4793  	}
  4794  	req.Header = reqHeaders
  4795  	googleapi.Expand(req.URL, map[string]string{
  4796  		"name": c.name,
  4797  	})
  4798  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4799  }
  4800  
  4801  // Do executes the "datastore.projects.operations.list" call.
  4802  // Any non-2xx status code is an error. Response headers are in either
  4803  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  4804  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4805  // googleapi.IsNotModified to check whether the returned error was because
  4806  // http.StatusNotModified was returned.
  4807  func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  4808  	gensupport.SetOptions(c.urlParams_, opts...)
  4809  	res, err := c.doRequest("json")
  4810  	if res != nil && res.StatusCode == http.StatusNotModified {
  4811  		if res.Body != nil {
  4812  			res.Body.Close()
  4813  		}
  4814  		return nil, gensupport.WrapError(&googleapi.Error{
  4815  			Code:   res.StatusCode,
  4816  			Header: res.Header,
  4817  		})
  4818  	}
  4819  	if err != nil {
  4820  		return nil, err
  4821  	}
  4822  	defer googleapi.CloseBody(res)
  4823  	if err := googleapi.CheckResponse(res); err != nil {
  4824  		return nil, gensupport.WrapError(err)
  4825  	}
  4826  	ret := &GoogleLongrunningListOperationsResponse{
  4827  		ServerResponse: googleapi.ServerResponse{
  4828  			Header:         res.Header,
  4829  			HTTPStatusCode: res.StatusCode,
  4830  		},
  4831  	}
  4832  	target := &ret
  4833  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4834  		return nil, err
  4835  	}
  4836  	return ret, nil
  4837  }
  4838  
  4839  // Pages invokes f for each page of results.
  4840  // A non-nil error returned from f will halt the iteration.
  4841  // The provided context supersedes any context provided to the Context method.
  4842  func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  4843  	c.ctx_ = ctx
  4844  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4845  	for {
  4846  		x, err := c.Do()
  4847  		if err != nil {
  4848  			return err
  4849  		}
  4850  		if err := f(x); err != nil {
  4851  			return err
  4852  		}
  4853  		if x.NextPageToken == "" {
  4854  			return nil
  4855  		}
  4856  		c.PageToken(x.NextPageToken)
  4857  	}
  4858  }
  4859  

View as plain text