~sinzui/ubuntu/vivid/juju-core/vivid-1.24.6

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/datastore/v1beta1/datastore-gen.go

  • Committer: Curtis Hovey
  • Date: 2015-09-30 14:14:54 UTC
  • mfrom: (1.1.34)
  • Revision ID: curtis@hovey.name-20150930141454-o3ldf23dzyjio6c0
Backport of 1.24.6 from wily. (LP: #1500916)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Package datastore provides access to the Google Cloud Datastore API.
 
2
//
 
3
// See https://developers.google.com/datastore/
 
4
//
 
5
// Usage example:
 
6
//
 
7
//   import "google.golang.org/api/datastore/v1beta1"
 
8
//   ...
 
9
//   datastoreService, err := datastore.New(oauthHttpClient)
 
10
package datastore
 
11
 
 
12
import (
 
13
        "bytes"
 
14
        "encoding/json"
 
15
        "errors"
 
16
        "fmt"
 
17
        "google.golang.org/api/googleapi"
 
18
        "io"
 
19
        "net/http"
 
20
        "net/url"
 
21
        "strconv"
 
22
        "strings"
 
23
)
 
24
 
 
25
// Always reference these packages, just in case the auto-generated code
 
26
// below doesn't.
 
27
var _ = bytes.NewBuffer
 
28
var _ = strconv.Itoa
 
29
var _ = fmt.Sprintf
 
30
var _ = json.NewDecoder
 
31
var _ = io.Copy
 
32
var _ = url.Parse
 
33
var _ = googleapi.Version
 
34
var _ = errors.New
 
35
var _ = strings.Replace
 
36
 
 
37
const apiId = "datastore:v1beta1"
 
38
const apiName = "datastore"
 
39
const apiVersion = "v1beta1"
 
40
const basePath = "https://www.googleapis.com/datastore/v1beta1/datasets/"
 
41
 
 
42
// OAuth2 scopes used by this API.
 
43
const (
 
44
        // View and manage your data across Google Cloud Platform services
 
45
        CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
 
46
 
 
47
        // View and manage your Google Cloud Datastore data
 
48
        DatastoreScope = "https://www.googleapis.com/auth/datastore"
 
49
 
 
50
        // View your email address
 
51
        UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
 
52
)
 
53
 
 
54
func New(client *http.Client) (*Service, error) {
 
55
        if client == nil {
 
56
                return nil, errors.New("client is nil")
 
57
        }
 
58
        s := &Service{client: client, BasePath: basePath}
 
59
        s.Datasets = NewDatasetsService(s)
 
60
        return s, nil
 
61
}
 
62
 
 
63
type Service struct {
 
64
        client   *http.Client
 
65
        BasePath string // API endpoint base URL
 
66
 
 
67
        Datasets *DatasetsService
 
68
}
 
69
 
 
70
func NewDatasetsService(s *Service) *DatasetsService {
 
71
        rs := &DatasetsService{s: s}
 
72
        return rs
 
73
}
 
74
 
 
75
type DatasetsService struct {
 
76
        s *Service
 
77
}
 
78
 
 
79
type AllocateIdsRequest struct {
 
80
        // Keys: A list of keys with incomplete key paths to allocate IDs for.
 
81
        // No key may be reserved/read-only.
 
82
        Keys []*Key `json:"keys,omitempty"`
 
83
}
 
84
 
 
85
type AllocateIdsResponse struct {
 
86
        Header *ResponseHeader `json:"header,omitempty"`
 
87
 
 
88
        // Keys: The keys specified in the request (in the same order), each
 
89
        // with its key path completed with a newly allocated ID.
 
90
        Keys []*Key `json:"keys,omitempty"`
 
91
}
 
92
 
 
93
type BeginTransactionRequest struct {
 
94
        // IsolationLevel: The transaction isolation level. Either snapshot or
 
95
        // serializable. The default isolation level is snapshot isolation,
 
96
        // which means that another transaction may not concurrently modify the
 
97
        // data that is modified by this transaction. Optionally, a transaction
 
98
        // can request to be made serializable which means that another
 
99
        // transaction cannot concurrently modify the data that is read or
 
100
        // modified by this transaction.
 
101
        IsolationLevel string `json:"isolationLevel,omitempty"`
 
102
}
 
103
 
 
104
type BeginTransactionResponse struct {
 
105
        Header *ResponseHeader `json:"header,omitempty"`
 
106
 
 
107
        // Transaction: The transaction identifier (always present).
 
108
        Transaction string `json:"transaction,omitempty"`
 
109
}
 
110
 
 
111
type BlindWriteRequest struct {
 
112
        // Mutation: The mutation to perform.
 
113
        Mutation *Mutation `json:"mutation,omitempty"`
 
114
}
 
115
 
 
116
type BlindWriteResponse struct {
 
117
        Header *ResponseHeader `json:"header,omitempty"`
 
118
 
 
119
        // MutationResult: The result of performing the mutation (always
 
120
        // present).
 
121
        MutationResult *MutationResult `json:"mutationResult,omitempty"`
 
122
}
 
123
 
 
124
type CommitRequest struct {
 
125
        IgnoreReadOnly bool `json:"ignoreReadOnly,omitempty"`
 
126
 
 
127
        // Mutation: The mutation to perform. Optional.
 
128
        Mutation *Mutation `json:"mutation,omitempty"`
 
129
 
 
130
        // Transaction: The transaction identifier, returned by a call to
 
131
        // beginTransaction. Must be set when mode is TRANSACTIONAL.
 
132
        Transaction string `json:"transaction,omitempty"`
 
133
}
 
134
 
 
135
type CommitResponse struct {
 
136
        Header *ResponseHeader `json:"header,omitempty"`
 
137
 
 
138
        // MutationResult: The result of performing the mutation (if any).
 
139
        MutationResult *MutationResult `json:"mutationResult,omitempty"`
 
140
}
 
141
 
 
142
type CompositeFilter struct {
 
143
        // Filters: The list of filters to combine. Must contain at least one
 
144
        // filter.
 
145
        Filters []*Filter `json:"filters,omitempty"`
 
146
 
 
147
        // Operator: The operator for combining multiple filters. Only "and" is
 
148
        // currently supported.
 
149
        Operator string `json:"operator,omitempty"`
 
150
}
 
151
 
 
152
type Entity struct {
 
153
        // Key: The entity's key.
 
154
        //
 
155
        // An entity must have a key, unless otherwise
 
156
        // documented (for example, an entity in Value.entityValue may have no
 
157
        // key). An entity's kind is its key's path's last element's kind, or
 
158
        // null if it has no key.
 
159
        Key *Key `json:"key,omitempty"`
 
160
 
 
161
        // Properties: The entity's properties.
 
162
        Properties map[string]Property `json:"properties,omitempty"`
 
163
}
 
164
 
 
165
type EntityResult struct {
 
166
        // Entity: The resulting entity.
 
167
        Entity *Entity `json:"entity,omitempty"`
 
168
}
 
169
 
 
170
type Filter struct {
 
171
        // CompositeFilter: A composite filter.
 
172
        CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"`
 
173
 
 
174
        // PropertyFilter: A filter on a property.
 
175
        PropertyFilter *PropertyFilter `json:"propertyFilter,omitempty"`
 
176
}
 
177
 
 
178
type GqlQuery struct {
 
179
        // AllowLiteral: When false, the query string must not contain a
 
180
        // literal.
 
181
        AllowLiteral bool `json:"allowLiteral,omitempty"`
 
182
 
 
183
        // NameArgs: A named argument must set field GqlQueryArg.name. No two
 
184
        // named arguments may have the same name. For each non-reserved named
 
185
        // binding site in the query string, there must be a named argument with
 
186
        // that name, but not necessarily the inverse.
 
187
        NameArgs []*GqlQueryArg `json:"nameArgs,omitempty"`
 
188
 
 
189
        // NumberArgs: Numbered binding site @1 references the first numbered
 
190
        // argument, effectively using 1-based indexing, rather than the usual
 
191
        // 0. A numbered argument must NOT set field GqlQueryArg.name. For each
 
192
        // binding site numbered i in query_string, there must be an ith
 
193
        // numbered argument. The inverse must also be true.
 
194
        NumberArgs []*GqlQueryArg `json:"numberArgs,omitempty"`
 
195
 
 
196
        // QueryString: The query string.
 
197
        QueryString string `json:"queryString,omitempty"`
 
198
}
 
199
 
 
200
type GqlQueryArg struct {
 
201
        Cursor string `json:"cursor,omitempty"`
 
202
 
 
203
        // Name: Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match
 
204
        // regex "__.*__". Must not be "".
 
205
        Name string `json:"name,omitempty"`
 
206
 
 
207
        Value *Value `json:"value,omitempty"`
 
208
}
 
209
 
 
210
type Key struct {
 
211
        // PartitionId: Entities are partitioned into subsets, currently
 
212
        // identified by a dataset (usually implicitly specified by the project)
 
213
        // and namespace ID. Queries are scoped to a single partition.
 
214
        PartitionId *PartitionId `json:"partitionId,omitempty"`
 
215
 
 
216
        // Path: The entity path. An entity path consists of one or more
 
217
        // elements composed of a kind and a string or numerical identifier,
 
218
        // which identify entities. The first element identifies a root entity,
 
219
        // the second element identifies a child of the root entity, the third
 
220
        // element a child of the second entity, and so forth. The entities
 
221
        // identified by all prefixes of the path are called the element's
 
222
        // ancestors. An entity path is always fully complete: ALL of the
 
223
        // entity's ancestors are required to be in the path along with the
 
224
        // entity identifier itself. The only exception is that in some
 
225
        // documented cases, the identifier in the last path element (for the
 
226
        // entity) itself may be omitted. A path can never be empty. The path
 
227
        // can have at most 100 elements.
 
228
        Path []*KeyPathElement `json:"path,omitempty"`
 
229
}
 
230
 
 
231
type KeyPathElement struct {
 
232
        // Id: The ID of the entity. Never equal to zero. Values less than zero
 
233
        // are discouraged and will not be supported in the future.
 
234
        Id int64 `json:"id,omitempty,string"`
 
235
 
 
236
        // Kind: The kind of the entity. A kind matching regex "__.*__" is
 
237
        // reserved/read-only. A kind must not contain more than 500 characters.
 
238
        // Cannot be "".
 
239
        Kind string `json:"kind,omitempty"`
 
240
 
 
241
        // Name: The name of the entity. A name matching regex "__.*__" is
 
242
        // reserved/read-only. A name must not be more than 500 characters.
 
243
        // Cannot be "".
 
244
        Name string `json:"name,omitempty"`
 
245
}
 
246
 
 
247
type KindExpression struct {
 
248
        // Name: The name of the kind.
 
249
        Name string `json:"name,omitempty"`
 
250
}
 
251
 
 
252
type LookupRequest struct {
 
253
        // Keys: Keys of entities to look up from the datastore.
 
254
        Keys []*Key `json:"keys,omitempty"`
 
255
 
 
256
        // ReadOptions: Options for this lookup request. Optional.
 
257
        ReadOptions *ReadOptions `json:"readOptions,omitempty"`
 
258
}
 
259
 
 
260
type LookupResponse struct {
 
261
        // Deferred: A list of keys that were not looked up due to resource
 
262
        // constraints.
 
263
        Deferred []*Key `json:"deferred,omitempty"`
 
264
 
 
265
        // Found: Entities found.
 
266
        Found []*EntityResult `json:"found,omitempty"`
 
267
 
 
268
        Header *ResponseHeader `json:"header,omitempty"`
 
269
 
 
270
        // Missing: Entities not found, with only the key populated.
 
271
        Missing []*EntityResult `json:"missing,omitempty"`
 
272
}
 
273
 
 
274
type Mutation struct {
 
275
        // Delete: Keys of entities to delete. Each key must have a complete key
 
276
        // path and must not be reserved/read-only.
 
277
        Delete []*Key `json:"delete,omitempty"`
 
278
 
 
279
        // Force: Ignore a user specified read-only period. Optional.
 
280
        Force bool `json:"force,omitempty"`
 
281
 
 
282
        // Insert: Entities to insert. Each inserted entity's key must have a
 
283
        // complete path and must not be reserved/read-only.
 
284
        Insert []*Entity `json:"insert,omitempty"`
 
285
 
 
286
        // InsertAutoId: Insert entities with a newly allocated ID. Each
 
287
        // inserted entity's key must omit the final identifier in its path and
 
288
        // must not be reserved/read-only.
 
289
        InsertAutoId []*Entity `json:"insertAutoId,omitempty"`
 
290
 
 
291
        // Update: Entities to update. Each updated entity's key must have a
 
292
        // complete path and must not be reserved/read-only.
 
293
        Update []*Entity `json:"update,omitempty"`
 
294
 
 
295
        // Upsert: Entities to upsert. Each upserted entity's key must have a
 
296
        // complete path and must not be reserved/read-only.
 
297
        Upsert []*Entity `json:"upsert,omitempty"`
 
298
}
 
299
 
 
300
type MutationResult struct {
 
301
        // IndexUpdates: Number of index writes.
 
302
        IndexUpdates int64 `json:"indexUpdates,omitempty"`
 
303
 
 
304
        // InsertAutoIdKeys: Keys for insertAutoId entities. One per entity from
 
305
        // the request, in the same order.
 
306
        InsertAutoIdKeys []*Key `json:"insertAutoIdKeys,omitempty"`
 
307
}
 
308
 
 
309
type PartitionId struct {
 
310
        // DatasetId: The dataset ID.
 
311
        DatasetId string `json:"datasetId,omitempty"`
 
312
 
 
313
        // Namespace: The namespace.
 
314
        Namespace string `json:"namespace,omitempty"`
 
315
}
 
316
 
 
317
type Property struct {
 
318
        // Multi: If this property contains a list of values. Input values may
 
319
        // explicitly set multi to false, but otherwise false is always
 
320
        // represented by omitting multi.
 
321
        Multi bool `json:"multi,omitempty"`
 
322
 
 
323
        // Values: The value(s) of the property. When multi is false there is
 
324
        // always exactly one value. When multi is true there are always one or
 
325
        // more values. Each value can have only one value property populated.
 
326
        // For example, you cannot have a values list of { values: [ {
 
327
        // integerValue: 22, stringValue: "a" } ] }, but you can have { multi:
 
328
        // true, values: [ { integerValue: 22 }, { stringValue: "a" } ] }.
 
329
        Values []*Value `json:"values,omitempty"`
 
330
}
 
331
 
 
332
type PropertyExpression struct {
 
333
        // AggregationFunction: The aggregation function to apply to the
 
334
        // property. Optional. Can only be used when grouping by at least one
 
335
        // property. Must then be set on all properties in the projection that
 
336
        // are not being grouped by. Aggregation functions: first selects the
 
337
        // first result as determined by the query's order.
 
338
        AggregationFunction string `json:"aggregationFunction,omitempty"`
 
339
 
 
340
        // Property: The property to project.
 
341
        Property *PropertyReference `json:"property,omitempty"`
 
342
}
 
343
 
 
344
type PropertyFilter struct {
 
345
        // Operator: The operator to filter by. One of lessThan,
 
346
        // lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or
 
347
        // hasAncestor.
 
348
        Operator string `json:"operator,omitempty"`
 
349
 
 
350
        // Property: The property to filter by.
 
351
        Property *PropertyReference `json:"property,omitempty"`
 
352
 
 
353
        // Value: The value to compare the property to.
 
354
        Value *Value `json:"value,omitempty"`
 
355
}
 
356
 
 
357
type PropertyOrder struct {
 
358
        // Direction: The direction to order by. One of ascending or descending.
 
359
        // Optional, defaults to ascending.
 
360
        Direction string `json:"direction,omitempty"`
 
361
 
 
362
        // Property: The property to order by.
 
363
        Property *PropertyReference `json:"property,omitempty"`
 
364
}
 
365
 
 
366
type PropertyReference struct {
 
367
        // Name: The name of the property.
 
368
        Name string `json:"name,omitempty"`
 
369
}
 
370
 
 
371
type Query struct {
 
372
        // EndCursor: An ending point for the query results. Optional. Query
 
373
        // cursors are returned in query result batches.
 
374
        EndCursor string `json:"endCursor,omitempty"`
 
375
 
 
376
        // Filter: The filter to apply (optional).
 
377
        Filter *Filter `json:"filter,omitempty"`
 
378
 
 
379
        // GroupBy: The properties to group by (if empty, no grouping is applied
 
380
        // to the result set).
 
381
        GroupBy []*PropertyReference `json:"groupBy,omitempty"`
 
382
 
 
383
        // Kinds: The kinds to query (if empty, returns entities from all
 
384
        // kinds).
 
385
        Kinds []*KindExpression `json:"kinds,omitempty"`
 
386
 
 
387
        // Limit: The maximum number of results to return. Applies after all
 
388
        // other constraints. Optional.
 
389
        Limit int64 `json:"limit,omitempty"`
 
390
 
 
391
        // Offset: The number of results to skip. Applies before limit, but
 
392
        // after all other constraints (optional, defaults to 0).
 
393
        Offset int64 `json:"offset,omitempty"`
 
394
 
 
395
        // Order: The order to apply to the query results (if empty, order is
 
396
        // unspecified).
 
397
        Order []*PropertyOrder `json:"order,omitempty"`
 
398
 
 
399
        // Projection: The projection to return. If not set the entire entity is
 
400
        // returned.
 
401
        Projection []*PropertyExpression `json:"projection,omitempty"`
 
402
 
 
403
        // StartCursor: A starting point for the query results. Optional. Query
 
404
        // cursors are returned in query result batches.
 
405
        StartCursor string `json:"startCursor,omitempty"`
 
406
}
 
407
 
 
408
type QueryResultBatch struct {
 
409
        // EndCursor: A cursor that points to the position after the last result
 
410
        // in the batch. May be absent. TODO(arfuller): Once all plans produce
 
411
        // cursors update documentation here.
 
412
        EndCursor string `json:"endCursor,omitempty"`
 
413
 
 
414
        // EntityResultType: The result type for every entity in entityResults.
 
415
        // full for full entities, projection for entities with only projected
 
416
        // properties, keyOnly for entities with only a key.
 
417
        EntityResultType string `json:"entityResultType,omitempty"`
 
418
 
 
419
        // EntityResults: The results for this batch.
 
420
        EntityResults []*EntityResult `json:"entityResults,omitempty"`
 
421
 
 
422
        // MoreResults: The state of the query after the current batch. One of
 
423
        // notFinished, moreResultsAfterLimit, noMoreResults.
 
424
        MoreResults string `json:"moreResults,omitempty"`
 
425
 
 
426
        // SkippedResults: The number of results skipped because of
 
427
        // Query.offset.
 
428
        SkippedResults int64 `json:"skippedResults,omitempty"`
 
429
}
 
430
 
 
431
type ReadOptions struct {
 
432
        // ReadConsistency: The read consistency to use. One of default, strong,
 
433
        // or eventual. Cannot be set when transaction is set. Lookup and
 
434
        // ancestor queries default to strong, global queries default to
 
435
        // eventual and cannot be set to strong. Optional. Default is default.
 
436
        ReadConsistency string `json:"readConsistency,omitempty"`
 
437
 
 
438
        // Transaction: The transaction to use. Optional.
 
439
        Transaction string `json:"transaction,omitempty"`
 
440
}
 
441
 
 
442
type ResponseHeader struct {
 
443
        // Kind: Identifies what kind of resource this is. Value: the fixed
 
444
        // string "datastore#responseHeader".
 
445
        Kind string `json:"kind,omitempty"`
 
446
}
 
447
 
 
448
type RollbackRequest struct {
 
449
        // Transaction: The transaction identifier, returned by a call to
 
450
        // beginTransaction.
 
451
        Transaction string `json:"transaction,omitempty"`
 
452
}
 
453
 
 
454
type RollbackResponse struct {
 
455
        Header *ResponseHeader `json:"header,omitempty"`
 
456
}
 
457
 
 
458
type RunQueryRequest struct {
 
459
        // GqlQuery: The GQL query to run. Either this field or field query must
 
460
        // be set, but not both.
 
461
        GqlQuery *GqlQuery `json:"gqlQuery,omitempty"`
 
462
 
 
463
        // PartitionId: Entities are partitioned into subsets, identified by a
 
464
        // dataset (usually implicitly specified by the project) and namespace
 
465
        // ID. Queries are scoped to a single partition. This partition ID is
 
466
        // normalized with the standard default context partition ID, but all
 
467
        // other partition IDs in RunQueryRequest are normalized with this
 
468
        // partition ID as the context partition ID.
 
469
        PartitionId *PartitionId `json:"partitionId,omitempty"`
 
470
 
 
471
        // Query: The query to run. Either this field or field gql_query must be
 
472
        // set, but not both.
 
473
        Query *Query `json:"query,omitempty"`
 
474
 
 
475
        // ReadOptions: The options for this query.
 
476
        ReadOptions *ReadOptions `json:"readOptions,omitempty"`
 
477
}
 
478
 
 
479
type RunQueryResponse struct {
 
480
        // Batch: A batch of query results (always present).
 
481
        Batch *QueryResultBatch `json:"batch,omitempty"`
 
482
 
 
483
        Header *ResponseHeader `json:"header,omitempty"`
 
484
}
 
485
 
 
486
type Value struct {
 
487
        // BlobKeyValue: A blob key value.
 
488
        BlobKeyValue string `json:"blobKeyValue,omitempty"`
 
489
 
 
490
        // BlobValue: A blob value. May be a maximum of 1,000,000 bytes.
 
491
        BlobValue string `json:"blobValue,omitempty"`
 
492
 
 
493
        // BooleanValue: A boolean value.
 
494
        BooleanValue bool `json:"booleanValue,omitempty"`
 
495
 
 
496
        // DateTimeValue: A timestamp value.
 
497
        DateTimeValue string `json:"dateTimeValue,omitempty"`
 
498
 
 
499
        // DoubleValue: A double value.
 
500
        DoubleValue float64 `json:"doubleValue,omitempty"`
 
501
 
 
502
        // EntityValue: An entity value. May have no key. May have a key with an
 
503
        // incomplete key path. May have a reserved/read-only key.
 
504
        EntityValue *Entity `json:"entityValue,omitempty"`
 
505
 
 
506
        // Indexed: If the value should be indexed.
 
507
        //
 
508
        // The indexed property may be
 
509
        // set for a null value. When indexed is true, stringValue is limited to
 
510
        // 500 characters and the blob value is limited to 500 bytes. Input
 
511
        // values by default have indexed set to true; however, you can
 
512
        // explicitly set indexed to true if you want. (An output value never
 
513
        // has indexed explicitly set to true.) If a value is itself an entity,
 
514
        // it cannot have indexed set to true.
 
515
        Indexed bool `json:"indexed,omitempty"`
 
516
 
 
517
        // IntegerValue: An integer value.
 
518
        IntegerValue int64 `json:"integerValue,omitempty,string"`
 
519
 
 
520
        // KeyValue: A key value.
 
521
        KeyValue *Key `json:"keyValue,omitempty"`
 
522
 
 
523
        // Meaning: The meaning field is reserved and should not be used.
 
524
        Meaning int64 `json:"meaning,omitempty"`
 
525
 
 
526
        // StringValue: A UTF-8 encoded string value.
 
527
        StringValue string `json:"stringValue,omitempty"`
 
528
}
 
529
 
 
530
// method id "datastore.datasets.allocateIds":
 
531
 
 
532
type DatasetsAllocateIdsCall struct {
 
533
        s                  *Service
 
534
        datasetId          string
 
535
        allocateidsrequest *AllocateIdsRequest
 
536
        opt_               map[string]interface{}
 
537
}
 
538
 
 
539
// AllocateIds: Allocate IDs for incomplete keys (useful for referencing
 
540
// an entity before it is inserted).
 
541
func (r *DatasetsService) AllocateIds(datasetId string, allocateidsrequest *AllocateIdsRequest) *DatasetsAllocateIdsCall {
 
542
        c := &DatasetsAllocateIdsCall{s: r.s, opt_: make(map[string]interface{})}
 
543
        c.datasetId = datasetId
 
544
        c.allocateidsrequest = allocateidsrequest
 
545
        return c
 
546
}
 
547
 
 
548
// Fields allows partial responses to be retrieved.
 
549
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
550
// for more information.
 
551
func (c *DatasetsAllocateIdsCall) Fields(s ...googleapi.Field) *DatasetsAllocateIdsCall {
 
552
        c.opt_["fields"] = googleapi.CombineFields(s)
 
553
        return c
 
554
}
 
555
 
 
556
func (c *DatasetsAllocateIdsCall) Do() (*AllocateIdsResponse, error) {
 
557
        var body io.Reader = nil
 
558
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocateidsrequest)
 
559
        if err != nil {
 
560
                return nil, err
 
561
        }
 
562
        ctype := "application/json"
 
563
        params := make(url.Values)
 
564
        params.Set("alt", "json")
 
565
        if v, ok := c.opt_["fields"]; ok {
 
566
                params.Set("fields", fmt.Sprintf("%v", v))
 
567
        }
 
568
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/allocateIds")
 
569
        urls += "?" + params.Encode()
 
570
        req, _ := http.NewRequest("POST", urls, body)
 
571
        googleapi.Expand(req.URL, map[string]string{
 
572
                "datasetId": c.datasetId,
 
573
        })
 
574
        req.Header.Set("Content-Type", ctype)
 
575
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
576
        res, err := c.s.client.Do(req)
 
577
        if err != nil {
 
578
                return nil, err
 
579
        }
 
580
        defer googleapi.CloseBody(res)
 
581
        if err := googleapi.CheckResponse(res); err != nil {
 
582
                return nil, err
 
583
        }
 
584
        var ret *AllocateIdsResponse
 
585
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
586
                return nil, err
 
587
        }
 
588
        return ret, nil
 
589
        // {
 
590
        //   "description": "Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).",
 
591
        //   "httpMethod": "POST",
 
592
        //   "id": "datastore.datasets.allocateIds",
 
593
        //   "parameterOrder": [
 
594
        //     "datasetId"
 
595
        //   ],
 
596
        //   "parameters": {
 
597
        //     "datasetId": {
 
598
        //       "description": "Identifies the dataset.",
 
599
        //       "location": "path",
 
600
        //       "required": true,
 
601
        //       "type": "string"
 
602
        //     }
 
603
        //   },
 
604
        //   "path": "{datasetId}/allocateIds",
 
605
        //   "request": {
 
606
        //     "$ref": "AllocateIdsRequest"
 
607
        //   },
 
608
        //   "response": {
 
609
        //     "$ref": "AllocateIdsResponse"
 
610
        //   },
 
611
        //   "scopes": [
 
612
        //     "https://www.googleapis.com/auth/cloud-platform",
 
613
        //     "https://www.googleapis.com/auth/datastore",
 
614
        //     "https://www.googleapis.com/auth/userinfo.email"
 
615
        //   ]
 
616
        // }
 
617
 
 
618
}
 
619
 
 
620
// method id "datastore.datasets.beginTransaction":
 
621
 
 
622
type DatasetsBeginTransactionCall struct {
 
623
        s                       *Service
 
624
        datasetId               string
 
625
        begintransactionrequest *BeginTransactionRequest
 
626
        opt_                    map[string]interface{}
 
627
}
 
628
 
 
629
// BeginTransaction: Begin a new transaction.
 
630
func (r *DatasetsService) BeginTransaction(datasetId string, begintransactionrequest *BeginTransactionRequest) *DatasetsBeginTransactionCall {
 
631
        c := &DatasetsBeginTransactionCall{s: r.s, opt_: make(map[string]interface{})}
 
632
        c.datasetId = datasetId
 
633
        c.begintransactionrequest = begintransactionrequest
 
634
        return c
 
635
}
 
636
 
 
637
// Fields allows partial responses to be retrieved.
 
638
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
639
// for more information.
 
640
func (c *DatasetsBeginTransactionCall) Fields(s ...googleapi.Field) *DatasetsBeginTransactionCall {
 
641
        c.opt_["fields"] = googleapi.CombineFields(s)
 
642
        return c
 
643
}
 
644
 
 
645
func (c *DatasetsBeginTransactionCall) Do() (*BeginTransactionResponse, error) {
 
646
        var body io.Reader = nil
 
647
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
 
648
        if err != nil {
 
649
                return nil, err
 
650
        }
 
651
        ctype := "application/json"
 
652
        params := make(url.Values)
 
653
        params.Set("alt", "json")
 
654
        if v, ok := c.opt_["fields"]; ok {
 
655
                params.Set("fields", fmt.Sprintf("%v", v))
 
656
        }
 
657
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/beginTransaction")
 
658
        urls += "?" + params.Encode()
 
659
        req, _ := http.NewRequest("POST", urls, body)
 
660
        googleapi.Expand(req.URL, map[string]string{
 
661
                "datasetId": c.datasetId,
 
662
        })
 
663
        req.Header.Set("Content-Type", ctype)
 
664
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
665
        res, err := c.s.client.Do(req)
 
666
        if err != nil {
 
667
                return nil, err
 
668
        }
 
669
        defer googleapi.CloseBody(res)
 
670
        if err := googleapi.CheckResponse(res); err != nil {
 
671
                return nil, err
 
672
        }
 
673
        var ret *BeginTransactionResponse
 
674
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
675
                return nil, err
 
676
        }
 
677
        return ret, nil
 
678
        // {
 
679
        //   "description": "Begin a new transaction.",
 
680
        //   "httpMethod": "POST",
 
681
        //   "id": "datastore.datasets.beginTransaction",
 
682
        //   "parameterOrder": [
 
683
        //     "datasetId"
 
684
        //   ],
 
685
        //   "parameters": {
 
686
        //     "datasetId": {
 
687
        //       "description": "Identifies the dataset.",
 
688
        //       "location": "path",
 
689
        //       "required": true,
 
690
        //       "type": "string"
 
691
        //     }
 
692
        //   },
 
693
        //   "path": "{datasetId}/beginTransaction",
 
694
        //   "request": {
 
695
        //     "$ref": "BeginTransactionRequest"
 
696
        //   },
 
697
        //   "response": {
 
698
        //     "$ref": "BeginTransactionResponse"
 
699
        //   },
 
700
        //   "scopes": [
 
701
        //     "https://www.googleapis.com/auth/cloud-platform",
 
702
        //     "https://www.googleapis.com/auth/datastore",
 
703
        //     "https://www.googleapis.com/auth/userinfo.email"
 
704
        //   ]
 
705
        // }
 
706
 
 
707
}
 
708
 
 
709
// method id "datastore.datasets.blindWrite":
 
710
 
 
711
type DatasetsBlindWriteCall struct {
 
712
        s                 *Service
 
713
        datasetId         string
 
714
        blindwriterequest *BlindWriteRequest
 
715
        opt_              map[string]interface{}
 
716
}
 
717
 
 
718
// BlindWrite: Create, delete or modify some entities outside a
 
719
// transaction.
 
720
func (r *DatasetsService) BlindWrite(datasetId string, blindwriterequest *BlindWriteRequest) *DatasetsBlindWriteCall {
 
721
        c := &DatasetsBlindWriteCall{s: r.s, opt_: make(map[string]interface{})}
 
722
        c.datasetId = datasetId
 
723
        c.blindwriterequest = blindwriterequest
 
724
        return c
 
725
}
 
726
 
 
727
// Fields allows partial responses to be retrieved.
 
728
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
729
// for more information.
 
730
func (c *DatasetsBlindWriteCall) Fields(s ...googleapi.Field) *DatasetsBlindWriteCall {
 
731
        c.opt_["fields"] = googleapi.CombineFields(s)
 
732
        return c
 
733
}
 
734
 
 
735
func (c *DatasetsBlindWriteCall) Do() (*BlindWriteResponse, error) {
 
736
        var body io.Reader = nil
 
737
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.blindwriterequest)
 
738
        if err != nil {
 
739
                return nil, err
 
740
        }
 
741
        ctype := "application/json"
 
742
        params := make(url.Values)
 
743
        params.Set("alt", "json")
 
744
        if v, ok := c.opt_["fields"]; ok {
 
745
                params.Set("fields", fmt.Sprintf("%v", v))
 
746
        }
 
747
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/blindWrite")
 
748
        urls += "?" + params.Encode()
 
749
        req, _ := http.NewRequest("POST", urls, body)
 
750
        googleapi.Expand(req.URL, map[string]string{
 
751
                "datasetId": c.datasetId,
 
752
        })
 
753
        req.Header.Set("Content-Type", ctype)
 
754
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
755
        res, err := c.s.client.Do(req)
 
756
        if err != nil {
 
757
                return nil, err
 
758
        }
 
759
        defer googleapi.CloseBody(res)
 
760
        if err := googleapi.CheckResponse(res); err != nil {
 
761
                return nil, err
 
762
        }
 
763
        var ret *BlindWriteResponse
 
764
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
765
                return nil, err
 
766
        }
 
767
        return ret, nil
 
768
        // {
 
769
        //   "description": "Create, delete or modify some entities outside a transaction.",
 
770
        //   "httpMethod": "POST",
 
771
        //   "id": "datastore.datasets.blindWrite",
 
772
        //   "parameterOrder": [
 
773
        //     "datasetId"
 
774
        //   ],
 
775
        //   "parameters": {
 
776
        //     "datasetId": {
 
777
        //       "description": "Identifies the dataset.",
 
778
        //       "location": "path",
 
779
        //       "required": true,
 
780
        //       "type": "string"
 
781
        //     }
 
782
        //   },
 
783
        //   "path": "{datasetId}/blindWrite",
 
784
        //   "request": {
 
785
        //     "$ref": "BlindWriteRequest"
 
786
        //   },
 
787
        //   "response": {
 
788
        //     "$ref": "BlindWriteResponse"
 
789
        //   },
 
790
        //   "scopes": [
 
791
        //     "https://www.googleapis.com/auth/cloud-platform",
 
792
        //     "https://www.googleapis.com/auth/datastore",
 
793
        //     "https://www.googleapis.com/auth/userinfo.email"
 
794
        //   ]
 
795
        // }
 
796
 
 
797
}
 
798
 
 
799
// method id "datastore.datasets.commit":
 
800
 
 
801
type DatasetsCommitCall struct {
 
802
        s             *Service
 
803
        datasetId     string
 
804
        commitrequest *CommitRequest
 
805
        opt_          map[string]interface{}
 
806
}
 
807
 
 
808
// Commit: Commit a transaction, optionally creating, deleting or
 
809
// modifying some entities.
 
810
func (r *DatasetsService) Commit(datasetId string, commitrequest *CommitRequest) *DatasetsCommitCall {
 
811
        c := &DatasetsCommitCall{s: r.s, opt_: make(map[string]interface{})}
 
812
        c.datasetId = datasetId
 
813
        c.commitrequest = commitrequest
 
814
        return c
 
815
}
 
816
 
 
817
// Fields allows partial responses to be retrieved.
 
818
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
819
// for more information.
 
820
func (c *DatasetsCommitCall) Fields(s ...googleapi.Field) *DatasetsCommitCall {
 
821
        c.opt_["fields"] = googleapi.CombineFields(s)
 
822
        return c
 
823
}
 
824
 
 
825
func (c *DatasetsCommitCall) Do() (*CommitResponse, error) {
 
826
        var body io.Reader = nil
 
827
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
 
828
        if err != nil {
 
829
                return nil, err
 
830
        }
 
831
        ctype := "application/json"
 
832
        params := make(url.Values)
 
833
        params.Set("alt", "json")
 
834
        if v, ok := c.opt_["fields"]; ok {
 
835
                params.Set("fields", fmt.Sprintf("%v", v))
 
836
        }
 
837
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/commit")
 
838
        urls += "?" + params.Encode()
 
839
        req, _ := http.NewRequest("POST", urls, body)
 
840
        googleapi.Expand(req.URL, map[string]string{
 
841
                "datasetId": c.datasetId,
 
842
        })
 
843
        req.Header.Set("Content-Type", ctype)
 
844
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
845
        res, err := c.s.client.Do(req)
 
846
        if err != nil {
 
847
                return nil, err
 
848
        }
 
849
        defer googleapi.CloseBody(res)
 
850
        if err := googleapi.CheckResponse(res); err != nil {
 
851
                return nil, err
 
852
        }
 
853
        var ret *CommitResponse
 
854
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
855
                return nil, err
 
856
        }
 
857
        return ret, nil
 
858
        // {
 
859
        //   "description": "Commit a transaction, optionally creating, deleting or modifying some entities.",
 
860
        //   "httpMethod": "POST",
 
861
        //   "id": "datastore.datasets.commit",
 
862
        //   "parameterOrder": [
 
863
        //     "datasetId"
 
864
        //   ],
 
865
        //   "parameters": {
 
866
        //     "datasetId": {
 
867
        //       "description": "Identifies the dataset.",
 
868
        //       "location": "path",
 
869
        //       "required": true,
 
870
        //       "type": "string"
 
871
        //     }
 
872
        //   },
 
873
        //   "path": "{datasetId}/commit",
 
874
        //   "request": {
 
875
        //     "$ref": "CommitRequest"
 
876
        //   },
 
877
        //   "response": {
 
878
        //     "$ref": "CommitResponse"
 
879
        //   },
 
880
        //   "scopes": [
 
881
        //     "https://www.googleapis.com/auth/cloud-platform",
 
882
        //     "https://www.googleapis.com/auth/datastore",
 
883
        //     "https://www.googleapis.com/auth/userinfo.email"
 
884
        //   ]
 
885
        // }
 
886
 
 
887
}
 
888
 
 
889
// method id "datastore.datasets.lookup":
 
890
 
 
891
type DatasetsLookupCall struct {
 
892
        s             *Service
 
893
        datasetId     string
 
894
        lookuprequest *LookupRequest
 
895
        opt_          map[string]interface{}
 
896
}
 
897
 
 
898
// Lookup: Look up some entities by key.
 
899
func (r *DatasetsService) Lookup(datasetId string, lookuprequest *LookupRequest) *DatasetsLookupCall {
 
900
        c := &DatasetsLookupCall{s: r.s, opt_: make(map[string]interface{})}
 
901
        c.datasetId = datasetId
 
902
        c.lookuprequest = lookuprequest
 
903
        return c
 
904
}
 
905
 
 
906
// Fields allows partial responses to be retrieved.
 
907
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
908
// for more information.
 
909
func (c *DatasetsLookupCall) Fields(s ...googleapi.Field) *DatasetsLookupCall {
 
910
        c.opt_["fields"] = googleapi.CombineFields(s)
 
911
        return c
 
912
}
 
913
 
 
914
func (c *DatasetsLookupCall) Do() (*LookupResponse, error) {
 
915
        var body io.Reader = nil
 
916
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuprequest)
 
917
        if err != nil {
 
918
                return nil, err
 
919
        }
 
920
        ctype := "application/json"
 
921
        params := make(url.Values)
 
922
        params.Set("alt", "json")
 
923
        if v, ok := c.opt_["fields"]; ok {
 
924
                params.Set("fields", fmt.Sprintf("%v", v))
 
925
        }
 
926
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/lookup")
 
927
        urls += "?" + params.Encode()
 
928
        req, _ := http.NewRequest("POST", urls, body)
 
929
        googleapi.Expand(req.URL, map[string]string{
 
930
                "datasetId": c.datasetId,
 
931
        })
 
932
        req.Header.Set("Content-Type", ctype)
 
933
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
934
        res, err := c.s.client.Do(req)
 
935
        if err != nil {
 
936
                return nil, err
 
937
        }
 
938
        defer googleapi.CloseBody(res)
 
939
        if err := googleapi.CheckResponse(res); err != nil {
 
940
                return nil, err
 
941
        }
 
942
        var ret *LookupResponse
 
943
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
944
                return nil, err
 
945
        }
 
946
        return ret, nil
 
947
        // {
 
948
        //   "description": "Look up some entities by key.",
 
949
        //   "httpMethod": "POST",
 
950
        //   "id": "datastore.datasets.lookup",
 
951
        //   "parameterOrder": [
 
952
        //     "datasetId"
 
953
        //   ],
 
954
        //   "parameters": {
 
955
        //     "datasetId": {
 
956
        //       "description": "Identifies the dataset.",
 
957
        //       "location": "path",
 
958
        //       "required": true,
 
959
        //       "type": "string"
 
960
        //     }
 
961
        //   },
 
962
        //   "path": "{datasetId}/lookup",
 
963
        //   "request": {
 
964
        //     "$ref": "LookupRequest"
 
965
        //   },
 
966
        //   "response": {
 
967
        //     "$ref": "LookupResponse"
 
968
        //   },
 
969
        //   "scopes": [
 
970
        //     "https://www.googleapis.com/auth/cloud-platform",
 
971
        //     "https://www.googleapis.com/auth/datastore",
 
972
        //     "https://www.googleapis.com/auth/userinfo.email"
 
973
        //   ]
 
974
        // }
 
975
 
 
976
}
 
977
 
 
978
// method id "datastore.datasets.rollback":
 
979
 
 
980
type DatasetsRollbackCall struct {
 
981
        s               *Service
 
982
        datasetId       string
 
983
        rollbackrequest *RollbackRequest
 
984
        opt_            map[string]interface{}
 
985
}
 
986
 
 
987
// Rollback: Roll back a transaction.
 
988
func (r *DatasetsService) Rollback(datasetId string, rollbackrequest *RollbackRequest) *DatasetsRollbackCall {
 
989
        c := &DatasetsRollbackCall{s: r.s, opt_: make(map[string]interface{})}
 
990
        c.datasetId = datasetId
 
991
        c.rollbackrequest = rollbackrequest
 
992
        return c
 
993
}
 
994
 
 
995
// Fields allows partial responses to be retrieved.
 
996
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
997
// for more information.
 
998
func (c *DatasetsRollbackCall) Fields(s ...googleapi.Field) *DatasetsRollbackCall {
 
999
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1000
        return c
 
1001
}
 
1002
 
 
1003
func (c *DatasetsRollbackCall) Do() (*RollbackResponse, error) {
 
1004
        var body io.Reader = nil
 
1005
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
 
1006
        if err != nil {
 
1007
                return nil, err
 
1008
        }
 
1009
        ctype := "application/json"
 
1010
        params := make(url.Values)
 
1011
        params.Set("alt", "json")
 
1012
        if v, ok := c.opt_["fields"]; ok {
 
1013
                params.Set("fields", fmt.Sprintf("%v", v))
 
1014
        }
 
1015
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/rollback")
 
1016
        urls += "?" + params.Encode()
 
1017
        req, _ := http.NewRequest("POST", urls, body)
 
1018
        googleapi.Expand(req.URL, map[string]string{
 
1019
                "datasetId": c.datasetId,
 
1020
        })
 
1021
        req.Header.Set("Content-Type", ctype)
 
1022
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1023
        res, err := c.s.client.Do(req)
 
1024
        if err != nil {
 
1025
                return nil, err
 
1026
        }
 
1027
        defer googleapi.CloseBody(res)
 
1028
        if err := googleapi.CheckResponse(res); err != nil {
 
1029
                return nil, err
 
1030
        }
 
1031
        var ret *RollbackResponse
 
1032
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1033
                return nil, err
 
1034
        }
 
1035
        return ret, nil
 
1036
        // {
 
1037
        //   "description": "Roll back a transaction.",
 
1038
        //   "httpMethod": "POST",
 
1039
        //   "id": "datastore.datasets.rollback",
 
1040
        //   "parameterOrder": [
 
1041
        //     "datasetId"
 
1042
        //   ],
 
1043
        //   "parameters": {
 
1044
        //     "datasetId": {
 
1045
        //       "description": "Identifies the dataset.",
 
1046
        //       "location": "path",
 
1047
        //       "required": true,
 
1048
        //       "type": "string"
 
1049
        //     }
 
1050
        //   },
 
1051
        //   "path": "{datasetId}/rollback",
 
1052
        //   "request": {
 
1053
        //     "$ref": "RollbackRequest"
 
1054
        //   },
 
1055
        //   "response": {
 
1056
        //     "$ref": "RollbackResponse"
 
1057
        //   },
 
1058
        //   "scopes": [
 
1059
        //     "https://www.googleapis.com/auth/cloud-platform",
 
1060
        //     "https://www.googleapis.com/auth/datastore",
 
1061
        //     "https://www.googleapis.com/auth/userinfo.email"
 
1062
        //   ]
 
1063
        // }
 
1064
 
 
1065
}
 
1066
 
 
1067
// method id "datastore.datasets.runQuery":
 
1068
 
 
1069
type DatasetsRunQueryCall struct {
 
1070
        s               *Service
 
1071
        datasetId       string
 
1072
        runqueryrequest *RunQueryRequest
 
1073
        opt_            map[string]interface{}
 
1074
}
 
1075
 
 
1076
// RunQuery: Query for entities.
 
1077
func (r *DatasetsService) RunQuery(datasetId string, runqueryrequest *RunQueryRequest) *DatasetsRunQueryCall {
 
1078
        c := &DatasetsRunQueryCall{s: r.s, opt_: make(map[string]interface{})}
 
1079
        c.datasetId = datasetId
 
1080
        c.runqueryrequest = runqueryrequest
 
1081
        return c
 
1082
}
 
1083
 
 
1084
// Fields allows partial responses to be retrieved.
 
1085
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1086
// for more information.
 
1087
func (c *DatasetsRunQueryCall) Fields(s ...googleapi.Field) *DatasetsRunQueryCall {
 
1088
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1089
        return c
 
1090
}
 
1091
 
 
1092
func (c *DatasetsRunQueryCall) Do() (*RunQueryResponse, error) {
 
1093
        var body io.Reader = nil
 
1094
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
 
1095
        if err != nil {
 
1096
                return nil, err
 
1097
        }
 
1098
        ctype := "application/json"
 
1099
        params := make(url.Values)
 
1100
        params.Set("alt", "json")
 
1101
        if v, ok := c.opt_["fields"]; ok {
 
1102
                params.Set("fields", fmt.Sprintf("%v", v))
 
1103
        }
 
1104
        urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/runQuery")
 
1105
        urls += "?" + params.Encode()
 
1106
        req, _ := http.NewRequest("POST", urls, body)
 
1107
        googleapi.Expand(req.URL, map[string]string{
 
1108
                "datasetId": c.datasetId,
 
1109
        })
 
1110
        req.Header.Set("Content-Type", ctype)
 
1111
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1112
        res, err := c.s.client.Do(req)
 
1113
        if err != nil {
 
1114
                return nil, err
 
1115
        }
 
1116
        defer googleapi.CloseBody(res)
 
1117
        if err := googleapi.CheckResponse(res); err != nil {
 
1118
                return nil, err
 
1119
        }
 
1120
        var ret *RunQueryResponse
 
1121
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1122
                return nil, err
 
1123
        }
 
1124
        return ret, nil
 
1125
        // {
 
1126
        //   "description": "Query for entities.",
 
1127
        //   "httpMethod": "POST",
 
1128
        //   "id": "datastore.datasets.runQuery",
 
1129
        //   "parameterOrder": [
 
1130
        //     "datasetId"
 
1131
        //   ],
 
1132
        //   "parameters": {
 
1133
        //     "datasetId": {
 
1134
        //       "description": "Identifies the dataset.",
 
1135
        //       "location": "path",
 
1136
        //       "required": true,
 
1137
        //       "type": "string"
 
1138
        //     }
 
1139
        //   },
 
1140
        //   "path": "{datasetId}/runQuery",
 
1141
        //   "request": {
 
1142
        //     "$ref": "RunQueryRequest"
 
1143
        //   },
 
1144
        //   "response": {
 
1145
        //     "$ref": "RunQueryResponse"
 
1146
        //   },
 
1147
        //   "scopes": [
 
1148
        //     "https://www.googleapis.com/auth/cloud-platform",
 
1149
        //     "https://www.googleapis.com/auth/datastore",
 
1150
        //     "https://www.googleapis.com/auth/userinfo.email"
 
1151
        //   ]
 
1152
        // }
 
1153
 
 
1154
}