Class: Google::Apis::DatastoreV1::DatastoreService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/datastore_v1/service.rb

Overview

Cloud Datastore API

Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.

Examples:

require 'google/apis/datastore_v1'

Datastore = Google::Apis::DatastoreV1 # Alias the module
service = Datastore::DatastoreService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDatastoreService

Returns a new instance of DatastoreService.



46
47
48
49
# File 'generated/google/apis/datastore_v1/service.rb', line 46

def initialize
  super('https://datastore.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/datastore_v1/service.rb', line 39

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



44
45
46
# File 'generated/google/apis/datastore_v1/service.rb', line 44

def quota_user
  @quota_user
end

Instance Method Details

#allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::AllocateIdsResponse

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • allocate_ids_request_object (Google::Apis::DatastoreV1::AllocateIdsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



73
74
75
76
77
78
79
80
81
82
83
# File 'generated/google/apis/datastore_v1/service.rb', line 73

def allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:allocateIds', options)
  command.request_representation = Google::Apis::DatastoreV1::AllocateIdsRequest::Representation
  command.request_object = allocate_ids_request_object
  command.response_representation = Google::Apis::DatastoreV1::AllocateIdsResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::AllocateIdsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::BeginTransactionResponse

Begins a new transaction.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • begin_transaction_request_object (Google::Apis::DatastoreV1::BeginTransactionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



106
107
108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/datastore_v1/service.rb', line 106

def begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:beginTransaction', options)
  command.request_representation = Google::Apis::DatastoreV1::BeginTransactionRequest::Representation
  command.request_object = begin_transaction_request_object
  command.response_representation = Google::Apis::DatastoreV1::BeginTransactionResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::BeginTransactionResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#cancel_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::Empty

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters:

  • name (String)

    The name of the operation resource to be cancelled.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



540
541
542
543
544
545
546
547
548
# File 'generated/google/apis/datastore_v1/service.rb', line 540

def cancel_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.response_representation = Google::Apis::DatastoreV1::Empty::Representation
  command.response_class = Google::Apis::DatastoreV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::CommitResponse

Commits a transaction, optionally creating, deleting or modifying some entities.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • commit_request_object (Google::Apis::DatastoreV1::CommitRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



140
141
142
143
144
145
146
147
148
149
150
# File 'generated/google/apis/datastore_v1/service.rb', line 140

def commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:commit', options)
  command.request_representation = Google::Apis::DatastoreV1::CommitRequest::Representation
  command.request_object = commit_request_object
  command.response_representation = Google::Apis::DatastoreV1::CommitResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::CommitResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_index(project_id, google_datastore_admin_v1_index_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleLongrunningOperation

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned google.longrunning.Operation, the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status. During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with delete, then re-creating the index with create. Indexes with a single property cannot be created.

Parameters:

  • project_id (String)

    Project ID against which to make the request.

  • google_datastore_admin_v1_index_object (Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Index) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



388
389
390
391
392
393
394
395
396
397
398
# File 'generated/google/apis/datastore_v1/service.rb', line 388

def create_project_index(project_id, google_datastore_admin_v1_index_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}/indexes', options)
  command.request_representation = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Index::Representation
  command.request_object = google_datastore_admin_v1_index_object
  command.response_representation = Google::Apis::DatastoreV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleLongrunningOperation
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_index(project_id, index_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleLongrunningOperation

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING state. And on completion of the returned google.longrunning. Operation, the index will be removed. During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling delete again.

Parameters:

  • project_id (String)

    Project ID against which to make the request.

  • index_id (String)

    The resource ID of the index to delete.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



428
429
430
431
432
433
434
435
436
437
# File 'generated/google/apis/datastore_v1/service.rb', line 428

def delete_project_index(project_id, index_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/projects/{projectId}/indexes/{indexId}', options)
  command.response_representation = Google::Apis::DatastoreV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleLongrunningOperation
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['indexId'] = index_id unless index_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::Empty

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code. UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation resource to be deleted.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



573
574
575
576
577
578
579
580
581
# File 'generated/google/apis/datastore_v1/service.rb', line 573

def delete_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::DatastoreV1::Empty::Representation
  command.response_class = Google::Apis::DatastoreV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#export_project(project_id, google_datastore_admin_v1_export_entities_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleLongrunningOperation

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.

Parameters:

  • project_id (String)

    Required. Project ID against which to make the request.

  • google_datastore_admin_v1_export_entities_request_object (Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ExportEntitiesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



179
180
181
182
183
184
185
186
187
188
189
# File 'generated/google/apis/datastore_v1/service.rb', line 179

def export_project(project_id, google_datastore_admin_v1_export_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:export', options)
  command.request_representation = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ExportEntitiesRequest::Representation
  command.request_object = google_datastore_admin_v1_export_entities_request_object
  command.response_representation = Google::Apis::DatastoreV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleLongrunningOperation
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_index(project_id, index_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Index

Gets an index.

Parameters:

  • project_id (String)

    Project ID against which to make the request.

  • index_id (String)

    The resource ID of the index to get.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



461
462
463
464
465
466
467
468
469
470
# File 'generated/google/apis/datastore_v1/service.rb', line 461

def get_project_index(project_id, index_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{projectId}/indexes/{indexId}', options)
  command.response_representation = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Index::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1Index
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['indexId'] = index_id unless index_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleLongrunningOperation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



604
605
606
607
608
609
610
611
612
# File 'generated/google/apis/datastore_v1/service.rb', line 604

def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::DatastoreV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_project(project_id, google_datastore_admin_v1_import_entities_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleLongrunningOperation

Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

Parameters:

  • project_id (String)

    Required. Project ID against which to make the request.

  • google_datastore_admin_v1_import_entities_request_object (Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ImportEntitiesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



216
217
218
219
220
221
222
223
224
225
226
# File 'generated/google/apis/datastore_v1/service.rb', line 216

def import_project(project_id, google_datastore_admin_v1_import_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:import', options)
  command.request_representation = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ImportEntitiesRequest::Representation
  command.request_object = google_datastore_admin_v1_import_entities_request_object
  command.response_representation = Google::Apis::DatastoreV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleLongrunningOperation
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_indexes(project_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ListIndexesResponse

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.

Parameters:

  • project_id (String)

    Project ID against which to make the request.

  • filter (String) (defaults to: nil)
  • page_size (Fixnum) (defaults to: nil)

    The maximum number of items to return. If zero, then all results will be returned.

  • page_token (String) (defaults to: nil)

    The next_page_token value returned from a previous List request, if any.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



500
501
502
503
504
505
506
507
508
509
510
511
# File 'generated/google/apis/datastore_v1/service.rb', line 500

def list_project_indexes(project_id, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{projectId}/indexes', options)
  command.response_representation = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ListIndexesResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleDatastoreAdminV1ListIndexesResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::GoogleLongrunningListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/name=users/*/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



647
648
649
650
651
652
653
654
655
656
657
658
# File 'generated/google/apis/datastore_v1/service.rb', line 647

def list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}/operations', options)
  command.response_representation = Google::Apis::DatastoreV1::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::GoogleLongrunningListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::LookupResponse

Looks up entities by key.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • lookup_request_object (Google::Apis::DatastoreV1::LookupRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



249
250
251
252
253
254
255
256
257
258
259
# File 'generated/google/apis/datastore_v1/service.rb', line 249

def lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:lookup', options)
  command.request_representation = Google::Apis::DatastoreV1::LookupRequest::Representation
  command.request_object = lookup_request_object
  command.response_representation = Google::Apis::DatastoreV1::LookupResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::LookupResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::ReserveIdsResponse

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • reserve_ids_request_object (Google::Apis::DatastoreV1::ReserveIdsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



282
283
284
285
286
287
288
289
290
291
292
# File 'generated/google/apis/datastore_v1/service.rb', line 282

def reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:reserveIds', options)
  command.request_representation = Google::Apis::DatastoreV1::ReserveIdsRequest::Representation
  command.request_object = reserve_ids_request_object
  command.response_representation = Google::Apis::DatastoreV1::ReserveIdsResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::ReserveIdsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::RollbackResponse

Rolls back a transaction.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • rollback_request_object (Google::Apis::DatastoreV1::RollbackRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



315
316
317
318
319
320
321
322
323
324
325
# File 'generated/google/apis/datastore_v1/service.rb', line 315

def rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:rollback', options)
  command.request_representation = Google::Apis::DatastoreV1::RollbackRequest::Representation
  command.request_object = rollback_request_object
  command.response_representation = Google::Apis::DatastoreV1::RollbackResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::RollbackResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::RunQueryResponse

Queries for entities.

Parameters:

  • project_id (String)

    Required. The ID of the project against which to make the request.

  • run_query_request_object (Google::Apis::DatastoreV1::RunQueryRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



348
349
350
351
352
353
354
355
356
357
358
# File 'generated/google/apis/datastore_v1/service.rb', line 348

def run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', options)
  command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation
  command.request_object = run_query_request_object
  command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation
  command.response_class = Google::Apis::DatastoreV1::RunQueryResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end