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/v1beta3" 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/v1beta3" 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:v1beta3" 97 const apiName = "datastore" 98 const apiVersion = "v1beta3" 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 return rs 171 } 172 173 type ProjectsService struct { 174 s *Service 175 } 176 177 // Aggregation: Defines an aggregation that produces a single result. 178 type Aggregation struct { 179 // Alias: Optional. Optional name of the property to store the result of the 180 // aggregation. If not provided, Datastore will pick a default name following 181 // the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS 182 // count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) 183 // OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, 184 // COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS 185 // property_2 OVER ( ... ); ``` Requires: * Must be unique across all 186 // aggregation aliases. * Conform to entity property name limitations. 187 Alias string `json:"alias,omitempty"` 188 // Avg: Average aggregator. 189 Avg *Avg `json:"avg,omitempty"` 190 // Count: Count aggregator. 191 Count *Count `json:"count,omitempty"` 192 // Sum: Sum aggregator. 193 Sum *Sum `json:"sum,omitempty"` 194 // ForceSendFields is a list of field names (e.g. "Alias") to unconditionally 195 // include in API requests. By default, fields with empty or default values are 196 // omitted from API requests. See 197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 198 // details. 199 ForceSendFields []string `json:"-"` 200 // NullFields is a list of field names (e.g. "Alias") to include in API 201 // requests with the JSON null value. By default, fields with empty values are 202 // omitted from API requests. See 203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 204 NullFields []string `json:"-"` 205 } 206 207 func (s *Aggregation) MarshalJSON() ([]byte, error) { 208 type NoMethod Aggregation 209 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 210 } 211 212 // AggregationQuery: Datastore query for running an aggregation over a Query. 213 type AggregationQuery struct { 214 // Aggregations: Optional. Series of aggregations to apply over the results of 215 // the `nested_query`. Requires: * A minimum of one and maximum of five 216 // aggregations per query. 217 Aggregations []*Aggregation `json:"aggregations,omitempty"` 218 // NestedQuery: Nested query for aggregation 219 NestedQuery *Query `json:"nestedQuery,omitempty"` 220 // ForceSendFields is a list of field names (e.g. "Aggregations") to 221 // unconditionally include in API requests. By default, fields with empty or 222 // default values are omitted from API requests. See 223 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 224 // details. 225 ForceSendFields []string `json:"-"` 226 // NullFields is a list of field names (e.g. "Aggregations") to include in API 227 // requests with the JSON null value. By default, fields with empty values are 228 // omitted from API requests. See 229 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 230 NullFields []string `json:"-"` 231 } 232 233 func (s *AggregationQuery) MarshalJSON() ([]byte, error) { 234 type NoMethod AggregationQuery 235 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 236 } 237 238 // AggregationResult: The result of a single bucket from a Datastore 239 // aggregation query. The keys of `aggregate_properties` are the same for all 240 // results in an aggregation query, unlike entity queries which can have 241 // different fields present for each result. 242 type AggregationResult struct { 243 // AggregateProperties: The result of the aggregation functions, ex: `COUNT(*) 244 // AS total_entities`. The key is the alias assigned to the aggregation 245 // function on input and the size of this map equals the number of aggregation 246 // functions in the query. 247 AggregateProperties map[string]Value `json:"aggregateProperties,omitempty"` 248 // ForceSendFields is a list of field names (e.g. "AggregateProperties") to 249 // unconditionally include in API requests. By default, fields with empty or 250 // default values are omitted from API requests. See 251 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 252 // details. 253 ForceSendFields []string `json:"-"` 254 // NullFields is a list of field names (e.g. "AggregateProperties") to include 255 // in API requests with the JSON null value. By default, fields with empty 256 // values are omitted from API requests. See 257 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 258 NullFields []string `json:"-"` 259 } 260 261 func (s *AggregationResult) MarshalJSON() ([]byte, error) { 262 type NoMethod AggregationResult 263 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 264 } 265 266 // AggregationResultBatch: A batch of aggregation results produced by an 267 // aggregation query. 268 type AggregationResultBatch struct { 269 // AggregationResults: The aggregation results for this batch. 270 AggregationResults []*AggregationResult `json:"aggregationResults,omitempty"` 271 // MoreResults: The state of the query after the current batch. Only COUNT(*) 272 // aggregations are supported in the initial launch. Therefore, expected result 273 // type is limited to `NO_MORE_RESULTS`. 274 // 275 // Possible values: 276 // "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never used. 277 // "NOT_FINISHED" - There may be additional batches to fetch from this query. 278 // "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may be more 279 // results after the limit. 280 // "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may be more 281 // results after the end cursor. 282 // "NO_MORE_RESULTS" - The query is finished, and there are no more results. 283 MoreResults string `json:"moreResults,omitempty"` 284 // ReadTime: Read timestamp this batch was returned from. In a single 285 // transaction, subsequent query result batches for the same query can have a 286 // greater timestamp. Each batch's read timestamp is valid for all preceding 287 // batches. 288 ReadTime string `json:"readTime,omitempty"` 289 // ForceSendFields is a list of field names (e.g. "AggregationResults") to 290 // unconditionally include in API requests. By default, fields with empty or 291 // default values are omitted from API requests. See 292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 293 // details. 294 ForceSendFields []string `json:"-"` 295 // NullFields is a list of field names (e.g. "AggregationResults") to include 296 // in API requests with the JSON null value. By default, fields with empty 297 // values are omitted from API requests. See 298 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 299 NullFields []string `json:"-"` 300 } 301 302 func (s *AggregationResultBatch) MarshalJSON() ([]byte, error) { 303 type NoMethod AggregationResultBatch 304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 305 } 306 307 // AllocateIdsRequest: The request for Datastore.AllocateIds. 308 type AllocateIdsRequest struct { 309 // Keys: Required. A list of keys with incomplete key paths for which to 310 // allocate IDs. No key may be reserved/read-only. 311 Keys []*Key `json:"keys,omitempty"` 312 // ForceSendFields is a list of field names (e.g. "Keys") to unconditionally 313 // include in API requests. By default, fields with empty or default values are 314 // omitted from API requests. See 315 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 316 // details. 317 ForceSendFields []string `json:"-"` 318 // NullFields is a list of field names (e.g. "Keys") to include in API requests 319 // with the JSON null value. By default, fields with empty values are omitted 320 // from API requests. See 321 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 322 NullFields []string `json:"-"` 323 } 324 325 func (s *AllocateIdsRequest) MarshalJSON() ([]byte, error) { 326 type NoMethod AllocateIdsRequest 327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 328 } 329 330 // AllocateIdsResponse: The response for Datastore.AllocateIds. 331 type AllocateIdsResponse struct { 332 // Keys: The keys specified in the request (in the same order), each with its 333 // key path completed with a newly allocated ID. 334 Keys []*Key `json:"keys,omitempty"` 335 336 // ServerResponse contains the HTTP response code and headers from the server. 337 googleapi.ServerResponse `json:"-"` 338 // ForceSendFields is a list of field names (e.g. "Keys") to unconditionally 339 // include in API requests. By default, fields with empty or default values are 340 // omitted from API requests. See 341 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 342 // details. 343 ForceSendFields []string `json:"-"` 344 // NullFields is a list of field names (e.g. "Keys") to include in API requests 345 // with the JSON null value. By default, fields with empty values are omitted 346 // from API requests. See 347 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 348 NullFields []string `json:"-"` 349 } 350 351 func (s *AllocateIdsResponse) MarshalJSON() ([]byte, error) { 352 type NoMethod AllocateIdsResponse 353 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 354 } 355 356 // ArrayValue: An array value. 357 type ArrayValue struct { 358 // Values: Values in the array. The order of values in an array is preserved as 359 // long as all values have identical settings for 'exclude_from_indexes'. 360 Values []*Value `json:"values,omitempty"` 361 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 362 // include in API requests. By default, fields with empty or default values are 363 // omitted from API requests. See 364 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 365 // details. 366 ForceSendFields []string `json:"-"` 367 // NullFields is a list of field names (e.g. "Values") to include in API 368 // requests with the JSON null value. By default, fields with empty values are 369 // omitted from API requests. See 370 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 371 NullFields []string `json:"-"` 372 } 373 374 func (s *ArrayValue) MarshalJSON() ([]byte, error) { 375 type NoMethod ArrayValue 376 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 377 } 378 379 // Avg: Average of the values of the requested property. * Only numeric values 380 // will be aggregated. All non-numeric values including `NULL` are skipped. * 381 // If the aggregated values contain `NaN`, returns `NaN`. Infinity math follows 382 // IEEE-754 standards. * If the aggregated value set is empty, returns `NULL`. 383 // * Always returns the result as a double. 384 type Avg struct { 385 // Property: The property to aggregate on. 386 Property *PropertyReference `json:"property,omitempty"` 387 // ForceSendFields is a list of field names (e.g. "Property") to 388 // unconditionally include in API requests. By default, fields with empty or 389 // default values are omitted from API requests. See 390 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 391 // details. 392 ForceSendFields []string `json:"-"` 393 // NullFields is a list of field names (e.g. "Property") to include in API 394 // requests with the JSON null value. By default, fields with empty values are 395 // omitted from API requests. See 396 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 397 NullFields []string `json:"-"` 398 } 399 400 func (s *Avg) MarshalJSON() ([]byte, error) { 401 type NoMethod Avg 402 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 403 } 404 405 // BeginTransactionRequest: The request for Datastore.BeginTransaction. 406 type BeginTransactionRequest struct { 407 // TransactionOptions: Options for a new transaction. 408 TransactionOptions *TransactionOptions `json:"transactionOptions,omitempty"` 409 // ForceSendFields is a list of field names (e.g. "TransactionOptions") to 410 // unconditionally include in API requests. By default, fields with empty or 411 // default values are omitted from API requests. See 412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 413 // details. 414 ForceSendFields []string `json:"-"` 415 // NullFields is a list of field names (e.g. "TransactionOptions") to include 416 // in API requests with the JSON null value. By default, fields with empty 417 // values are omitted from API requests. See 418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 419 NullFields []string `json:"-"` 420 } 421 422 func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) { 423 type NoMethod BeginTransactionRequest 424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 425 } 426 427 // BeginTransactionResponse: The response for Datastore.BeginTransaction. 428 type BeginTransactionResponse struct { 429 // Transaction: The transaction identifier (always present). 430 Transaction string `json:"transaction,omitempty"` 431 432 // ServerResponse contains the HTTP response code and headers from the server. 433 googleapi.ServerResponse `json:"-"` 434 // ForceSendFields is a list of field names (e.g. "Transaction") to 435 // unconditionally include in API requests. By default, fields with empty or 436 // default values are omitted from API requests. See 437 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 438 // details. 439 ForceSendFields []string `json:"-"` 440 // NullFields is a list of field names (e.g. "Transaction") to include in API 441 // requests with the JSON null value. By default, fields with empty values are 442 // omitted from API requests. See 443 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 444 NullFields []string `json:"-"` 445 } 446 447 func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) { 448 type NoMethod BeginTransactionResponse 449 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 450 } 451 452 // CommitRequest: The request for Datastore.Commit. 453 type CommitRequest struct { 454 // Mode: The type of commit to perform. Defaults to `TRANSACTIONAL`. 455 // 456 // Possible values: 457 // "MODE_UNSPECIFIED" - Unspecified. This value must not be used. 458 // "TRANSACTIONAL" - Transactional: The mutations are either all applied, or 459 // none are applied. Learn about transactions 460 // [here](https://cloud.google.com/datastore/docs/concepts/transactions). 461 // "NON_TRANSACTIONAL" - Non-transactional: The mutations may not apply as 462 // all or none. 463 Mode string `json:"mode,omitempty"` 464 // Mutations: The mutations to perform. When mode is `TRANSACTIONAL`, mutations 465 // affecting a single entity are applied in order. The following sequences of 466 // mutations affecting a single entity are not permitted in a single `Commit` 467 // request: - `insert` followed by `insert` - `update` followed by `insert` - 468 // `upsert` followed by `insert` - `delete` followed by `update` When mode is 469 // `NON_TRANSACTIONAL`, no two mutations may affect a single entity. 470 Mutations []*Mutation `json:"mutations,omitempty"` 471 // Transaction: The identifier of the transaction associated with the commit. A 472 // transaction identifier is returned by a call to Datastore.BeginTransaction. 473 Transaction string `json:"transaction,omitempty"` 474 // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally 475 // include in API requests. By default, fields with empty or default values are 476 // omitted from API requests. See 477 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 478 // details. 479 ForceSendFields []string `json:"-"` 480 // NullFields is a list of field names (e.g. "Mode") to include in API requests 481 // with the JSON null value. By default, fields with empty values are omitted 482 // from API requests. See 483 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 484 NullFields []string `json:"-"` 485 } 486 487 func (s *CommitRequest) MarshalJSON() ([]byte, error) { 488 type NoMethod CommitRequest 489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 490 } 491 492 // CommitResponse: The response for Datastore.Commit. 493 type CommitResponse struct { 494 // CommitTime: The transaction commit timestamp. Not set for non-transactional 495 // commits. 496 CommitTime string `json:"commitTime,omitempty"` 497 // IndexUpdates: The number of index entries updated during the commit, or zero 498 // if none were updated. 499 IndexUpdates int64 `json:"indexUpdates,omitempty"` 500 // MutationResults: The result of performing the mutations. The i-th mutation 501 // result corresponds to the i-th mutation in the request. 502 MutationResults []*MutationResult `json:"mutationResults,omitempty"` 503 504 // ServerResponse contains the HTTP response code and headers from the server. 505 googleapi.ServerResponse `json:"-"` 506 // ForceSendFields is a list of field names (e.g. "CommitTime") to 507 // unconditionally include in API requests. By default, fields with empty or 508 // default values are omitted from API requests. See 509 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 510 // details. 511 ForceSendFields []string `json:"-"` 512 // NullFields is a list of field names (e.g. "CommitTime") to include in API 513 // requests with the JSON null value. By default, fields with empty values are 514 // omitted from API requests. See 515 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 516 NullFields []string `json:"-"` 517 } 518 519 func (s *CommitResponse) MarshalJSON() ([]byte, error) { 520 type NoMethod CommitResponse 521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 522 } 523 524 // CompositeFilter: A filter that merges multiple other filters using the given 525 // operator. 526 type CompositeFilter struct { 527 // Filters: The list of filters to combine. Requires: * At least one filter is 528 // present. 529 Filters []*Filter `json:"filters,omitempty"` 530 // Op: The operator for combining multiple filters. 531 // 532 // Possible values: 533 // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used. 534 // "AND" - The results are required to satisfy each of the combined filters. 535 // "OR" - Documents are required to satisfy at least one of the combined 536 // filters. 537 Op string `json:"op,omitempty"` 538 // ForceSendFields is a list of field names (e.g. "Filters") to unconditionally 539 // include in API requests. By default, fields with empty or default values are 540 // omitted from API requests. See 541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 542 // details. 543 ForceSendFields []string `json:"-"` 544 // NullFields is a list of field names (e.g. "Filters") to include in API 545 // requests with the JSON null value. By default, fields with empty values are 546 // omitted from API requests. See 547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 548 NullFields []string `json:"-"` 549 } 550 551 func (s *CompositeFilter) MarshalJSON() ([]byte, error) { 552 type NoMethod CompositeFilter 553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 554 } 555 556 // Count: Count of entities that match the query. The `COUNT(*)` aggregation 557 // function operates on the entire entity so it does not require a field 558 // reference. 559 type Count struct { 560 // UpTo: Optional. Optional constraint on the maximum number of entities to 561 // count. This provides a way to set an upper bound on the number of entities 562 // to scan, limiting latency, and cost. Unspecified is interpreted as no bound. 563 // If a zero value is provided, a count result of zero should always be 564 // expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT 565 // * FROM k ); ``` Requires: * Must be non-negative when present. 566 UpTo int64 `json:"upTo,omitempty,string"` 567 // ForceSendFields is a list of field names (e.g. "UpTo") to unconditionally 568 // include in API requests. By default, fields with empty or default values are 569 // omitted from API requests. See 570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 571 // details. 572 ForceSendFields []string `json:"-"` 573 // NullFields is a list of field names (e.g. "UpTo") to include in API requests 574 // with the JSON null value. By default, fields with empty values are omitted 575 // from API requests. See 576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 577 NullFields []string `json:"-"` 578 } 579 580 func (s *Count) MarshalJSON() ([]byte, error) { 581 type NoMethod Count 582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 583 } 584 585 // Entity: A Datastore data object. Must not exceed 1 MiB - 4 bytes. 586 type Entity struct { 587 // Key: The entity's key. An entity must have a key, unless otherwise 588 // documented (for example, an entity in `Value.entity_value` may have no key). 589 // An entity's kind is its key path's last element's kind, or null if it has no 590 // key. 591 Key *Key `json:"key,omitempty"` 592 // Properties: The entity's properties. The map's keys are property names. A 593 // property name matching regex `__.*__` is reserved. A reserved property name 594 // is forbidden in certain documented contexts. The map keys, represented as 595 // UTF-8, must not exceed 1,500 bytes and cannot be empty. 596 Properties map[string]Value `json:"properties,omitempty"` 597 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 598 // include in API requests. By default, fields with empty or default values are 599 // omitted from API requests. See 600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 601 // details. 602 ForceSendFields []string `json:"-"` 603 // NullFields is a list of field names (e.g. "Key") to include in API requests 604 // with the JSON null value. By default, fields with empty values are omitted 605 // from API requests. See 606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 607 NullFields []string `json:"-"` 608 } 609 610 func (s *Entity) MarshalJSON() ([]byte, error) { 611 type NoMethod Entity 612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 613 } 614 615 // EntityResult: The result of fetching an entity from Datastore. 616 type EntityResult struct { 617 // CreateTime: The time at which the entity was created. This field is set for 618 // `FULL` entity results. If this entity is missing, this field will not be 619 // set. 620 CreateTime string `json:"createTime,omitempty"` 621 // Cursor: A cursor that points to the position after the result entity. Set 622 // only when the `EntityResult` is part of a `QueryResultBatch` message. 623 Cursor string `json:"cursor,omitempty"` 624 // Entity: The resulting entity. 625 Entity *Entity `json:"entity,omitempty"` 626 // UpdateTime: The time at which the entity was last changed. This field is set 627 // for `FULL` entity results. If this entity is missing, this field will not be 628 // set. 629 UpdateTime string `json:"updateTime,omitempty"` 630 // Version: The version of the entity, a strictly positive number that 631 // monotonically increases with changes to the entity. This field is set for 632 // `FULL` entity results. For missing entities in `LookupResponse`, this is the 633 // version of the snapshot that was used to look up the entity, and it is 634 // always set except for eventually consistent reads. 635 Version int64 `json:"version,omitempty,string"` 636 // ForceSendFields is a list of field names (e.g. "CreateTime") to 637 // unconditionally include in API requests. By default, fields with empty or 638 // default values are omitted from API requests. See 639 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 640 // details. 641 ForceSendFields []string `json:"-"` 642 // NullFields is a list of field names (e.g. "CreateTime") to include in API 643 // requests with the JSON null value. By default, fields with empty values are 644 // omitted from API requests. See 645 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 646 NullFields []string `json:"-"` 647 } 648 649 func (s *EntityResult) MarshalJSON() ([]byte, error) { 650 type NoMethod EntityResult 651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 652 } 653 654 // ExecutionStats: Execution statistics for the query. 655 type ExecutionStats struct { 656 // DebugStats: Debugging statistics from the execution of the query. Note that 657 // the debugging stats are subject to change as Firestore evolves. It could 658 // include: { "indexes_entries_scanned": "1000", "documents_scanned": "20", 659 // "billing_details" : { "documents_billable": "20", "index_entries_billable": 660 // "1000", "min_query_cost": "0" } } 661 DebugStats googleapi.RawMessage `json:"debugStats,omitempty"` 662 // ExecutionDuration: Total time to execute the query in the backend. 663 ExecutionDuration string `json:"executionDuration,omitempty"` 664 // ReadOperations: Total billable read operations. 665 ReadOperations int64 `json:"readOperations,omitempty,string"` 666 // ResultsReturned: Total number of results returned, including documents, 667 // projections, aggregation results, keys. 668 ResultsReturned int64 `json:"resultsReturned,omitempty,string"` 669 // ForceSendFields is a list of field names (e.g. "DebugStats") to 670 // unconditionally include in API requests. By default, fields with empty or 671 // default values are omitted from API requests. See 672 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 673 // details. 674 ForceSendFields []string `json:"-"` 675 // NullFields is a list of field names (e.g. "DebugStats") to include in API 676 // requests with the JSON null value. By default, fields with empty values are 677 // omitted from API requests. See 678 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 679 NullFields []string `json:"-"` 680 } 681 682 func (s *ExecutionStats) MarshalJSON() ([]byte, error) { 683 type NoMethod ExecutionStats 684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 685 } 686 687 // ExplainMetrics: Explain metrics for the query. 688 type ExplainMetrics struct { 689 // ExecutionStats: Aggregated stats from the execution of the query. Only 690 // present when ExplainOptions.analyze is set to true. 691 ExecutionStats *ExecutionStats `json:"executionStats,omitempty"` 692 // PlanSummary: Planning phase information for the query. 693 PlanSummary *PlanSummary `json:"planSummary,omitempty"` 694 // ForceSendFields is a list of field names (e.g. "ExecutionStats") to 695 // unconditionally include in API requests. By default, fields with empty or 696 // default values are omitted from API requests. See 697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 698 // details. 699 ForceSendFields []string `json:"-"` 700 // NullFields is a list of field names (e.g. "ExecutionStats") to include in 701 // API requests with the JSON null value. By default, fields with empty values 702 // are omitted from API requests. See 703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 704 NullFields []string `json:"-"` 705 } 706 707 func (s *ExplainMetrics) MarshalJSON() ([]byte, error) { 708 type NoMethod ExplainMetrics 709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 710 } 711 712 // ExplainOptions: Explain options for the query. 713 type ExplainOptions struct { 714 // Analyze: Optional. Whether to execute this query. When false (the default), 715 // the query will be planned, returning only metrics from the planning stages. 716 // When true, the query will be planned and executed, returning the full query 717 // results along with both planning and execution stage metrics. 718 Analyze bool `json:"analyze,omitempty"` 719 // ForceSendFields is a list of field names (e.g. "Analyze") to unconditionally 720 // include in API requests. By default, fields with empty or default values are 721 // omitted from API requests. See 722 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 723 // details. 724 ForceSendFields []string `json:"-"` 725 // NullFields is a list of field names (e.g. "Analyze") to include in API 726 // requests with the JSON null value. By default, fields with empty values are 727 // omitted from API requests. See 728 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 729 NullFields []string `json:"-"` 730 } 731 732 func (s *ExplainOptions) MarshalJSON() ([]byte, error) { 733 type NoMethod ExplainOptions 734 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 735 } 736 737 // Filter: A holder for any type of filter. 738 type Filter struct { 739 // CompositeFilter: A composite filter. 740 CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"` 741 // PropertyFilter: A filter on a property. 742 PropertyFilter *PropertyFilter `json:"propertyFilter,omitempty"` 743 // ForceSendFields is a list of field names (e.g. "CompositeFilter") 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. "CompositeFilter") 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 *Filter) MarshalJSON() ([]byte, error) { 757 type NoMethod Filter 758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 759 } 760 761 // GoogleDatastoreAdminV1CommonMetadata: Metadata common to all Datastore Admin 762 // operations. 763 type GoogleDatastoreAdminV1CommonMetadata struct { 764 // EndTime: The time the operation ended, either successfully or otherwise. 765 EndTime string `json:"endTime,omitempty"` 766 // Labels: The client-assigned labels which were provided when the operation 767 // was created. May also include additional labels. 768 Labels map[string]string `json:"labels,omitempty"` 769 // OperationType: The type of the operation. Can be used as a filter in 770 // ListOperationsRequest. 771 // 772 // Possible values: 773 // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. 774 // "EXPORT_ENTITIES" - ExportEntities. 775 // "IMPORT_ENTITIES" - ImportEntities. 776 // "CREATE_INDEX" - CreateIndex. 777 // "DELETE_INDEX" - DeleteIndex. 778 OperationType string `json:"operationType,omitempty"` 779 // StartTime: The time that work began on the operation. 780 StartTime string `json:"startTime,omitempty"` 781 // State: The current state of the Operation. 782 // 783 // Possible values: 784 // "STATE_UNSPECIFIED" - Unspecified. 785 // "INITIALIZING" - Request is being prepared for processing. 786 // "PROCESSING" - Request is actively being processed. 787 // "CANCELLING" - Request is in the process of being cancelled after user 788 // called google.longrunning.Operations.CancelOperation on the operation. 789 // "FINALIZING" - Request has been processed and is in its finalization 790 // stage. 791 // "SUCCESSFUL" - Request has completed successfully. 792 // "FAILED" - Request has finished being processed, but encountered an error. 793 // "CANCELLED" - Request has finished being cancelled after user called 794 // google.longrunning.Operations.CancelOperation. 795 State string `json:"state,omitempty"` 796 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 797 // include in API requests. By default, fields with empty or default values are 798 // omitted from API requests. See 799 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 800 // details. 801 ForceSendFields []string `json:"-"` 802 // NullFields is a list of field names (e.g. "EndTime") to include in API 803 // requests with the JSON null value. By default, fields with empty values are 804 // omitted from API requests. See 805 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 806 NullFields []string `json:"-"` 807 } 808 809 func (s *GoogleDatastoreAdminV1CommonMetadata) MarshalJSON() ([]byte, error) { 810 type NoMethod GoogleDatastoreAdminV1CommonMetadata 811 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 812 } 813 814 // GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata: Metadata for 815 // Datastore to Firestore migration operations. The DatastoreFirestoreMigration 816 // operation is not started by the end-user via an explicit "creation" method. 817 // This is an intentional deviation from the LRO design pattern. This singleton 818 // resource can be accessed at: 819 // "projects/{project_id}/operations/datastore-firestore-migration" 820 type GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata struct { 821 // MigrationState: The current state of migration from Cloud Datastore to Cloud 822 // Firestore in Datastore mode. 823 // 824 // Possible values: 825 // "MIGRATION_STATE_UNSPECIFIED" - Unspecified. 826 // "RUNNING" - The migration is running. 827 // "PAUSED" - The migration is paused. 828 // "COMPLETE" - The migration is complete. 829 MigrationState string `json:"migrationState,omitempty"` 830 // MigrationStep: The current step of migration from Cloud Datastore to Cloud 831 // Firestore in Datastore mode. 832 // 833 // Possible values: 834 // "MIGRATION_STEP_UNSPECIFIED" - Unspecified. 835 // "PREPARE" - Pre-migration: the database is prepared for migration. 836 // "START" - Start of migration. 837 // "APPLY_WRITES_SYNCHRONOUSLY" - Writes are applied synchronously to at 838 // least one replica. 839 // "COPY_AND_VERIFY" - Data is copied to Cloud Firestore and then verified to 840 // match the data in Cloud Datastore. 841 // "REDIRECT_EVENTUALLY_CONSISTENT_READS" - Eventually-consistent reads are 842 // redirected to Cloud Firestore. 843 // "REDIRECT_STRONGLY_CONSISTENT_READS" - Strongly-consistent reads are 844 // redirected to Cloud Firestore. 845 // "REDIRECT_WRITES" - Writes are redirected to Cloud Firestore. 846 MigrationStep string `json:"migrationStep,omitempty"` 847 // ForceSendFields is a list of field names (e.g. "MigrationState") to 848 // unconditionally include in API requests. By default, fields with empty or 849 // default values are omitted from API requests. See 850 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 851 // details. 852 ForceSendFields []string `json:"-"` 853 // NullFields is a list of field names (e.g. "MigrationState") to include in 854 // API requests with the JSON null value. By default, fields with empty values 855 // are omitted from API requests. See 856 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 857 NullFields []string `json:"-"` 858 } 859 860 func (s *GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata) MarshalJSON() ([]byte, error) { 861 type NoMethod GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata 862 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 863 } 864 865 // GoogleDatastoreAdminV1EntityFilter: Identifies a subset of entities in a 866 // project. This is specified as combinations of kinds and namespaces (either 867 // or both of which may be all, as described in the following examples). 868 // Example usage: Entire project: kinds=[], namespace_ids=[] Kinds Foo and Bar 869 // in all namespaces: kinds=['Foo', 'Bar'], namespace_ids=[] Kinds Foo and Bar 870 // only in the default namespace: kinds=['Foo', 'Bar'], namespace_ids=[”] 871 // Kinds Foo and Bar in both the default and Baz namespaces: kinds=['Foo', 872 // 'Bar'], namespace_ids=[”, 'Baz'] The entire Baz namespace: kinds=[], 873 // namespace_ids=['Baz'] 874 type GoogleDatastoreAdminV1EntityFilter struct { 875 // Kinds: If empty, then this represents all kinds. 876 Kinds []string `json:"kinds,omitempty"` 877 // NamespaceIds: An empty list represents all namespaces. This is the preferred 878 // usage for projects that don't use namespaces. An empty string element 879 // represents the default namespace. This should be used if the project has 880 // data in non-default namespaces, but doesn't want to include them. Each 881 // namespace in this list must be unique. 882 NamespaceIds []string `json:"namespaceIds,omitempty"` 883 // ForceSendFields is a list of field names (e.g. "Kinds") to unconditionally 884 // include in API requests. By default, fields with empty or default values are 885 // omitted from API requests. See 886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 887 // details. 888 ForceSendFields []string `json:"-"` 889 // NullFields is a list of field names (e.g. "Kinds") to include in API 890 // requests with the JSON null value. By default, fields with empty values are 891 // omitted from API requests. See 892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 893 NullFields []string `json:"-"` 894 } 895 896 func (s *GoogleDatastoreAdminV1EntityFilter) MarshalJSON() ([]byte, error) { 897 type NoMethod GoogleDatastoreAdminV1EntityFilter 898 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 899 } 900 901 // GoogleDatastoreAdminV1ExportEntitiesMetadata: Metadata for ExportEntities 902 // operations. 903 type GoogleDatastoreAdminV1ExportEntitiesMetadata struct { 904 // Common: Metadata common to all Datastore Admin operations. 905 Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"` 906 // EntityFilter: Description of which entities are being exported. 907 EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"` 908 // OutputUrlPrefix: Location for the export metadata and data files. This will 909 // be the same value as the 910 // google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field. The 911 // final output location is provided in 912 // google.datastore.admin.v1.ExportEntitiesResponse.output_url. 913 OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` 914 // ProgressBytes: An estimate of the number of bytes processed. 915 ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"` 916 // ProgressEntities: An estimate of the number of entities processed. 917 ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"` 918 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally 919 // include in API requests. By default, fields with empty or default values are 920 // omitted from API requests. See 921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 922 // details. 923 ForceSendFields []string `json:"-"` 924 // NullFields is a list of field names (e.g. "Common") to include in API 925 // requests with the JSON null value. By default, fields with empty values are 926 // omitted from API requests. See 927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 928 NullFields []string `json:"-"` 929 } 930 931 func (s *GoogleDatastoreAdminV1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) { 932 type NoMethod GoogleDatastoreAdminV1ExportEntitiesMetadata 933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 934 } 935 936 // GoogleDatastoreAdminV1ExportEntitiesResponse: The response for 937 // google.datastore.admin.v1.DatastoreAdmin.ExportEntities. 938 type GoogleDatastoreAdminV1ExportEntitiesResponse struct { 939 // OutputUrl: Location of the output metadata file. This can be used to begin 940 // an import into Cloud Datastore (this project or another project). See 941 // google.datastore.admin.v1.ImportEntitiesRequest.input_url. Only present if 942 // the operation completed successfully. 943 OutputUrl string `json:"outputUrl,omitempty"` 944 // ForceSendFields is a list of field names (e.g. "OutputUrl") to 945 // unconditionally include in API requests. By default, fields with empty or 946 // default values are omitted from API requests. See 947 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 948 // details. 949 ForceSendFields []string `json:"-"` 950 // NullFields is a list of field names (e.g. "OutputUrl") to include in API 951 // requests with the JSON null value. By default, fields with empty values are 952 // omitted from API requests. See 953 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 954 NullFields []string `json:"-"` 955 } 956 957 func (s *GoogleDatastoreAdminV1ExportEntitiesResponse) MarshalJSON() ([]byte, error) { 958 type NoMethod GoogleDatastoreAdminV1ExportEntitiesResponse 959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 960 } 961 962 // GoogleDatastoreAdminV1ImportEntitiesMetadata: Metadata for ImportEntities 963 // operations. 964 type GoogleDatastoreAdminV1ImportEntitiesMetadata struct { 965 // Common: Metadata common to all Datastore Admin operations. 966 Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"` 967 // EntityFilter: Description of which entities are being imported. 968 EntityFilter *GoogleDatastoreAdminV1EntityFilter `json:"entityFilter,omitempty"` 969 // InputUrl: The location of the import metadata file. This will be the same 970 // value as the google.datastore.admin.v1.ExportEntitiesResponse.output_url 971 // field. 972 InputUrl string `json:"inputUrl,omitempty"` 973 // ProgressBytes: An estimate of the number of bytes processed. 974 ProgressBytes *GoogleDatastoreAdminV1Progress `json:"progressBytes,omitempty"` 975 // ProgressEntities: An estimate of the number of entities processed. 976 ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"` 977 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally 978 // include in API requests. By default, fields with empty or default values are 979 // omitted from API requests. See 980 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 981 // details. 982 ForceSendFields []string `json:"-"` 983 // NullFields is a list of field names (e.g. "Common") to include in API 984 // requests with the JSON null value. By default, fields with empty values are 985 // omitted from API requests. See 986 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 987 NullFields []string `json:"-"` 988 } 989 990 func (s *GoogleDatastoreAdminV1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) { 991 type NoMethod GoogleDatastoreAdminV1ImportEntitiesMetadata 992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 993 } 994 995 // GoogleDatastoreAdminV1IndexOperationMetadata: Metadata for Index operations. 996 type GoogleDatastoreAdminV1IndexOperationMetadata struct { 997 // Common: Metadata common to all Datastore Admin operations. 998 Common *GoogleDatastoreAdminV1CommonMetadata `json:"common,omitempty"` 999 // IndexId: The index resource ID that this operation is acting on. 1000 IndexId string `json:"indexId,omitempty"` 1001 // ProgressEntities: An estimate of the number of entities processed. 1002 ProgressEntities *GoogleDatastoreAdminV1Progress `json:"progressEntities,omitempty"` 1003 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally 1004 // include in API requests. By default, fields with empty or default values are 1005 // omitted from API requests. See 1006 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1007 // details. 1008 ForceSendFields []string `json:"-"` 1009 // NullFields is a list of field names (e.g. "Common") to include in API 1010 // requests with the JSON null value. By default, fields with empty values are 1011 // omitted from API requests. See 1012 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1013 NullFields []string `json:"-"` 1014 } 1015 1016 func (s *GoogleDatastoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, error) { 1017 type NoMethod GoogleDatastoreAdminV1IndexOperationMetadata 1018 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1019 } 1020 1021 // GoogleDatastoreAdminV1MigrationProgressEvent: An event signifying the start 1022 // of a new step in a migration from Cloud Datastore to Cloud Firestore in 1023 // Datastore mode 1024 // (https://cloud.google.com/datastore/docs/upgrade-to-firestore). 1025 type GoogleDatastoreAdminV1MigrationProgressEvent struct { 1026 // PrepareStepDetails: Details for the `PREPARE` step. 1027 PrepareStepDetails *GoogleDatastoreAdminV1PrepareStepDetails `json:"prepareStepDetails,omitempty"` 1028 // RedirectWritesStepDetails: Details for the `REDIRECT_WRITES` step. 1029 RedirectWritesStepDetails *GoogleDatastoreAdminV1RedirectWritesStepDetails `json:"redirectWritesStepDetails,omitempty"` 1030 // Step: The step that is starting. An event with step set to `START` indicates 1031 // that the migration has been reverted back to the initial pre-migration 1032 // state. 1033 // 1034 // Possible values: 1035 // "MIGRATION_STEP_UNSPECIFIED" - Unspecified. 1036 // "PREPARE" - Pre-migration: the database is prepared for migration. 1037 // "START" - Start of migration. 1038 // "APPLY_WRITES_SYNCHRONOUSLY" - Writes are applied synchronously to at 1039 // least one replica. 1040 // "COPY_AND_VERIFY" - Data is copied to Cloud Firestore and then verified to 1041 // match the data in Cloud Datastore. 1042 // "REDIRECT_EVENTUALLY_CONSISTENT_READS" - Eventually-consistent reads are 1043 // redirected to Cloud Firestore. 1044 // "REDIRECT_STRONGLY_CONSISTENT_READS" - Strongly-consistent reads are 1045 // redirected to Cloud Firestore. 1046 // "REDIRECT_WRITES" - Writes are redirected to Cloud Firestore. 1047 Step string `json:"step,omitempty"` 1048 // ForceSendFields is a list of field names (e.g. "PrepareStepDetails") to 1049 // unconditionally include in API requests. By default, fields with empty or 1050 // default values are omitted from API requests. See 1051 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1052 // details. 1053 ForceSendFields []string `json:"-"` 1054 // NullFields is a list of field names (e.g. "PrepareStepDetails") to include 1055 // in API requests with the JSON null value. By default, fields with empty 1056 // values are omitted from API requests. See 1057 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1058 NullFields []string `json:"-"` 1059 } 1060 1061 func (s *GoogleDatastoreAdminV1MigrationProgressEvent) MarshalJSON() ([]byte, error) { 1062 type NoMethod GoogleDatastoreAdminV1MigrationProgressEvent 1063 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1064 } 1065 1066 // GoogleDatastoreAdminV1MigrationStateEvent: An event signifying a change in 1067 // state of a migration from Cloud Datastore to Cloud Firestore in Datastore 1068 // mode (https://cloud.google.com/datastore/docs/upgrade-to-firestore). 1069 type GoogleDatastoreAdminV1MigrationStateEvent struct { 1070 // State: The new state of the migration. 1071 // 1072 // Possible values: 1073 // "MIGRATION_STATE_UNSPECIFIED" - Unspecified. 1074 // "RUNNING" - The migration is running. 1075 // "PAUSED" - The migration is paused. 1076 // "COMPLETE" - The migration is complete. 1077 State string `json:"state,omitempty"` 1078 // ForceSendFields is a list of field names (e.g. "State") to unconditionally 1079 // include in API requests. By default, fields with empty or default values are 1080 // omitted from API requests. See 1081 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1082 // details. 1083 ForceSendFields []string `json:"-"` 1084 // NullFields is a list of field names (e.g. "State") to include in API 1085 // requests with the JSON null value. By default, fields with empty values are 1086 // omitted from API requests. See 1087 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1088 NullFields []string `json:"-"` 1089 } 1090 1091 func (s *GoogleDatastoreAdminV1MigrationStateEvent) MarshalJSON() ([]byte, error) { 1092 type NoMethod GoogleDatastoreAdminV1MigrationStateEvent 1093 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1094 } 1095 1096 // GoogleDatastoreAdminV1PrepareStepDetails: Details for the `PREPARE` step. 1097 type GoogleDatastoreAdminV1PrepareStepDetails struct { 1098 // ConcurrencyMode: The concurrency mode this database will use when it reaches 1099 // the `REDIRECT_WRITES` step. 1100 // 1101 // Possible values: 1102 // "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified. 1103 // "PESSIMISTIC" - Pessimistic concurrency. 1104 // "OPTIMISTIC" - Optimistic concurrency. 1105 // "OPTIMISTIC_WITH_ENTITY_GROUPS" - Optimistic concurrency with entity 1106 // groups. 1107 ConcurrencyMode string `json:"concurrencyMode,omitempty"` 1108 // ForceSendFields is a list of field names (e.g. "ConcurrencyMode") 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. "ConcurrencyMode") to include in 1115 // API requests with the JSON null value. By default, fields with empty values 1116 // are 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 *GoogleDatastoreAdminV1PrepareStepDetails) MarshalJSON() ([]byte, error) { 1122 type NoMethod GoogleDatastoreAdminV1PrepareStepDetails 1123 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1124 } 1125 1126 // GoogleDatastoreAdminV1Progress: Measures the progress of a particular 1127 // metric. 1128 type GoogleDatastoreAdminV1Progress struct { 1129 // WorkCompleted: The amount of work that has been completed. Note that this 1130 // may be greater than work_estimated. 1131 WorkCompleted int64 `json:"workCompleted,omitempty,string"` 1132 // WorkEstimated: An estimate of how much work needs to be performed. May be 1133 // zero if the work estimate is unavailable. 1134 WorkEstimated int64 `json:"workEstimated,omitempty,string"` 1135 // ForceSendFields is a list of field names (e.g. "WorkCompleted") to 1136 // unconditionally include in API requests. By default, fields with empty or 1137 // default values are omitted from API requests. See 1138 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1139 // details. 1140 ForceSendFields []string `json:"-"` 1141 // NullFields is a list of field names (e.g. "WorkCompleted") to include in API 1142 // requests with the JSON null value. By default, fields with empty values are 1143 // omitted from API requests. See 1144 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1145 NullFields []string `json:"-"` 1146 } 1147 1148 func (s *GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error) { 1149 type NoMethod GoogleDatastoreAdminV1Progress 1150 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1151 } 1152 1153 // GoogleDatastoreAdminV1RedirectWritesStepDetails: Details for the 1154 // `REDIRECT_WRITES` step. 1155 type GoogleDatastoreAdminV1RedirectWritesStepDetails struct { 1156 // ConcurrencyMode: Ths concurrency mode for this database. 1157 // 1158 // Possible values: 1159 // "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified. 1160 // "PESSIMISTIC" - Pessimistic concurrency. 1161 // "OPTIMISTIC" - Optimistic concurrency. 1162 // "OPTIMISTIC_WITH_ENTITY_GROUPS" - Optimistic concurrency with entity 1163 // groups. 1164 ConcurrencyMode string `json:"concurrencyMode,omitempty"` 1165 // ForceSendFields is a list of field names (e.g. "ConcurrencyMode") to 1166 // unconditionally include in API requests. By default, fields with empty or 1167 // default values are omitted from API requests. See 1168 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1169 // details. 1170 ForceSendFields []string `json:"-"` 1171 // NullFields is a list of field names (e.g. "ConcurrencyMode") to include in 1172 // API requests with the JSON null value. By default, fields with empty values 1173 // are omitted from API requests. See 1174 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1175 NullFields []string `json:"-"` 1176 } 1177 1178 func (s *GoogleDatastoreAdminV1RedirectWritesStepDetails) MarshalJSON() ([]byte, error) { 1179 type NoMethod GoogleDatastoreAdminV1RedirectWritesStepDetails 1180 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1181 } 1182 1183 // GoogleDatastoreAdminV1beta1CommonMetadata: Metadata common to all Datastore 1184 // Admin operations. 1185 type GoogleDatastoreAdminV1beta1CommonMetadata struct { 1186 // EndTime: The time the operation ended, either successfully or otherwise. 1187 EndTime string `json:"endTime,omitempty"` 1188 // Labels: The client-assigned labels which were provided when the operation 1189 // was created. May also include additional labels. 1190 Labels map[string]string `json:"labels,omitempty"` 1191 // OperationType: The type of the operation. Can be used as a filter in 1192 // ListOperationsRequest. 1193 // 1194 // Possible values: 1195 // "OPERATION_TYPE_UNSPECIFIED" - Unspecified. 1196 // "EXPORT_ENTITIES" - ExportEntities. 1197 // "IMPORT_ENTITIES" - ImportEntities. 1198 OperationType string `json:"operationType,omitempty"` 1199 // StartTime: The time that work began on the operation. 1200 StartTime string `json:"startTime,omitempty"` 1201 // State: The current state of the Operation. 1202 // 1203 // Possible values: 1204 // "STATE_UNSPECIFIED" - Unspecified. 1205 // "INITIALIZING" - Request is being prepared for processing. 1206 // "PROCESSING" - Request is actively being processed. 1207 // "CANCELLING" - Request is in the process of being cancelled after user 1208 // called google.longrunning.Operations.CancelOperation on the operation. 1209 // "FINALIZING" - Request has been processed and is in its finalization 1210 // stage. 1211 // "SUCCESSFUL" - Request has completed successfully. 1212 // "FAILED" - Request has finished being processed, but encountered an error. 1213 // "CANCELLED" - Request has finished being cancelled after user called 1214 // google.longrunning.Operations.CancelOperation. 1215 State string `json:"state,omitempty"` 1216 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 1217 // include in API requests. By default, fields with empty or default values are 1218 // omitted from API requests. See 1219 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1220 // details. 1221 ForceSendFields []string `json:"-"` 1222 // NullFields is a list of field names (e.g. "EndTime") to include in API 1223 // requests with the JSON null value. By default, fields with empty values are 1224 // omitted from API requests. See 1225 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1226 NullFields []string `json:"-"` 1227 } 1228 1229 func (s *GoogleDatastoreAdminV1beta1CommonMetadata) MarshalJSON() ([]byte, error) { 1230 type NoMethod GoogleDatastoreAdminV1beta1CommonMetadata 1231 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1232 } 1233 1234 // GoogleDatastoreAdminV1beta1EntityFilter: Identifies a subset of entities in 1235 // a project. This is specified as combinations of kinds and namespaces (either 1236 // or both of which may be all, as described in the following examples). 1237 // Example usage: Entire project: kinds=[], namespace_ids=[] Kinds Foo and Bar 1238 // in all namespaces: kinds=['Foo', 'Bar'], namespace_ids=[] Kinds Foo and Bar 1239 // only in the default namespace: kinds=['Foo', 'Bar'], namespace_ids=[”] 1240 // Kinds Foo and Bar in both the default and Baz namespaces: kinds=['Foo', 1241 // 'Bar'], namespace_ids=[”, 'Baz'] The entire Baz namespace: kinds=[], 1242 // namespace_ids=['Baz'] 1243 type GoogleDatastoreAdminV1beta1EntityFilter struct { 1244 // Kinds: If empty, then this represents all kinds. 1245 Kinds []string `json:"kinds,omitempty"` 1246 // NamespaceIds: An empty list represents all namespaces. This is the preferred 1247 // usage for projects that don't use namespaces. An empty string element 1248 // represents the default namespace. This should be used if the project has 1249 // data in non-default namespaces, but doesn't want to include them. Each 1250 // namespace in this list must be unique. 1251 NamespaceIds []string `json:"namespaceIds,omitempty"` 1252 // ForceSendFields is a list of field names (e.g. "Kinds") to unconditionally 1253 // include in API requests. By default, fields with empty or default values are 1254 // omitted from API requests. See 1255 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1256 // details. 1257 ForceSendFields []string `json:"-"` 1258 // NullFields is a list of field names (e.g. "Kinds") to include in API 1259 // requests with the JSON null value. By default, fields with empty values are 1260 // omitted from API requests. See 1261 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1262 NullFields []string `json:"-"` 1263 } 1264 1265 func (s *GoogleDatastoreAdminV1beta1EntityFilter) MarshalJSON() ([]byte, error) { 1266 type NoMethod GoogleDatastoreAdminV1beta1EntityFilter 1267 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1268 } 1269 1270 // GoogleDatastoreAdminV1beta1ExportEntitiesMetadata: Metadata for 1271 // ExportEntities operations. 1272 type GoogleDatastoreAdminV1beta1ExportEntitiesMetadata struct { 1273 // Common: Metadata common to all Datastore Admin operations. 1274 Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` 1275 // EntityFilter: Description of which entities are being exported. 1276 EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` 1277 // OutputUrlPrefix: Location for the export metadata and data files. This will 1278 // be the same value as the 1279 // google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix 1280 // field. The final output location is provided in 1281 // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url. 1282 OutputUrlPrefix string `json:"outputUrlPrefix,omitempty"` 1283 // ProgressBytes: An estimate of the number of bytes processed. 1284 ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` 1285 // ProgressEntities: An estimate of the number of entities processed. 1286 ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` 1287 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally 1288 // include in API requests. By default, fields with empty or default values are 1289 // omitted from API requests. See 1290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1291 // details. 1292 ForceSendFields []string `json:"-"` 1293 // NullFields is a list of field names (e.g. "Common") to include in API 1294 // requests with the JSON null value. By default, fields with empty values are 1295 // omitted from API requests. See 1296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1297 NullFields []string `json:"-"` 1298 } 1299 1300 func (s *GoogleDatastoreAdminV1beta1ExportEntitiesMetadata) MarshalJSON() ([]byte, error) { 1301 type NoMethod GoogleDatastoreAdminV1beta1ExportEntitiesMetadata 1302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1303 } 1304 1305 // GoogleDatastoreAdminV1beta1ExportEntitiesResponse: The response for 1306 // google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities. 1307 type GoogleDatastoreAdminV1beta1ExportEntitiesResponse struct { 1308 // OutputUrl: Location of the output metadata file. This can be used to begin 1309 // an import into Cloud Datastore (this project or another project). See 1310 // google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. Only present 1311 // if the operation completed successfully. 1312 OutputUrl string `json:"outputUrl,omitempty"` 1313 // ForceSendFields is a list of field names (e.g. "OutputUrl") to 1314 // unconditionally include in API requests. By default, fields with empty or 1315 // default values are omitted from API requests. See 1316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1317 // details. 1318 ForceSendFields []string `json:"-"` 1319 // NullFields is a list of field names (e.g. "OutputUrl") to include in API 1320 // requests with the JSON null value. By default, fields with empty values are 1321 // omitted from API requests. See 1322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1323 NullFields []string `json:"-"` 1324 } 1325 1326 func (s *GoogleDatastoreAdminV1beta1ExportEntitiesResponse) MarshalJSON() ([]byte, error) { 1327 type NoMethod GoogleDatastoreAdminV1beta1ExportEntitiesResponse 1328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1329 } 1330 1331 // GoogleDatastoreAdminV1beta1ImportEntitiesMetadata: Metadata for 1332 // ImportEntities operations. 1333 type GoogleDatastoreAdminV1beta1ImportEntitiesMetadata struct { 1334 // Common: Metadata common to all Datastore Admin operations. 1335 Common *GoogleDatastoreAdminV1beta1CommonMetadata `json:"common,omitempty"` 1336 // EntityFilter: Description of which entities are being imported. 1337 EntityFilter *GoogleDatastoreAdminV1beta1EntityFilter `json:"entityFilter,omitempty"` 1338 // InputUrl: The location of the import metadata file. This will be the same 1339 // value as the 1340 // google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field. 1341 InputUrl string `json:"inputUrl,omitempty"` 1342 // ProgressBytes: An estimate of the number of bytes processed. 1343 ProgressBytes *GoogleDatastoreAdminV1beta1Progress `json:"progressBytes,omitempty"` 1344 // ProgressEntities: An estimate of the number of entities processed. 1345 ProgressEntities *GoogleDatastoreAdminV1beta1Progress `json:"progressEntities,omitempty"` 1346 // ForceSendFields is a list of field names (e.g. "Common") to unconditionally 1347 // include in API requests. By default, fields with empty or default values are 1348 // omitted from API requests. See 1349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1350 // details. 1351 ForceSendFields []string `json:"-"` 1352 // NullFields is a list of field names (e.g. "Common") to include in API 1353 // requests with the JSON null value. By default, fields with empty values are 1354 // omitted from API requests. See 1355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1356 NullFields []string `json:"-"` 1357 } 1358 1359 func (s *GoogleDatastoreAdminV1beta1ImportEntitiesMetadata) MarshalJSON() ([]byte, error) { 1360 type NoMethod GoogleDatastoreAdminV1beta1ImportEntitiesMetadata 1361 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1362 } 1363 1364 // GoogleDatastoreAdminV1beta1Progress: Measures the progress of a particular 1365 // metric. 1366 type GoogleDatastoreAdminV1beta1Progress struct { 1367 // WorkCompleted: The amount of work that has been completed. Note that this 1368 // may be greater than work_estimated. 1369 WorkCompleted int64 `json:"workCompleted,omitempty,string"` 1370 // WorkEstimated: An estimate of how much work needs to be performed. May be 1371 // zero if the work estimate is unavailable. 1372 WorkEstimated int64 `json:"workEstimated,omitempty,string"` 1373 // ForceSendFields is a list of field names (e.g. "WorkCompleted") to 1374 // unconditionally include in API requests. By default, fields with empty or 1375 // default values are omitted from API requests. See 1376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1377 // details. 1378 ForceSendFields []string `json:"-"` 1379 // NullFields is a list of field names (e.g. "WorkCompleted") to include in API 1380 // requests with the JSON null value. By default, fields with empty values are 1381 // omitted from API requests. See 1382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1383 NullFields []string `json:"-"` 1384 } 1385 1386 func (s *GoogleDatastoreAdminV1beta1Progress) MarshalJSON() ([]byte, error) { 1387 type NoMethod GoogleDatastoreAdminV1beta1Progress 1388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1389 } 1390 1391 // GqlQuery: A GQL query 1392 // (https://cloud.google.com/datastore/docs/apis/gql/gql_reference). 1393 type GqlQuery struct { 1394 // AllowLiterals: When false, the query string must not contain any literals 1395 // and instead must bind all values. For example, `SELECT * FROM Kind WHERE a = 1396 // 'string literal'` is not allowed, while `SELECT * FROM Kind WHERE a = 1397 // @value` is. 1398 AllowLiterals bool `json:"allowLiterals,omitempty"` 1399 // NamedBindings: For each non-reserved named binding site in the query string, 1400 // there must be a named parameter with that name, but not necessarily the 1401 // inverse. Key must match regex `A-Za-z_$*`, must not match regex `__.*__`, 1402 // and must not be "". 1403 NamedBindings map[string]GqlQueryParameter `json:"namedBindings,omitempty"` 1404 // PositionalBindings: Numbered binding site @1 references the first numbered 1405 // parameter, effectively using 1-based indexing, rather than the usual 0. For 1406 // each binding site numbered i in `query_string`, there must be an i-th 1407 // numbered parameter. The inverse must also be true. 1408 PositionalBindings []*GqlQueryParameter `json:"positionalBindings,omitempty"` 1409 // QueryString: A string of the format described here 1410 // (https://cloud.google.com/datastore/docs/apis/gql/gql_reference). 1411 QueryString string `json:"queryString,omitempty"` 1412 // ForceSendFields is a list of field names (e.g. "AllowLiterals") to 1413 // unconditionally include in API requests. By default, fields with empty or 1414 // default values are omitted from API requests. See 1415 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1416 // details. 1417 ForceSendFields []string `json:"-"` 1418 // NullFields is a list of field names (e.g. "AllowLiterals") to include in API 1419 // requests with the JSON null value. By default, fields with empty values are 1420 // omitted from API requests. See 1421 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1422 NullFields []string `json:"-"` 1423 } 1424 1425 func (s *GqlQuery) MarshalJSON() ([]byte, error) { 1426 type NoMethod GqlQuery 1427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1428 } 1429 1430 // GqlQueryParameter: A binding parameter for a GQL query. 1431 type GqlQueryParameter struct { 1432 // Cursor: A query cursor. Query cursors are returned in query result batches. 1433 Cursor string `json:"cursor,omitempty"` 1434 // Value: A value parameter. 1435 Value *Value `json:"value,omitempty"` 1436 // ForceSendFields is a list of field names (e.g. "Cursor") to unconditionally 1437 // include in API requests. By default, fields with empty or default values are 1438 // omitted from API requests. See 1439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1440 // details. 1441 ForceSendFields []string `json:"-"` 1442 // NullFields is a list of field names (e.g. "Cursor") to include in API 1443 // requests with the JSON null value. By default, fields with empty values are 1444 // omitted from API requests. See 1445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1446 NullFields []string `json:"-"` 1447 } 1448 1449 func (s *GqlQueryParameter) MarshalJSON() ([]byte, error) { 1450 type NoMethod GqlQueryParameter 1451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1452 } 1453 1454 // Key: A unique identifier for an entity. If a key's partition ID or any of 1455 // its path kinds or names are reserved/read-only, the key is 1456 // reserved/read-only. A reserved/read-only key is forbidden in certain 1457 // documented contexts. 1458 type Key struct { 1459 // PartitionId: Entities are partitioned into subsets, currently identified by 1460 // a project ID and namespace ID. Queries are scoped to a single partition. 1461 PartitionId *PartitionId `json:"partitionId,omitempty"` 1462 // Path: The entity path. An entity path consists of one or more elements 1463 // composed of a kind and a string or numerical identifier, which identify 1464 // entities. The first element identifies a _root entity_, the second element 1465 // identifies a _child_ of the root entity, the third element identifies a 1466 // child of the second entity, and so forth. The entities identified by all 1467 // prefixes of the path are called the element's _ancestors_. An entity path is 1468 // always fully complete: *all* of the entity's ancestors are required to be in 1469 // the path along with the entity identifier itself. The only exception is that 1470 // in some documented cases, the identifier in the last path element (for the 1471 // entity) itself may be omitted. For example, the last path element of the key 1472 // of `Mutation.insert` may have no identifier. A path can never be empty, and 1473 // a path can have at most 100 elements. 1474 Path []*PathElement `json:"path,omitempty"` 1475 // ForceSendFields is a list of field names (e.g. "PartitionId") to 1476 // unconditionally include in API requests. By default, fields with empty or 1477 // default values are omitted from API requests. See 1478 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1479 // details. 1480 ForceSendFields []string `json:"-"` 1481 // NullFields is a list of field names (e.g. "PartitionId") to include in API 1482 // requests with the JSON null value. By default, fields with empty values are 1483 // omitted from API requests. See 1484 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1485 NullFields []string `json:"-"` 1486 } 1487 1488 func (s *Key) MarshalJSON() ([]byte, error) { 1489 type NoMethod Key 1490 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1491 } 1492 1493 // KindExpression: A representation of a kind. 1494 type KindExpression struct { 1495 // Name: The name of the kind. 1496 Name string `json:"name,omitempty"` 1497 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1498 // include in API requests. By default, fields with empty or default values are 1499 // omitted from API requests. See 1500 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1501 // details. 1502 ForceSendFields []string `json:"-"` 1503 // NullFields is a list of field names (e.g. "Name") to include in API requests 1504 // with the JSON null value. By default, fields with empty values are omitted 1505 // from API requests. See 1506 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1507 NullFields []string `json:"-"` 1508 } 1509 1510 func (s *KindExpression) MarshalJSON() ([]byte, error) { 1511 type NoMethod KindExpression 1512 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1513 } 1514 1515 // LatLng: An object that represents a latitude/longitude pair. This is 1516 // expressed as a pair of doubles to represent degrees latitude and degrees 1517 // longitude. Unless specified otherwise, this object must conform to the WGS84 1518 // standard. Values must be within normalized ranges. 1519 type LatLng struct { 1520 // Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0]. 1521 Latitude float64 `json:"latitude,omitempty"` 1522 // Longitude: The longitude in degrees. It must be in the range [-180.0, 1523 // +180.0]. 1524 Longitude float64 `json:"longitude,omitempty"` 1525 // ForceSendFields is a list of field names (e.g. "Latitude") to 1526 // unconditionally include in API requests. By default, fields with empty or 1527 // default values are omitted from API requests. See 1528 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1529 // details. 1530 ForceSendFields []string `json:"-"` 1531 // NullFields is a list of field names (e.g. "Latitude") to include in API 1532 // requests with the JSON null value. By default, fields with empty values are 1533 // omitted from API requests. See 1534 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1535 NullFields []string `json:"-"` 1536 } 1537 1538 func (s *LatLng) MarshalJSON() ([]byte, error) { 1539 type NoMethod LatLng 1540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1541 } 1542 1543 func (s *LatLng) UnmarshalJSON(data []byte) error { 1544 type NoMethod LatLng 1545 var s1 struct { 1546 Latitude gensupport.JSONFloat64 `json:"latitude"` 1547 Longitude gensupport.JSONFloat64 `json:"longitude"` 1548 *NoMethod 1549 } 1550 s1.NoMethod = (*NoMethod)(s) 1551 if err := json.Unmarshal(data, &s1); err != nil { 1552 return err 1553 } 1554 s.Latitude = float64(s1.Latitude) 1555 s.Longitude = float64(s1.Longitude) 1556 return nil 1557 } 1558 1559 // LookupRequest: The request for Datastore.Lookup. 1560 type LookupRequest struct { 1561 // Keys: Required. Keys of entities to look up. 1562 Keys []*Key `json:"keys,omitempty"` 1563 // PropertyMask: The properties to return. Defaults to returning all 1564 // properties. If this field is set and an entity has a property not referenced 1565 // in the mask, it will be absent from LookupResponse.found.entity.properties. 1566 // The entity's key is always returned. 1567 PropertyMask *PropertyMask `json:"propertyMask,omitempty"` 1568 // ReadOptions: The options for this lookup request. 1569 ReadOptions *ReadOptions `json:"readOptions,omitempty"` 1570 // ForceSendFields is a list of field names (e.g. "Keys") to unconditionally 1571 // include in API requests. By default, fields with empty or default values are 1572 // omitted from API requests. See 1573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1574 // details. 1575 ForceSendFields []string `json:"-"` 1576 // NullFields is a list of field names (e.g. "Keys") to include in API requests 1577 // with the JSON null value. By default, fields with empty values are omitted 1578 // from API requests. See 1579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1580 NullFields []string `json:"-"` 1581 } 1582 1583 func (s *LookupRequest) MarshalJSON() ([]byte, error) { 1584 type NoMethod LookupRequest 1585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1586 } 1587 1588 // LookupResponse: The response for Datastore.Lookup. 1589 type LookupResponse struct { 1590 // Deferred: A list of keys that were not looked up due to resource 1591 // constraints. The order of results in this field is undefined and has no 1592 // relation to the order of the keys in the input. 1593 Deferred []*Key `json:"deferred,omitempty"` 1594 // Found: Entities found as `ResultType.FULL` entities. The order of results in 1595 // this field is undefined and has no relation to the order of the keys in the 1596 // input. 1597 Found []*EntityResult `json:"found,omitempty"` 1598 // Missing: Entities not found as `ResultType.KEY_ONLY` entities. The order of 1599 // results in this field is undefined and has no relation to the order of the 1600 // keys in the input. 1601 Missing []*EntityResult `json:"missing,omitempty"` 1602 // ReadTime: The time at which these entities were read or found missing. 1603 ReadTime string `json:"readTime,omitempty"` 1604 1605 // ServerResponse contains the HTTP response code and headers from the server. 1606 googleapi.ServerResponse `json:"-"` 1607 // ForceSendFields is a list of field names (e.g. "Deferred") to 1608 // unconditionally include in API requests. By default, fields with empty or 1609 // default values are omitted from API requests. See 1610 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1611 // details. 1612 ForceSendFields []string `json:"-"` 1613 // NullFields is a list of field names (e.g. "Deferred") to include in API 1614 // requests with the JSON null value. By default, fields with empty values are 1615 // omitted from API requests. See 1616 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1617 NullFields []string `json:"-"` 1618 } 1619 1620 func (s *LookupResponse) MarshalJSON() ([]byte, error) { 1621 type NoMethod LookupResponse 1622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1623 } 1624 1625 // Mutation: A mutation to apply to an entity. 1626 type Mutation struct { 1627 // BaseVersion: The version of the entity that this mutation is being applied 1628 // to. If this does not match the current version on the server, the mutation 1629 // conflicts. 1630 BaseVersion int64 `json:"baseVersion,omitempty,string"` 1631 // Delete: The key of the entity to delete. The entity may or may not already 1632 // exist. Must have a complete key path and must not be reserved/read-only. 1633 Delete *Key `json:"delete,omitempty"` 1634 // Insert: The entity to insert. The entity must not already exist. The entity 1635 // key's final path element may be incomplete. 1636 Insert *Entity `json:"insert,omitempty"` 1637 // PropertyMask: The properties to write in this mutation. None of the 1638 // properties in the mask may have a reserved name, except for `__key__`. This 1639 // field is ignored for `delete`. If the entity already exists, only properties 1640 // referenced in the mask are updated, others are left untouched. Properties 1641 // referenced in the mask but not in the entity are deleted. 1642 PropertyMask *PropertyMask `json:"propertyMask,omitempty"` 1643 // Update: The entity to update. The entity must already exist. Must have a 1644 // complete key path. 1645 Update *Entity `json:"update,omitempty"` 1646 // UpdateTime: The update time of the entity that this mutation is being 1647 // applied to. If this does not match the current update time on the server, 1648 // the mutation conflicts. 1649 UpdateTime string `json:"updateTime,omitempty"` 1650 // Upsert: The entity to upsert. The entity may or may not already exist. The 1651 // entity key's final path element may be incomplete. 1652 Upsert *Entity `json:"upsert,omitempty"` 1653 // ForceSendFields is a list of field names (e.g. "BaseVersion") to 1654 // unconditionally include in API requests. By default, fields with empty or 1655 // default values are omitted from API requests. See 1656 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1657 // details. 1658 ForceSendFields []string `json:"-"` 1659 // NullFields is a list of field names (e.g. "BaseVersion") to include in API 1660 // requests with the JSON null value. By default, fields with empty values are 1661 // omitted from API requests. See 1662 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1663 NullFields []string `json:"-"` 1664 } 1665 1666 func (s *Mutation) MarshalJSON() ([]byte, error) { 1667 type NoMethod Mutation 1668 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1669 } 1670 1671 // MutationResult: The result of applying a mutation. 1672 type MutationResult struct { 1673 // ConflictDetected: Whether a conflict was detected for this mutation. Always 1674 // false when a conflict detection strategy field is not set in the mutation. 1675 ConflictDetected bool `json:"conflictDetected,omitempty"` 1676 // CreateTime: The create time of the entity. This field will not be set after 1677 // a 'delete'. 1678 CreateTime string `json:"createTime,omitempty"` 1679 // Key: The automatically allocated key. Set only when the mutation allocated a 1680 // key. 1681 Key *Key `json:"key,omitempty"` 1682 // UpdateTime: The update time of the entity on the server after processing the 1683 // mutation. If the mutation doesn't change anything on the server, then the 1684 // timestamp will be the update timestamp of the current entity. This field 1685 // will not be set after a 'delete'. 1686 UpdateTime string `json:"updateTime,omitempty"` 1687 // Version: The version of the entity on the server after processing the 1688 // mutation. If the mutation doesn't change anything on the server, then the 1689 // version will be the version of the current entity or, if no entity is 1690 // present, a version that is strictly greater than the version of any previous 1691 // entity and less than the version of any possible future entity. 1692 Version int64 `json:"version,omitempty,string"` 1693 // ForceSendFields is a list of field names (e.g. "ConflictDetected") to 1694 // unconditionally include in API requests. By default, fields with empty or 1695 // default values are omitted from API requests. See 1696 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1697 // details. 1698 ForceSendFields []string `json:"-"` 1699 // NullFields is a list of field names (e.g. "ConflictDetected") to include in 1700 // API requests with the JSON null value. By default, fields with empty values 1701 // are omitted from API requests. See 1702 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1703 NullFields []string `json:"-"` 1704 } 1705 1706 func (s *MutationResult) MarshalJSON() ([]byte, error) { 1707 type NoMethod MutationResult 1708 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1709 } 1710 1711 // PartitionId: A partition ID identifies a grouping of entities. The grouping 1712 // is always by project and namespace, however the namespace ID may be empty. A 1713 // partition ID contains several dimensions: project ID and namespace ID. 1714 // Partition dimensions: - May be "". - Must be valid UTF-8 bytes. - Must 1715 // have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any 1716 // dimension matches regex `__.*__`, the partition is reserved/read-only. A 1717 // reserved/read-only partition ID is forbidden in certain documented contexts. 1718 // Foreign partition IDs (in which the project ID does not match the context 1719 // project ID ) are discouraged. Reads and writes of foreign partition IDs may 1720 // fail if the project is not in an active state. 1721 type PartitionId struct { 1722 // NamespaceId: If not empty, the ID of the namespace to which the entities 1723 // belong. 1724 NamespaceId string `json:"namespaceId,omitempty"` 1725 // ProjectId: The ID of the project to which the entities belong. 1726 ProjectId string `json:"projectId,omitempty"` 1727 // ForceSendFields is a list of field names (e.g. "NamespaceId") to 1728 // unconditionally include in API requests. By default, fields with empty or 1729 // default values are omitted from API requests. See 1730 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1731 // details. 1732 ForceSendFields []string `json:"-"` 1733 // NullFields is a list of field names (e.g. "NamespaceId") to include in API 1734 // requests with the JSON null value. By default, fields with empty values are 1735 // omitted from API requests. See 1736 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1737 NullFields []string `json:"-"` 1738 } 1739 1740 func (s *PartitionId) MarshalJSON() ([]byte, error) { 1741 type NoMethod PartitionId 1742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1743 } 1744 1745 // PathElement: A (kind, ID/name) pair used to construct a key path. If either 1746 // name or ID is set, the element is complete. If neither is set, the element 1747 // is incomplete. 1748 type PathElement struct { 1749 // Id: The auto-allocated ID of the entity. Never equal to zero. Values less 1750 // than zero are discouraged and may not be supported in the future. 1751 Id int64 `json:"id,omitempty,string"` 1752 // Kind: The kind of the entity. A kind matching regex `__.*__` is 1753 // reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 1754 // encoded. Cannot be "". Must be valid UTF-8 bytes. Legacy values that are 1755 // not valid UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding 1756 // of the bytes. 1757 Kind string `json:"kind,omitempty"` 1758 // Name: The name of the entity. A name matching regex `__.*__` is 1759 // reserved/read-only. A name must not be more than 1500 bytes when UTF-8 1760 // encoded. Cannot be "". Must be valid UTF-8 bytes. Legacy values that are 1761 // not valid UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding 1762 // of the bytes. 1763 Name string `json:"name,omitempty"` 1764 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 1765 // include in API requests. By default, fields with empty or default values are 1766 // omitted from API requests. See 1767 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1768 // details. 1769 ForceSendFields []string `json:"-"` 1770 // NullFields is a list of field names (e.g. "Id") to include in API requests 1771 // with the JSON null value. By default, fields with empty values are omitted 1772 // from API requests. See 1773 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1774 NullFields []string `json:"-"` 1775 } 1776 1777 func (s *PathElement) MarshalJSON() ([]byte, error) { 1778 type NoMethod PathElement 1779 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1780 } 1781 1782 // PlanSummary: Planning phase information for the query. 1783 type PlanSummary struct { 1784 // IndexesUsed: The indexes selected for the query. For example: [ 1785 // {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, 1786 // {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} ] 1787 IndexesUsed []googleapi.RawMessage `json:"indexesUsed,omitempty"` 1788 // ForceSendFields is a list of field names (e.g. "IndexesUsed") to 1789 // unconditionally include in API requests. By default, fields with empty or 1790 // default values are omitted from API requests. See 1791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1792 // details. 1793 ForceSendFields []string `json:"-"` 1794 // NullFields is a list of field names (e.g. "IndexesUsed") to include in API 1795 // requests with the JSON null value. By default, fields with empty values are 1796 // omitted from API requests. See 1797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1798 NullFields []string `json:"-"` 1799 } 1800 1801 func (s *PlanSummary) MarshalJSON() ([]byte, error) { 1802 type NoMethod PlanSummary 1803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1804 } 1805 1806 // Projection: A representation of a property in a projection. 1807 type Projection struct { 1808 // Property: The property to project. 1809 Property *PropertyReference `json:"property,omitempty"` 1810 // ForceSendFields is a list of field names (e.g. "Property") to 1811 // unconditionally include in API requests. By default, fields with empty or 1812 // default values are omitted from API requests. See 1813 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1814 // details. 1815 ForceSendFields []string `json:"-"` 1816 // NullFields is a list of field names (e.g. "Property") to include in API 1817 // requests with the JSON null value. By default, fields with empty values are 1818 // omitted from API requests. See 1819 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1820 NullFields []string `json:"-"` 1821 } 1822 1823 func (s *Projection) MarshalJSON() ([]byte, error) { 1824 type NoMethod Projection 1825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1826 } 1827 1828 // PropertyFilter: A filter on a specific property. 1829 type PropertyFilter struct { 1830 // Op: The operator to filter by. 1831 // 1832 // Possible values: 1833 // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used. 1834 // "LESS_THAN" - The given `property` is less than the given `value`. 1835 // Requires: * That `property` comes first in `order_by`. 1836 // "LESS_THAN_OR_EQUAL" - The given `property` is less than or equal to the 1837 // given `value`. Requires: * That `property` comes first in `order_by`. 1838 // "GREATER_THAN" - The given `property` is greater than the given `value`. 1839 // Requires: * That `property` comes first in `order_by`. 1840 // "GREATER_THAN_OR_EQUAL" - The given `property` is greater than or equal to 1841 // the given `value`. Requires: * That `property` comes first in `order_by`. 1842 // "EQUAL" - The given `property` is equal to the given `value`. 1843 // "IN" - The given `property` is equal to at least one value in the given 1844 // array. Requires: * That `value` is a non-empty `ArrayValue`, subject to 1845 // disjunction limits. * No `NOT_IN` is in the same query. 1846 // "NOT_EQUAL" - The given `property` is not equal to the given `value`. 1847 // Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That 1848 // `property` comes first in the `order_by`. 1849 // "HAS_ANCESTOR" - Limit the result set to the given entity and its 1850 // descendants. Requires: * That `value` is an entity key. * All evaluated 1851 // disjunctions must have the same `HAS_ANCESTOR` filter. 1852 // "NOT_IN" - The value of the `property` is not in the given array. 1853 // Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. 1854 // * No other `OR`, `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That 1855 // `field` comes first in the `order_by`. 1856 Op string `json:"op,omitempty"` 1857 // Property: The property to filter by. 1858 Property *PropertyReference `json:"property,omitempty"` 1859 // Value: The value to compare the property to. 1860 Value *Value `json:"value,omitempty"` 1861 // ForceSendFields is a list of field names (e.g. "Op") to unconditionally 1862 // include in API requests. By default, fields with empty or default values are 1863 // omitted from API requests. See 1864 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1865 // details. 1866 ForceSendFields []string `json:"-"` 1867 // NullFields is a list of field names (e.g. "Op") to include in API requests 1868 // with the JSON null value. By default, fields with empty values are omitted 1869 // from API requests. See 1870 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1871 NullFields []string `json:"-"` 1872 } 1873 1874 func (s *PropertyFilter) MarshalJSON() ([]byte, error) { 1875 type NoMethod PropertyFilter 1876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1877 } 1878 1879 // PropertyMask: The set of arbitrarily nested property paths used to restrict 1880 // an operation to only a subset of properties in an entity. 1881 type PropertyMask struct { 1882 // Paths: The paths to the properties covered by this mask. A path is a list of 1883 // property names separated by dots (`.`), for example `foo.bar` means the 1884 // property `bar` inside the entity property `foo` inside the entity associated 1885 // with this path. If a property name contains a dot `.` or a backslash `\`, 1886 // then that name must be escaped. A path must not be empty, and may not 1887 // reference a value inside an array value. 1888 Paths []string `json:"paths,omitempty"` 1889 // ForceSendFields is a list of field names (e.g. "Paths") to unconditionally 1890 // include in API requests. By default, fields with empty or default values are 1891 // omitted from API requests. See 1892 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1893 // details. 1894 ForceSendFields []string `json:"-"` 1895 // NullFields is a list of field names (e.g. "Paths") to include in API 1896 // requests with the JSON null value. By default, fields with empty values are 1897 // omitted from API requests. See 1898 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1899 NullFields []string `json:"-"` 1900 } 1901 1902 func (s *PropertyMask) MarshalJSON() ([]byte, error) { 1903 type NoMethod PropertyMask 1904 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1905 } 1906 1907 // PropertyOrder: The desired order for a specific property. 1908 type PropertyOrder struct { 1909 // Direction: The direction to order by. Defaults to `ASCENDING`. 1910 // 1911 // Possible values: 1912 // "DIRECTION_UNSPECIFIED" - Unspecified. This value must not be used. 1913 // "ASCENDING" - Ascending. 1914 // "DESCENDING" - Descending. 1915 Direction string `json:"direction,omitempty"` 1916 // Property: The property to order by. 1917 Property *PropertyReference `json:"property,omitempty"` 1918 // ForceSendFields is a list of field names (e.g. "Direction") to 1919 // unconditionally include in API requests. By default, fields with empty or 1920 // default values are omitted from API requests. See 1921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1922 // details. 1923 ForceSendFields []string `json:"-"` 1924 // NullFields is a list of field names (e.g. "Direction") to include in API 1925 // requests with the JSON null value. By default, fields with empty values are 1926 // omitted from API requests. See 1927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1928 NullFields []string `json:"-"` 1929 } 1930 1931 func (s *PropertyOrder) MarshalJSON() ([]byte, error) { 1932 type NoMethod PropertyOrder 1933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1934 } 1935 1936 // PropertyReference: A reference to a property relative to the kind 1937 // expressions. 1938 type PropertyReference struct { 1939 // Name: A reference to a property. Requires: * MUST be a dot-delimited (`.`) 1940 // string of segments, where each segment conforms to entity property name 1941 // limitations. 1942 Name string `json:"name,omitempty"` 1943 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1944 // include in API requests. By default, fields with empty or default values are 1945 // omitted from API requests. See 1946 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1947 // details. 1948 ForceSendFields []string `json:"-"` 1949 // NullFields is a list of field names (e.g. "Name") to include in API requests 1950 // with the JSON null value. By default, fields with empty values are omitted 1951 // from API requests. See 1952 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1953 NullFields []string `json:"-"` 1954 } 1955 1956 func (s *PropertyReference) MarshalJSON() ([]byte, error) { 1957 type NoMethod PropertyReference 1958 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1959 } 1960 1961 // Query: A query for entities. 1962 type Query struct { 1963 // DistinctOn: The properties to make distinct. The query results will contain 1964 // the first result for each distinct combination of values for the given 1965 // properties (if empty, all results are returned). Requires: * If `order` is 1966 // specified, the set of distinct on properties must appear before the 1967 // non-distinct on properties in `order`. 1968 DistinctOn []*PropertyReference `json:"distinctOn,omitempty"` 1969 // EndCursor: An ending point for the query results. Query cursors are returned 1970 // in query result batches and can only be used to limit the same query 1971 // (https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). 1972 EndCursor string `json:"endCursor,omitempty"` 1973 // Filter: The filter to apply. 1974 Filter *Filter `json:"filter,omitempty"` 1975 // Kind: The kinds to query (if empty, returns entities of all kinds). 1976 // Currently at most 1 kind may be specified. 1977 Kind []*KindExpression `json:"kind,omitempty"` 1978 // Limit: The maximum number of results to return. Applies after all other 1979 // constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 1980 // if specified. 1981 Limit int64 `json:"limit,omitempty"` 1982 // Offset: The number of results to skip. Applies before limit, but after all 1983 // other constraints. Optional. Must be >= 0 if specified. 1984 Offset int64 `json:"offset,omitempty"` 1985 // Order: The order to apply to the query results (if empty, order is 1986 // unspecified). 1987 Order []*PropertyOrder `json:"order,omitempty"` 1988 // Projection: The projection to return. Defaults to returning all properties. 1989 Projection []*Projection `json:"projection,omitempty"` 1990 // StartCursor: A starting point for the query results. Query cursors are 1991 // returned in query result batches and can only be used to continue the same 1992 // query 1993 // (https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). 1994 StartCursor string `json:"startCursor,omitempty"` 1995 // ForceSendFields is a list of field names (e.g. "DistinctOn") to 1996 // unconditionally include in API requests. By default, fields with empty or 1997 // default values are omitted from API requests. See 1998 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1999 // details. 2000 ForceSendFields []string `json:"-"` 2001 // NullFields is a list of field names (e.g. "DistinctOn") to include in API 2002 // requests with the JSON null value. By default, fields with empty values are 2003 // omitted from API requests. See 2004 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2005 NullFields []string `json:"-"` 2006 } 2007 2008 func (s *Query) MarshalJSON() ([]byte, error) { 2009 type NoMethod Query 2010 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2011 } 2012 2013 // QueryResultBatch: A batch of results produced by a query. 2014 type QueryResultBatch struct { 2015 // EndCursor: A cursor that points to the position after the last result in the 2016 // batch. 2017 EndCursor string `json:"endCursor,omitempty"` 2018 // EntityResultType: The result type for every entity in `entity_results`. 2019 // 2020 // Possible values: 2021 // "RESULT_TYPE_UNSPECIFIED" - Unspecified. This value is never used. 2022 // "FULL" - The key and properties. 2023 // "PROJECTION" - A projected subset of properties. The entity may have no 2024 // key. 2025 // "KEY_ONLY" - Only the key. 2026 EntityResultType string `json:"entityResultType,omitempty"` 2027 // EntityResults: The results for this batch. 2028 EntityResults []*EntityResult `json:"entityResults,omitempty"` 2029 // MoreResults: The state of the query after the current batch. 2030 // 2031 // Possible values: 2032 // "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never used. 2033 // "NOT_FINISHED" - There may be additional batches to fetch from this query. 2034 // "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may be more 2035 // results after the limit. 2036 // "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may be more 2037 // results after the end cursor. 2038 // "NO_MORE_RESULTS" - The query is finished, and there are no more results. 2039 MoreResults string `json:"moreResults,omitempty"` 2040 // ReadTime: Read timestamp this batch was returned from. This applies to the 2041 // range of results from the query's `start_cursor` (or the beginning of the 2042 // query if no cursor was given) to this batch's `end_cursor` (not the query's 2043 // `end_cursor`). In a single transaction, subsequent query result batches for 2044 // the same query can have a greater timestamp. Each batch's read timestamp is 2045 // valid for all preceding batches. This value will not be set for eventually 2046 // consistent queries in Cloud Datastore. 2047 ReadTime string `json:"readTime,omitempty"` 2048 // SkippedCursor: A cursor that points to the position after the last skipped 2049 // result. Will be set when `skipped_results` != 0. 2050 SkippedCursor string `json:"skippedCursor,omitempty"` 2051 // SkippedResults: The number of results skipped, typically because of an 2052 // offset. 2053 SkippedResults int64 `json:"skippedResults,omitempty"` 2054 // SnapshotVersion: The version number of the snapshot this batch was returned 2055 // from. This applies to the range of results from the query's `start_cursor` 2056 // (or the beginning of the query if no cursor was given) to this batch's 2057 // `end_cursor` (not the query's `end_cursor`). In a single transaction, 2058 // subsequent query result batches for the same query can have a greater 2059 // snapshot version number. Each batch's snapshot version is valid for all 2060 // preceding batches. The value will be zero for eventually consistent queries. 2061 SnapshotVersion int64 `json:"snapshotVersion,omitempty,string"` 2062 // ForceSendFields is a list of field names (e.g. "EndCursor") to 2063 // unconditionally include in API requests. By default, fields with empty or 2064 // default values are omitted from API requests. See 2065 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2066 // details. 2067 ForceSendFields []string `json:"-"` 2068 // NullFields is a list of field names (e.g. "EndCursor") to include in API 2069 // requests with the JSON null value. By default, fields with empty values are 2070 // omitted from API requests. See 2071 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2072 NullFields []string `json:"-"` 2073 } 2074 2075 func (s *QueryResultBatch) MarshalJSON() ([]byte, error) { 2076 type NoMethod QueryResultBatch 2077 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2078 } 2079 2080 // ReadOnly: Options specific to read-only transactions. 2081 type ReadOnly struct { 2082 // ReadTime: Reads entities at the given time. This must be a microsecond 2083 // precision timestamp within the past one hour, or if Point-in-Time Recovery 2084 // is enabled, can additionally be a whole minute timestamp within the past 7 2085 // days. 2086 ReadTime string `json:"readTime,omitempty"` 2087 // ForceSendFields is a list of field names (e.g. "ReadTime") to 2088 // unconditionally include in API requests. By default, fields with empty or 2089 // default values are omitted from API requests. See 2090 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2091 // details. 2092 ForceSendFields []string `json:"-"` 2093 // NullFields is a list of field names (e.g. "ReadTime") to include in API 2094 // requests with the JSON null value. By default, fields with empty values are 2095 // omitted from API requests. See 2096 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2097 NullFields []string `json:"-"` 2098 } 2099 2100 func (s *ReadOnly) MarshalJSON() ([]byte, error) { 2101 type NoMethod ReadOnly 2102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2103 } 2104 2105 // ReadOptions: The options shared by read requests. 2106 type ReadOptions struct { 2107 // ReadConsistency: The non-transactional read consistency to use. 2108 // 2109 // Possible values: 2110 // "READ_CONSISTENCY_UNSPECIFIED" - Unspecified. This value must not be used. 2111 // "STRONG" - Strong consistency. 2112 // "EVENTUAL" - Eventual consistency. 2113 ReadConsistency string `json:"readConsistency,omitempty"` 2114 // ReadTime: Reads entities as they were at the given time. This value is only 2115 // supported for Cloud Firestore in Datastore mode. This must be a microsecond 2116 // precision timestamp within the past one hour, or if Point-in-Time Recovery 2117 // is enabled, can additionally be a whole minute timestamp within the past 7 2118 // days. 2119 ReadTime string `json:"readTime,omitempty"` 2120 // Transaction: The identifier of the transaction in which to read. A 2121 // transaction identifier is returned by a call to Datastore.BeginTransaction. 2122 Transaction string `json:"transaction,omitempty"` 2123 // ForceSendFields is a list of field names (e.g. "ReadConsistency") to 2124 // unconditionally include in API requests. By default, fields with empty or 2125 // default values are omitted from API requests. See 2126 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2127 // details. 2128 ForceSendFields []string `json:"-"` 2129 // NullFields is a list of field names (e.g. "ReadConsistency") to include in 2130 // API requests with the JSON null value. By default, fields with empty values 2131 // are omitted from API requests. See 2132 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2133 NullFields []string `json:"-"` 2134 } 2135 2136 func (s *ReadOptions) MarshalJSON() ([]byte, error) { 2137 type NoMethod ReadOptions 2138 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2139 } 2140 2141 // ReadWrite: Options specific to read / write transactions. 2142 type ReadWrite struct { 2143 // PreviousTransaction: The transaction identifier of the transaction being 2144 // retried. 2145 PreviousTransaction string `json:"previousTransaction,omitempty"` 2146 // ForceSendFields is a list of field names (e.g. "PreviousTransaction") to 2147 // unconditionally include in API requests. By default, fields with empty or 2148 // default values are omitted from API requests. See 2149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2150 // details. 2151 ForceSendFields []string `json:"-"` 2152 // NullFields is a list of field names (e.g. "PreviousTransaction") to include 2153 // in API requests with the JSON null value. By default, fields with empty 2154 // values are omitted from API requests. See 2155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2156 NullFields []string `json:"-"` 2157 } 2158 2159 func (s *ReadWrite) MarshalJSON() ([]byte, error) { 2160 type NoMethod ReadWrite 2161 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2162 } 2163 2164 // ReserveIdsRequest: The request for Datastore.ReserveIds. 2165 type ReserveIdsRequest struct { 2166 // DatabaseId: The ID of the database against which to make the request. 2167 // '(default)' is not allowed; please use empty string '' to refer the default 2168 // database. 2169 DatabaseId string `json:"databaseId,omitempty"` 2170 // Keys: Required. A list of keys with complete key paths whose numeric IDs 2171 // should not be auto-allocated. 2172 Keys []*Key `json:"keys,omitempty"` 2173 // ForceSendFields is a list of field names (e.g. "DatabaseId") to 2174 // unconditionally include in API requests. By default, fields with empty or 2175 // default values are omitted from API requests. See 2176 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2177 // details. 2178 ForceSendFields []string `json:"-"` 2179 // NullFields is a list of field names (e.g. "DatabaseId") to include in API 2180 // requests with the JSON null value. By default, fields with empty values are 2181 // omitted from API requests. See 2182 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2183 NullFields []string `json:"-"` 2184 } 2185 2186 func (s *ReserveIdsRequest) MarshalJSON() ([]byte, error) { 2187 type NoMethod ReserveIdsRequest 2188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2189 } 2190 2191 // ReserveIdsResponse: The response for Datastore.ReserveIds. 2192 type ReserveIdsResponse struct { 2193 // ServerResponse contains the HTTP response code and headers from the server. 2194 googleapi.ServerResponse `json:"-"` 2195 } 2196 2197 // RollbackRequest: The request for Datastore.Rollback. 2198 type RollbackRequest struct { 2199 // Transaction: Required. The transaction identifier, returned by a call to 2200 // Datastore.BeginTransaction. 2201 Transaction string `json:"transaction,omitempty"` 2202 // ForceSendFields is a list of field names (e.g. "Transaction") to 2203 // unconditionally include in API requests. By default, fields with empty or 2204 // default values are omitted from API requests. See 2205 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2206 // details. 2207 ForceSendFields []string `json:"-"` 2208 // NullFields is a list of field names (e.g. "Transaction") to include in API 2209 // requests with the JSON null value. By default, fields with empty values are 2210 // omitted from API requests. See 2211 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2212 NullFields []string `json:"-"` 2213 } 2214 2215 func (s *RollbackRequest) MarshalJSON() ([]byte, error) { 2216 type NoMethod RollbackRequest 2217 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2218 } 2219 2220 // RollbackResponse: The response for Datastore.Rollback. (an empty message). 2221 type RollbackResponse struct { 2222 // ServerResponse contains the HTTP response code and headers from the server. 2223 googleapi.ServerResponse `json:"-"` 2224 } 2225 2226 // RunAggregationQueryRequest: The request for Datastore.RunAggregationQuery. 2227 type RunAggregationQueryRequest struct { 2228 // AggregationQuery: The query to run. 2229 AggregationQuery *AggregationQuery `json:"aggregationQuery,omitempty"` 2230 // ExplainOptions: Optional. Explain options for the query. If set, additional 2231 // query statistics will be returned. If not, only query results will be 2232 // returned. 2233 ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` 2234 // GqlQuery: The GQL query to run. This query must be an aggregation query. 2235 GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` 2236 // PartitionId: Entities are partitioned into subsets, identified by a 2237 // partition ID. Queries are scoped to a single partition. This partition ID is 2238 // normalized with the standard default context partition ID. 2239 PartitionId *PartitionId `json:"partitionId,omitempty"` 2240 // ReadOptions: The options for this query. 2241 ReadOptions *ReadOptions `json:"readOptions,omitempty"` 2242 // ForceSendFields is a list of field names (e.g. "AggregationQuery") to 2243 // unconditionally include in API requests. By default, fields with empty or 2244 // default values are omitted from API requests. See 2245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2246 // details. 2247 ForceSendFields []string `json:"-"` 2248 // NullFields is a list of field names (e.g. "AggregationQuery") to include in 2249 // API requests with the JSON null value. By default, fields with empty values 2250 // are omitted from API requests. See 2251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2252 NullFields []string `json:"-"` 2253 } 2254 2255 func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) { 2256 type NoMethod RunAggregationQueryRequest 2257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2258 } 2259 2260 // RunAggregationQueryResponse: The response for Datastore.RunAggregationQuery. 2261 type RunAggregationQueryResponse struct { 2262 // Batch: A batch of aggregation results. Always present. 2263 Batch *AggregationResultBatch `json:"batch,omitempty"` 2264 // ExplainMetrics: Query explain metrics. This is only present when the 2265 // RunAggregationQueryRequest.explain_options is provided, and it is sent only 2266 // once with the last response in the stream. 2267 ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"` 2268 // Query: The parsed form of the `GqlQuery` from the request, if it was set. 2269 Query *AggregationQuery `json:"query,omitempty"` 2270 2271 // ServerResponse contains the HTTP response code and headers from the server. 2272 googleapi.ServerResponse `json:"-"` 2273 // ForceSendFields is a list of field names (e.g. "Batch") to unconditionally 2274 // include in API requests. By default, fields with empty or default values are 2275 // omitted from API requests. See 2276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2277 // details. 2278 ForceSendFields []string `json:"-"` 2279 // NullFields is a list of field names (e.g. "Batch") to include in API 2280 // requests with the JSON null value. By default, fields with empty values are 2281 // omitted from API requests. See 2282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2283 NullFields []string `json:"-"` 2284 } 2285 2286 func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { 2287 type NoMethod RunAggregationQueryResponse 2288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2289 } 2290 2291 // RunQueryRequest: The request for Datastore.RunQuery. 2292 type RunQueryRequest struct { 2293 // ExplainOptions: Optional. Explain options for the query. If set, additional 2294 // query statistics will be returned. If not, only query results will be 2295 // returned. 2296 ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` 2297 // GqlQuery: The GQL query to run. This query must be a non-aggregation query. 2298 GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` 2299 // PartitionId: Entities are partitioned into subsets, identified by a 2300 // partition ID. Queries are scoped to a single partition. This partition ID is 2301 // normalized with the standard default context partition ID. 2302 PartitionId *PartitionId `json:"partitionId,omitempty"` 2303 // PropertyMask: The properties to return. This field must not be set for a 2304 // projection query. See LookupRequest.property_mask. 2305 PropertyMask *PropertyMask `json:"propertyMask,omitempty"` 2306 // Query: The query to run. 2307 Query *Query `json:"query,omitempty"` 2308 // ReadOptions: The options for this query. 2309 ReadOptions *ReadOptions `json:"readOptions,omitempty"` 2310 // ForceSendFields is a list of field names (e.g. "ExplainOptions") to 2311 // unconditionally include in API requests. By default, fields with empty or 2312 // default values are omitted from API requests. See 2313 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2314 // details. 2315 ForceSendFields []string `json:"-"` 2316 // NullFields is a list of field names (e.g. "ExplainOptions") to include in 2317 // API requests with the JSON null value. By default, fields with empty values 2318 // are omitted from API requests. See 2319 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2320 NullFields []string `json:"-"` 2321 } 2322 2323 func (s *RunQueryRequest) MarshalJSON() ([]byte, error) { 2324 type NoMethod RunQueryRequest 2325 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2326 } 2327 2328 // RunQueryResponse: The response for Datastore.RunQuery. 2329 type RunQueryResponse struct { 2330 // Batch: A batch of query results (always present). 2331 Batch *QueryResultBatch `json:"batch,omitempty"` 2332 // ExplainMetrics: Query explain metrics. This is only present when the 2333 // RunQueryRequest.explain_options is provided, and it is sent only once with 2334 // the last response in the stream. 2335 ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"` 2336 // Query: The parsed form of the `GqlQuery` from the request, if it was set. 2337 Query *Query `json:"query,omitempty"` 2338 2339 // ServerResponse contains the HTTP response code and headers from the server. 2340 googleapi.ServerResponse `json:"-"` 2341 // ForceSendFields is a list of field names (e.g. "Batch") to unconditionally 2342 // include in API requests. By default, fields with empty or default values are 2343 // omitted from API requests. See 2344 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2345 // details. 2346 ForceSendFields []string `json:"-"` 2347 // NullFields is a list of field names (e.g. "Batch") to include in API 2348 // requests with the JSON null value. By default, fields with empty values are 2349 // omitted from API requests. See 2350 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2351 NullFields []string `json:"-"` 2352 } 2353 2354 func (s *RunQueryResponse) MarshalJSON() ([]byte, error) { 2355 type NoMethod RunQueryResponse 2356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2357 } 2358 2359 // Sum: Sum of the values of the requested property. * Only numeric values will 2360 // be aggregated. All non-numeric values including `NULL` are skipped. * If the 2361 // aggregated values contain `NaN`, returns `NaN`. Infinity math follows 2362 // IEEE-754 standards. * If the aggregated value set is empty, returns 0. * 2363 // Returns a 64-bit integer if all aggregated numbers are integers and the sum 2364 // result does not overflow. Otherwise, the result is returned as a double. 2365 // Note that even if all the aggregated values are integers, the result is 2366 // returned as a double if it cannot fit within a 64-bit signed integer. When 2367 // this occurs, the returned value will lose precision. * When underflow 2368 // occurs, floating-point aggregation is non-deterministic. This means that 2369 // running the same query repeatedly without any changes to the underlying 2370 // values could produce slightly different results each time. In those cases, 2371 // values should be stored as integers over floating-point numbers. 2372 type Sum struct { 2373 // Property: The property to aggregate on. 2374 Property *PropertyReference `json:"property,omitempty"` 2375 // ForceSendFields is a list of field names (e.g. "Property") to 2376 // unconditionally include in API requests. By default, fields with empty or 2377 // default values are omitted from API requests. See 2378 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2379 // details. 2380 ForceSendFields []string `json:"-"` 2381 // NullFields is a list of field names (e.g. "Property") to include in API 2382 // requests with the JSON null value. By default, fields with empty values are 2383 // omitted from API requests. See 2384 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2385 NullFields []string `json:"-"` 2386 } 2387 2388 func (s *Sum) MarshalJSON() ([]byte, error) { 2389 type NoMethod Sum 2390 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2391 } 2392 2393 // TransactionOptions: Options for beginning a new transaction. Transactions 2394 // can be created explicitly with calls to Datastore.BeginTransaction or 2395 // implicitly by setting ReadOptions.new_transaction in read requests. 2396 type TransactionOptions struct { 2397 // ReadOnly: The transaction should only allow reads. 2398 ReadOnly *ReadOnly `json:"readOnly,omitempty"` 2399 // ReadWrite: The transaction should allow both reads and writes. 2400 ReadWrite *ReadWrite `json:"readWrite,omitempty"` 2401 // ForceSendFields is a list of field names (e.g. "ReadOnly") to 2402 // unconditionally include in API requests. By default, fields with empty or 2403 // default values are omitted from API requests. See 2404 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2405 // details. 2406 ForceSendFields []string `json:"-"` 2407 // NullFields is a list of field names (e.g. "ReadOnly") to include in API 2408 // requests with the JSON null value. By default, fields with empty values are 2409 // omitted from API requests. See 2410 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2411 NullFields []string `json:"-"` 2412 } 2413 2414 func (s *TransactionOptions) MarshalJSON() ([]byte, error) { 2415 type NoMethod TransactionOptions 2416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2417 } 2418 2419 // Value: A message that can hold any of the supported value types and 2420 // associated metadata. 2421 type Value struct { 2422 // ArrayValue: An array value. Cannot contain another array value. A `Value` 2423 // instance that sets field `array_value` must not set fields `meaning` or 2424 // `exclude_from_indexes`. 2425 ArrayValue *ArrayValue `json:"arrayValue,omitempty"` 2426 // BlobValue: A blob value. May have at most 1,000,000 bytes. When 2427 // `exclude_from_indexes` is false, may have at most 1500 bytes. In JSON 2428 // requests, must be base64-encoded. 2429 BlobValue *string `json:"blobValue,omitempty"` 2430 // BooleanValue: A boolean value. 2431 BooleanValue *bool `json:"booleanValue,omitempty"` 2432 // DoubleValue: A double value. 2433 DoubleValue *float64 `json:"doubleValue,omitempty"` 2434 // EntityValue: An entity value. - May have no key. - May have a key with an 2435 // incomplete key path. - May have a reserved/read-only key. 2436 EntityValue *Entity `json:"entityValue,omitempty"` 2437 // ExcludeFromIndexes: If the value should be excluded from all indexes 2438 // including those defined explicitly. 2439 ExcludeFromIndexes bool `json:"excludeFromIndexes,omitempty"` 2440 // GeoPointValue: A geo point value representing a point on the surface of 2441 // Earth. 2442 GeoPointValue *LatLng `json:"geoPointValue,omitempty"` 2443 // IntegerValue: An integer value. 2444 IntegerValue *int64 `json:"integerValue,omitempty,string"` 2445 // KeyValue: A key value. 2446 KeyValue *Key `json:"keyValue,omitempty"` 2447 // Meaning: The `meaning` field should only be populated for backwards 2448 // compatibility. 2449 Meaning int64 `json:"meaning,omitempty"` 2450 // NullValue: A null value. 2451 // 2452 // Possible values: 2453 // "NULL_VALUE" - Null value. 2454 NullValue string `json:"nullValue,omitempty"` 2455 // StringValue: A UTF-8 encoded string value. When `exclude_from_indexes` is 2456 // false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set 2457 // to at most 1,000,000 bytes. 2458 StringValue *string `json:"stringValue,omitempty"` 2459 // TimestampValue: A timestamp value. When stored in the Datastore, precise 2460 // only to microseconds; any additional precision is rounded down. 2461 TimestampValue *string `json:"timestampValue,omitempty"` 2462 // ForceSendFields is a list of field names (e.g. "ArrayValue") to 2463 // unconditionally include in API requests. By default, fields with empty or 2464 // default values are omitted from API requests. See 2465 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2466 // details. 2467 ForceSendFields []string `json:"-"` 2468 // NullFields is a list of field names (e.g. "ArrayValue") to include in API 2469 // requests with the JSON null value. By default, fields with empty values are 2470 // omitted from API requests. See 2471 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2472 NullFields []string `json:"-"` 2473 } 2474 2475 func (s *Value) MarshalJSON() ([]byte, error) { 2476 type NoMethod Value 2477 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2478 } 2479 2480 func (s *Value) UnmarshalJSON(data []byte) error { 2481 type NoMethod Value 2482 var s1 struct { 2483 DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"` 2484 *NoMethod 2485 } 2486 s1.NoMethod = (*NoMethod)(s) 2487 if err := json.Unmarshal(data, &s1); err != nil { 2488 return err 2489 } 2490 if s1.DoubleValue != nil { 2491 s.DoubleValue = (*float64)(s1.DoubleValue) 2492 } 2493 return nil 2494 } 2495 2496 type ProjectsAllocateIdsCall struct { 2497 s *Service 2498 projectId string 2499 allocateidsrequest *AllocateIdsRequest 2500 urlParams_ gensupport.URLParams 2501 ctx_ context.Context 2502 header_ http.Header 2503 } 2504 2505 // AllocateIds: Allocates IDs for the given keys, which is useful for 2506 // referencing an entity before it is inserted. 2507 // 2508 // - projectId: The ID of the project against which to make the request. 2509 func (r *ProjectsService) AllocateIds(projectId string, allocateidsrequest *AllocateIdsRequest) *ProjectsAllocateIdsCall { 2510 c := &ProjectsAllocateIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2511 c.projectId = projectId 2512 c.allocateidsrequest = allocateidsrequest 2513 return c 2514 } 2515 2516 // Fields allows partial responses to be retrieved. See 2517 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2518 // details. 2519 func (c *ProjectsAllocateIdsCall) Fields(s ...googleapi.Field) *ProjectsAllocateIdsCall { 2520 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2521 return c 2522 } 2523 2524 // Context sets the context to be used in this call's Do method. 2525 func (c *ProjectsAllocateIdsCall) Context(ctx context.Context) *ProjectsAllocateIdsCall { 2526 c.ctx_ = ctx 2527 return c 2528 } 2529 2530 // Header returns a http.Header that can be modified by the caller to add 2531 // headers to the request. 2532 func (c *ProjectsAllocateIdsCall) Header() http.Header { 2533 if c.header_ == nil { 2534 c.header_ = make(http.Header) 2535 } 2536 return c.header_ 2537 } 2538 2539 func (c *ProjectsAllocateIdsCall) doRequest(alt string) (*http.Response, error) { 2540 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2541 var body io.Reader = nil 2542 body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocateidsrequest) 2543 if err != nil { 2544 return nil, err 2545 } 2546 c.urlParams_.Set("alt", alt) 2547 c.urlParams_.Set("prettyPrint", "false") 2548 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:allocateIds") 2549 urls += "?" + c.urlParams_.Encode() 2550 req, err := http.NewRequest("POST", urls, body) 2551 if err != nil { 2552 return nil, err 2553 } 2554 req.Header = reqHeaders 2555 googleapi.Expand(req.URL, map[string]string{ 2556 "projectId": c.projectId, 2557 }) 2558 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2559 } 2560 2561 // Do executes the "datastore.projects.allocateIds" call. 2562 // Any non-2xx status code is an error. Response headers are in either 2563 // *AllocateIdsResponse.ServerResponse.Header or (if a response was returned at 2564 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2565 // check whether the returned error was because http.StatusNotModified was 2566 // returned. 2567 func (c *ProjectsAllocateIdsCall) Do(opts ...googleapi.CallOption) (*AllocateIdsResponse, error) { 2568 gensupport.SetOptions(c.urlParams_, opts...) 2569 res, err := c.doRequest("json") 2570 if res != nil && res.StatusCode == http.StatusNotModified { 2571 if res.Body != nil { 2572 res.Body.Close() 2573 } 2574 return nil, gensupport.WrapError(&googleapi.Error{ 2575 Code: res.StatusCode, 2576 Header: res.Header, 2577 }) 2578 } 2579 if err != nil { 2580 return nil, err 2581 } 2582 defer googleapi.CloseBody(res) 2583 if err := googleapi.CheckResponse(res); err != nil { 2584 return nil, gensupport.WrapError(err) 2585 } 2586 ret := &AllocateIdsResponse{ 2587 ServerResponse: googleapi.ServerResponse{ 2588 Header: res.Header, 2589 HTTPStatusCode: res.StatusCode, 2590 }, 2591 } 2592 target := &ret 2593 if err := gensupport.DecodeResponse(target, res); err != nil { 2594 return nil, err 2595 } 2596 return ret, nil 2597 } 2598 2599 type ProjectsBeginTransactionCall struct { 2600 s *Service 2601 projectId string 2602 begintransactionrequest *BeginTransactionRequest 2603 urlParams_ gensupport.URLParams 2604 ctx_ context.Context 2605 header_ http.Header 2606 } 2607 2608 // BeginTransaction: Begins a new transaction. 2609 // 2610 // - projectId: The ID of the project against which to make the request. 2611 func (r *ProjectsService) BeginTransaction(projectId string, begintransactionrequest *BeginTransactionRequest) *ProjectsBeginTransactionCall { 2612 c := &ProjectsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2613 c.projectId = projectId 2614 c.begintransactionrequest = begintransactionrequest 2615 return c 2616 } 2617 2618 // Fields allows partial responses to be retrieved. See 2619 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2620 // details. 2621 func (c *ProjectsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsBeginTransactionCall { 2622 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2623 return c 2624 } 2625 2626 // Context sets the context to be used in this call's Do method. 2627 func (c *ProjectsBeginTransactionCall) Context(ctx context.Context) *ProjectsBeginTransactionCall { 2628 c.ctx_ = ctx 2629 return c 2630 } 2631 2632 // Header returns a http.Header that can be modified by the caller to add 2633 // headers to the request. 2634 func (c *ProjectsBeginTransactionCall) Header() http.Header { 2635 if c.header_ == nil { 2636 c.header_ = make(http.Header) 2637 } 2638 return c.header_ 2639 } 2640 2641 func (c *ProjectsBeginTransactionCall) doRequest(alt string) (*http.Response, error) { 2642 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2643 var body io.Reader = nil 2644 body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest) 2645 if err != nil { 2646 return nil, err 2647 } 2648 c.urlParams_.Set("alt", alt) 2649 c.urlParams_.Set("prettyPrint", "false") 2650 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:beginTransaction") 2651 urls += "?" + c.urlParams_.Encode() 2652 req, err := http.NewRequest("POST", urls, body) 2653 if err != nil { 2654 return nil, err 2655 } 2656 req.Header = reqHeaders 2657 googleapi.Expand(req.URL, map[string]string{ 2658 "projectId": c.projectId, 2659 }) 2660 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2661 } 2662 2663 // Do executes the "datastore.projects.beginTransaction" call. 2664 // Any non-2xx status code is an error. Response headers are in either 2665 // *BeginTransactionResponse.ServerResponse.Header or (if a response was 2666 // returned at all) in error.(*googleapi.Error).Header. Use 2667 // googleapi.IsNotModified to check whether the returned error was because 2668 // http.StatusNotModified was returned. 2669 func (c *ProjectsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) { 2670 gensupport.SetOptions(c.urlParams_, opts...) 2671 res, err := c.doRequest("json") 2672 if res != nil && res.StatusCode == http.StatusNotModified { 2673 if res.Body != nil { 2674 res.Body.Close() 2675 } 2676 return nil, gensupport.WrapError(&googleapi.Error{ 2677 Code: res.StatusCode, 2678 Header: res.Header, 2679 }) 2680 } 2681 if err != nil { 2682 return nil, err 2683 } 2684 defer googleapi.CloseBody(res) 2685 if err := googleapi.CheckResponse(res); err != nil { 2686 return nil, gensupport.WrapError(err) 2687 } 2688 ret := &BeginTransactionResponse{ 2689 ServerResponse: googleapi.ServerResponse{ 2690 Header: res.Header, 2691 HTTPStatusCode: res.StatusCode, 2692 }, 2693 } 2694 target := &ret 2695 if err := gensupport.DecodeResponse(target, res); err != nil { 2696 return nil, err 2697 } 2698 return ret, nil 2699 } 2700 2701 type ProjectsCommitCall struct { 2702 s *Service 2703 projectId string 2704 commitrequest *CommitRequest 2705 urlParams_ gensupport.URLParams 2706 ctx_ context.Context 2707 header_ http.Header 2708 } 2709 2710 // Commit: Commits a transaction, optionally creating, deleting or modifying 2711 // some entities. 2712 // 2713 // - projectId: The ID of the project against which to make the request. 2714 func (r *ProjectsService) Commit(projectId string, commitrequest *CommitRequest) *ProjectsCommitCall { 2715 c := &ProjectsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2716 c.projectId = projectId 2717 c.commitrequest = commitrequest 2718 return c 2719 } 2720 2721 // Fields allows partial responses to be retrieved. See 2722 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2723 // details. 2724 func (c *ProjectsCommitCall) Fields(s ...googleapi.Field) *ProjectsCommitCall { 2725 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2726 return c 2727 } 2728 2729 // Context sets the context to be used in this call's Do method. 2730 func (c *ProjectsCommitCall) Context(ctx context.Context) *ProjectsCommitCall { 2731 c.ctx_ = ctx 2732 return c 2733 } 2734 2735 // Header returns a http.Header that can be modified by the caller to add 2736 // headers to the request. 2737 func (c *ProjectsCommitCall) Header() http.Header { 2738 if c.header_ == nil { 2739 c.header_ = make(http.Header) 2740 } 2741 return c.header_ 2742 } 2743 2744 func (c *ProjectsCommitCall) doRequest(alt string) (*http.Response, error) { 2745 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2746 var body io.Reader = nil 2747 body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest) 2748 if err != nil { 2749 return nil, err 2750 } 2751 c.urlParams_.Set("alt", alt) 2752 c.urlParams_.Set("prettyPrint", "false") 2753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:commit") 2754 urls += "?" + c.urlParams_.Encode() 2755 req, err := http.NewRequest("POST", urls, body) 2756 if err != nil { 2757 return nil, err 2758 } 2759 req.Header = reqHeaders 2760 googleapi.Expand(req.URL, map[string]string{ 2761 "projectId": c.projectId, 2762 }) 2763 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2764 } 2765 2766 // Do executes the "datastore.projects.commit" call. 2767 // Any non-2xx status code is an error. Response headers are in either 2768 // *CommitResponse.ServerResponse.Header or (if a response was returned at all) 2769 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2770 // whether the returned error was because http.StatusNotModified was returned. 2771 func (c *ProjectsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) { 2772 gensupport.SetOptions(c.urlParams_, opts...) 2773 res, err := c.doRequest("json") 2774 if res != nil && res.StatusCode == http.StatusNotModified { 2775 if res.Body != nil { 2776 res.Body.Close() 2777 } 2778 return nil, gensupport.WrapError(&googleapi.Error{ 2779 Code: res.StatusCode, 2780 Header: res.Header, 2781 }) 2782 } 2783 if err != nil { 2784 return nil, err 2785 } 2786 defer googleapi.CloseBody(res) 2787 if err := googleapi.CheckResponse(res); err != nil { 2788 return nil, gensupport.WrapError(err) 2789 } 2790 ret := &CommitResponse{ 2791 ServerResponse: googleapi.ServerResponse{ 2792 Header: res.Header, 2793 HTTPStatusCode: res.StatusCode, 2794 }, 2795 } 2796 target := &ret 2797 if err := gensupport.DecodeResponse(target, res); err != nil { 2798 return nil, err 2799 } 2800 return ret, nil 2801 } 2802 2803 type ProjectsLookupCall struct { 2804 s *Service 2805 projectId string 2806 lookuprequest *LookupRequest 2807 urlParams_ gensupport.URLParams 2808 ctx_ context.Context 2809 header_ http.Header 2810 } 2811 2812 // Lookup: Looks up entities by key. 2813 // 2814 // - projectId: The ID of the project against which to make the request. 2815 func (r *ProjectsService) Lookup(projectId string, lookuprequest *LookupRequest) *ProjectsLookupCall { 2816 c := &ProjectsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2817 c.projectId = projectId 2818 c.lookuprequest = lookuprequest 2819 return c 2820 } 2821 2822 // Fields allows partial responses to be retrieved. See 2823 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2824 // details. 2825 func (c *ProjectsLookupCall) Fields(s ...googleapi.Field) *ProjectsLookupCall { 2826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2827 return c 2828 } 2829 2830 // Context sets the context to be used in this call's Do method. 2831 func (c *ProjectsLookupCall) Context(ctx context.Context) *ProjectsLookupCall { 2832 c.ctx_ = ctx 2833 return c 2834 } 2835 2836 // Header returns a http.Header that can be modified by the caller to add 2837 // headers to the request. 2838 func (c *ProjectsLookupCall) Header() http.Header { 2839 if c.header_ == nil { 2840 c.header_ = make(http.Header) 2841 } 2842 return c.header_ 2843 } 2844 2845 func (c *ProjectsLookupCall) doRequest(alt string) (*http.Response, error) { 2846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2847 var body io.Reader = nil 2848 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuprequest) 2849 if err != nil { 2850 return nil, err 2851 } 2852 c.urlParams_.Set("alt", alt) 2853 c.urlParams_.Set("prettyPrint", "false") 2854 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:lookup") 2855 urls += "?" + c.urlParams_.Encode() 2856 req, err := http.NewRequest("POST", urls, body) 2857 if err != nil { 2858 return nil, err 2859 } 2860 req.Header = reqHeaders 2861 googleapi.Expand(req.URL, map[string]string{ 2862 "projectId": c.projectId, 2863 }) 2864 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2865 } 2866 2867 // Do executes the "datastore.projects.lookup" call. 2868 // Any non-2xx status code is an error. Response headers are in either 2869 // *LookupResponse.ServerResponse.Header or (if a response was returned at all) 2870 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2871 // whether the returned error was because http.StatusNotModified was returned. 2872 func (c *ProjectsLookupCall) Do(opts ...googleapi.CallOption) (*LookupResponse, error) { 2873 gensupport.SetOptions(c.urlParams_, opts...) 2874 res, err := c.doRequest("json") 2875 if res != nil && res.StatusCode == http.StatusNotModified { 2876 if res.Body != nil { 2877 res.Body.Close() 2878 } 2879 return nil, gensupport.WrapError(&googleapi.Error{ 2880 Code: res.StatusCode, 2881 Header: res.Header, 2882 }) 2883 } 2884 if err != nil { 2885 return nil, err 2886 } 2887 defer googleapi.CloseBody(res) 2888 if err := googleapi.CheckResponse(res); err != nil { 2889 return nil, gensupport.WrapError(err) 2890 } 2891 ret := &LookupResponse{ 2892 ServerResponse: googleapi.ServerResponse{ 2893 Header: res.Header, 2894 HTTPStatusCode: res.StatusCode, 2895 }, 2896 } 2897 target := &ret 2898 if err := gensupport.DecodeResponse(target, res); err != nil { 2899 return nil, err 2900 } 2901 return ret, nil 2902 } 2903 2904 type ProjectsReserveIdsCall struct { 2905 s *Service 2906 projectId string 2907 reserveidsrequest *ReserveIdsRequest 2908 urlParams_ gensupport.URLParams 2909 ctx_ context.Context 2910 header_ http.Header 2911 } 2912 2913 // ReserveIds: Prevents the supplied keys' IDs from being auto-allocated by 2914 // Cloud Datastore. 2915 // 2916 // - projectId: The ID of the project against which to make the request. 2917 func (r *ProjectsService) ReserveIds(projectId string, reserveidsrequest *ReserveIdsRequest) *ProjectsReserveIdsCall { 2918 c := &ProjectsReserveIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2919 c.projectId = projectId 2920 c.reserveidsrequest = reserveidsrequest 2921 return c 2922 } 2923 2924 // Fields allows partial responses to be retrieved. See 2925 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2926 // details. 2927 func (c *ProjectsReserveIdsCall) Fields(s ...googleapi.Field) *ProjectsReserveIdsCall { 2928 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2929 return c 2930 } 2931 2932 // Context sets the context to be used in this call's Do method. 2933 func (c *ProjectsReserveIdsCall) Context(ctx context.Context) *ProjectsReserveIdsCall { 2934 c.ctx_ = ctx 2935 return c 2936 } 2937 2938 // Header returns a http.Header that can be modified by the caller to add 2939 // headers to the request. 2940 func (c *ProjectsReserveIdsCall) Header() http.Header { 2941 if c.header_ == nil { 2942 c.header_ = make(http.Header) 2943 } 2944 return c.header_ 2945 } 2946 2947 func (c *ProjectsReserveIdsCall) doRequest(alt string) (*http.Response, error) { 2948 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2949 var body io.Reader = nil 2950 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reserveidsrequest) 2951 if err != nil { 2952 return nil, err 2953 } 2954 c.urlParams_.Set("alt", alt) 2955 c.urlParams_.Set("prettyPrint", "false") 2956 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:reserveIds") 2957 urls += "?" + c.urlParams_.Encode() 2958 req, err := http.NewRequest("POST", urls, body) 2959 if err != nil { 2960 return nil, err 2961 } 2962 req.Header = reqHeaders 2963 googleapi.Expand(req.URL, map[string]string{ 2964 "projectId": c.projectId, 2965 }) 2966 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2967 } 2968 2969 // Do executes the "datastore.projects.reserveIds" call. 2970 // Any non-2xx status code is an error. Response headers are in either 2971 // *ReserveIdsResponse.ServerResponse.Header or (if a response was returned at 2972 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2973 // check whether the returned error was because http.StatusNotModified was 2974 // returned. 2975 func (c *ProjectsReserveIdsCall) Do(opts ...googleapi.CallOption) (*ReserveIdsResponse, error) { 2976 gensupport.SetOptions(c.urlParams_, opts...) 2977 res, err := c.doRequest("json") 2978 if res != nil && res.StatusCode == http.StatusNotModified { 2979 if res.Body != nil { 2980 res.Body.Close() 2981 } 2982 return nil, gensupport.WrapError(&googleapi.Error{ 2983 Code: res.StatusCode, 2984 Header: res.Header, 2985 }) 2986 } 2987 if err != nil { 2988 return nil, err 2989 } 2990 defer googleapi.CloseBody(res) 2991 if err := googleapi.CheckResponse(res); err != nil { 2992 return nil, gensupport.WrapError(err) 2993 } 2994 ret := &ReserveIdsResponse{ 2995 ServerResponse: googleapi.ServerResponse{ 2996 Header: res.Header, 2997 HTTPStatusCode: res.StatusCode, 2998 }, 2999 } 3000 target := &ret 3001 if err := gensupport.DecodeResponse(target, res); err != nil { 3002 return nil, err 3003 } 3004 return ret, nil 3005 } 3006 3007 type ProjectsRollbackCall struct { 3008 s *Service 3009 projectId string 3010 rollbackrequest *RollbackRequest 3011 urlParams_ gensupport.URLParams 3012 ctx_ context.Context 3013 header_ http.Header 3014 } 3015 3016 // Rollback: Rolls back a transaction. 3017 // 3018 // - projectId: The ID of the project against which to make the request. 3019 func (r *ProjectsService) Rollback(projectId string, rollbackrequest *RollbackRequest) *ProjectsRollbackCall { 3020 c := &ProjectsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3021 c.projectId = projectId 3022 c.rollbackrequest = rollbackrequest 3023 return c 3024 } 3025 3026 // Fields allows partial responses to be retrieved. See 3027 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3028 // details. 3029 func (c *ProjectsRollbackCall) Fields(s ...googleapi.Field) *ProjectsRollbackCall { 3030 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3031 return c 3032 } 3033 3034 // Context sets the context to be used in this call's Do method. 3035 func (c *ProjectsRollbackCall) Context(ctx context.Context) *ProjectsRollbackCall { 3036 c.ctx_ = ctx 3037 return c 3038 } 3039 3040 // Header returns a http.Header that can be modified by the caller to add 3041 // headers to the request. 3042 func (c *ProjectsRollbackCall) Header() http.Header { 3043 if c.header_ == nil { 3044 c.header_ = make(http.Header) 3045 } 3046 return c.header_ 3047 } 3048 3049 func (c *ProjectsRollbackCall) doRequest(alt string) (*http.Response, error) { 3050 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3051 var body io.Reader = nil 3052 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest) 3053 if err != nil { 3054 return nil, err 3055 } 3056 c.urlParams_.Set("alt", alt) 3057 c.urlParams_.Set("prettyPrint", "false") 3058 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:rollback") 3059 urls += "?" + c.urlParams_.Encode() 3060 req, err := http.NewRequest("POST", urls, body) 3061 if err != nil { 3062 return nil, err 3063 } 3064 req.Header = reqHeaders 3065 googleapi.Expand(req.URL, map[string]string{ 3066 "projectId": c.projectId, 3067 }) 3068 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3069 } 3070 3071 // Do executes the "datastore.projects.rollback" call. 3072 // Any non-2xx status code is an error. Response headers are in either 3073 // *RollbackResponse.ServerResponse.Header or (if a response was returned at 3074 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3075 // check whether the returned error was because http.StatusNotModified was 3076 // returned. 3077 func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackResponse, error) { 3078 gensupport.SetOptions(c.urlParams_, opts...) 3079 res, err := c.doRequest("json") 3080 if res != nil && res.StatusCode == http.StatusNotModified { 3081 if res.Body != nil { 3082 res.Body.Close() 3083 } 3084 return nil, gensupport.WrapError(&googleapi.Error{ 3085 Code: res.StatusCode, 3086 Header: res.Header, 3087 }) 3088 } 3089 if err != nil { 3090 return nil, err 3091 } 3092 defer googleapi.CloseBody(res) 3093 if err := googleapi.CheckResponse(res); err != nil { 3094 return nil, gensupport.WrapError(err) 3095 } 3096 ret := &RollbackResponse{ 3097 ServerResponse: googleapi.ServerResponse{ 3098 Header: res.Header, 3099 HTTPStatusCode: res.StatusCode, 3100 }, 3101 } 3102 target := &ret 3103 if err := gensupport.DecodeResponse(target, res); err != nil { 3104 return nil, err 3105 } 3106 return ret, nil 3107 } 3108 3109 type ProjectsRunAggregationQueryCall struct { 3110 s *Service 3111 projectId string 3112 runaggregationqueryrequest *RunAggregationQueryRequest 3113 urlParams_ gensupport.URLParams 3114 ctx_ context.Context 3115 header_ http.Header 3116 } 3117 3118 // RunAggregationQuery: Runs an aggregation query. 3119 // 3120 // - projectId: The ID of the project against which to make the request. 3121 func (r *ProjectsService) RunAggregationQuery(projectId string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsRunAggregationQueryCall { 3122 c := &ProjectsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3123 c.projectId = projectId 3124 c.runaggregationqueryrequest = runaggregationqueryrequest 3125 return c 3126 } 3127 3128 // Fields allows partial responses to be retrieved. See 3129 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3130 // details. 3131 func (c *ProjectsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsRunAggregationQueryCall { 3132 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3133 return c 3134 } 3135 3136 // Context sets the context to be used in this call's Do method. 3137 func (c *ProjectsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsRunAggregationQueryCall { 3138 c.ctx_ = ctx 3139 return c 3140 } 3141 3142 // Header returns a http.Header that can be modified by the caller to add 3143 // headers to the request. 3144 func (c *ProjectsRunAggregationQueryCall) Header() http.Header { 3145 if c.header_ == nil { 3146 c.header_ = make(http.Header) 3147 } 3148 return c.header_ 3149 } 3150 3151 func (c *ProjectsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) { 3152 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3153 var body io.Reader = nil 3154 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest) 3155 if err != nil { 3156 return nil, err 3157 } 3158 c.urlParams_.Set("alt", alt) 3159 c.urlParams_.Set("prettyPrint", "false") 3160 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:runAggregationQuery") 3161 urls += "?" + c.urlParams_.Encode() 3162 req, err := http.NewRequest("POST", urls, body) 3163 if err != nil { 3164 return nil, err 3165 } 3166 req.Header = reqHeaders 3167 googleapi.Expand(req.URL, map[string]string{ 3168 "projectId": c.projectId, 3169 }) 3170 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3171 } 3172 3173 // Do executes the "datastore.projects.runAggregationQuery" call. 3174 // Any non-2xx status code is an error. Response headers are in either 3175 // *RunAggregationQueryResponse.ServerResponse.Header or (if a response was 3176 // returned at all) in error.(*googleapi.Error).Header. Use 3177 // googleapi.IsNotModified to check whether the returned error was because 3178 // http.StatusNotModified was returned. 3179 func (c *ProjectsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) { 3180 gensupport.SetOptions(c.urlParams_, opts...) 3181 res, err := c.doRequest("json") 3182 if res != nil && res.StatusCode == http.StatusNotModified { 3183 if res.Body != nil { 3184 res.Body.Close() 3185 } 3186 return nil, gensupport.WrapError(&googleapi.Error{ 3187 Code: res.StatusCode, 3188 Header: res.Header, 3189 }) 3190 } 3191 if err != nil { 3192 return nil, err 3193 } 3194 defer googleapi.CloseBody(res) 3195 if err := googleapi.CheckResponse(res); err != nil { 3196 return nil, gensupport.WrapError(err) 3197 } 3198 ret := &RunAggregationQueryResponse{ 3199 ServerResponse: googleapi.ServerResponse{ 3200 Header: res.Header, 3201 HTTPStatusCode: res.StatusCode, 3202 }, 3203 } 3204 target := &ret 3205 if err := gensupport.DecodeResponse(target, res); err != nil { 3206 return nil, err 3207 } 3208 return ret, nil 3209 } 3210 3211 type ProjectsRunQueryCall struct { 3212 s *Service 3213 projectId string 3214 runqueryrequest *RunQueryRequest 3215 urlParams_ gensupport.URLParams 3216 ctx_ context.Context 3217 header_ http.Header 3218 } 3219 3220 // RunQuery: Queries for entities. 3221 // 3222 // - projectId: The ID of the project against which to make the request. 3223 func (r *ProjectsService) RunQuery(projectId string, runqueryrequest *RunQueryRequest) *ProjectsRunQueryCall { 3224 c := &ProjectsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3225 c.projectId = projectId 3226 c.runqueryrequest = runqueryrequest 3227 return c 3228 } 3229 3230 // Fields allows partial responses to be retrieved. See 3231 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3232 // details. 3233 func (c *ProjectsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsRunQueryCall { 3234 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3235 return c 3236 } 3237 3238 // Context sets the context to be used in this call's Do method. 3239 func (c *ProjectsRunQueryCall) Context(ctx context.Context) *ProjectsRunQueryCall { 3240 c.ctx_ = ctx 3241 return c 3242 } 3243 3244 // Header returns a http.Header that can be modified by the caller to add 3245 // headers to the request. 3246 func (c *ProjectsRunQueryCall) Header() http.Header { 3247 if c.header_ == nil { 3248 c.header_ = make(http.Header) 3249 } 3250 return c.header_ 3251 } 3252 3253 func (c *ProjectsRunQueryCall) doRequest(alt string) (*http.Response, error) { 3254 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3255 var body io.Reader = nil 3256 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest) 3257 if err != nil { 3258 return nil, err 3259 } 3260 c.urlParams_.Set("alt", alt) 3261 c.urlParams_.Set("prettyPrint", "false") 3262 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/projects/{projectId}:runQuery") 3263 urls += "?" + c.urlParams_.Encode() 3264 req, err := http.NewRequest("POST", urls, body) 3265 if err != nil { 3266 return nil, err 3267 } 3268 req.Header = reqHeaders 3269 googleapi.Expand(req.URL, map[string]string{ 3270 "projectId": c.projectId, 3271 }) 3272 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3273 } 3274 3275 // Do executes the "datastore.projects.runQuery" call. 3276 // Any non-2xx status code is an error. Response headers are in either 3277 // *RunQueryResponse.ServerResponse.Header or (if a response was returned at 3278 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3279 // check whether the returned error was because http.StatusNotModified was 3280 // returned. 3281 func (c *ProjectsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) { 3282 gensupport.SetOptions(c.urlParams_, opts...) 3283 res, err := c.doRequest("json") 3284 if res != nil && res.StatusCode == http.StatusNotModified { 3285 if res.Body != nil { 3286 res.Body.Close() 3287 } 3288 return nil, gensupport.WrapError(&googleapi.Error{ 3289 Code: res.StatusCode, 3290 Header: res.Header, 3291 }) 3292 } 3293 if err != nil { 3294 return nil, err 3295 } 3296 defer googleapi.CloseBody(res) 3297 if err := googleapi.CheckResponse(res); err != nil { 3298 return nil, gensupport.WrapError(err) 3299 } 3300 ret := &RunQueryResponse{ 3301 ServerResponse: googleapi.ServerResponse{ 3302 Header: res.Header, 3303 HTTPStatusCode: res.StatusCode, 3304 }, 3305 } 3306 target := &ret 3307 if err := gensupport.DecodeResponse(target, res); err != nil { 3308 return nil, err 3309 } 3310 return ret, nil 3311 } 3312