From 28fd8b3409e6d61f56a02370582c683f770af899 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 6 Jan 2016 18:58:02 -0800 Subject: [PATCH 1/3] Renaming Makefile dirs to be Bigtable specific. This is in advance of putting them side-by-side with datastore. --- Makefile | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 64040005d325..01131e8afa75 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ GENERATED_DIR=$(shell pwd)/generated_python -FINAL_DIR=$(shell pwd)/gcloud/bigtable/_generated +BT_DIR=$(shell pwd)/gcloud/bigtable/_generated GRPC_PLUGIN=grpc_python_plugin PROTOC_CMD=protoc -PROTOS_DIR=$(shell pwd)/cloud-bigtable-client/bigtable-protos/src/main/proto +BT_PROTOS_DIR=$(shell pwd)/cloud-bigtable-client/bigtable-protos/src/main/proto help: @echo 'Makefile for gcloud-python Bigtable protos ' @@ -17,37 +17,37 @@ generate: mkdir -p $(GENERATED_DIR) # Generate all *_pb2.py files that require gRPC. $(PROTOC_CMD) \ - --proto_path=$(PROTOS_DIR) \ + --proto_path=$(BT_PROTOS_DIR) \ --python_out=$(GENERATED_DIR) \ --plugin=protoc-gen-grpc=$(GRPC_PLUGIN) \ --grpc_out=$(GENERATED_DIR) \ - $(PROTOS_DIR)/google/bigtable/v1/bigtable_service.proto \ - $(PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \ - $(PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service.proto + $(BT_PROTOS_DIR)/google/bigtable/v1/bigtable_service.proto \ + $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto \ + $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service.proto # Generate all *_pb2.py files that do not require gRPC. $(PROTOC_CMD) \ - --proto_path=$(PROTOS_DIR) \ + --proto_path=$(BT_PROTOS_DIR) \ --python_out=$(GENERATED_DIR) \ - $(PROTOS_DIR)/google/bigtable/v1/bigtable_data.proto \ - $(PROTOS_DIR)/google/bigtable/v1/bigtable_service_messages.proto \ - $(PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \ - $(PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \ - $(PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_data.proto \ - $(PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto + $(BT_PROTOS_DIR)/google/bigtable/v1/bigtable_data.proto \ + $(BT_PROTOS_DIR)/google/bigtable/v1/bigtable_service_messages.proto \ + $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \ + $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \ + $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_data.proto \ + $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto # Move the newly generated *_pb2.py files into our library. - mv $(GENERATED_DIR)/google/bigtable/v1/* $(FINAL_DIR) - mv $(GENERATED_DIR)/google/bigtable/admin/cluster/v1/* $(FINAL_DIR) - mv $(GENERATED_DIR)/google/bigtable/admin/table/v1/* $(FINAL_DIR) + mv $(GENERATED_DIR)/google/bigtable/v1/* $(BT_DIR) + mv $(GENERATED_DIR)/google/bigtable/admin/cluster/v1/* $(BT_DIR) + mv $(GENERATED_DIR)/google/bigtable/admin/table/v1/* $(BT_DIR) # Remove all existing *.proto files before we replace - rm -f $(FINAL_DIR)/*.proto + rm -f $(BT_DIR)/*.proto # Copy over the *.proto files into our library. - cp $(PROTOS_DIR)/google/bigtable/v1/*.proto $(FINAL_DIR) - cp $(PROTOS_DIR)/google/bigtable/admin/cluster/v1/*.proto $(FINAL_DIR) - cp $(PROTOS_DIR)/google/bigtable/admin/table/v1/*.proto $(FINAL_DIR) - cp $(PROTOS_DIR)/google/longrunning/operations.proto $(FINAL_DIR) + cp $(BT_PROTOS_DIR)/google/bigtable/v1/*.proto $(BT_DIR) + cp $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/*.proto $(BT_DIR) + cp $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/*.proto $(BT_DIR) + cp $(BT_PROTOS_DIR)/google/longrunning/operations.proto $(BT_DIR) # Rename all *.proto files in our library with an # underscore and remove executable bit. - cd $(FINAL_DIR) && \ + cd $(BT_DIR) && \ for filename in *.proto; do \ chmod -x $$filename ; \ mv $$filename _$$filename ; \ From 5f1c823fd8d32b9b8ce2df43a9cbd6b6e88b9741 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 6 Jan 2016 19:17:25 -0800 Subject: [PATCH 2/3] Upgrading Makefile to generate datastore v1beta3. Also - Removing `v1beta2` generated code and `.proto` file - Adding new `.proto` files and generated code - Adding `make_datastore_grpc.py` script to tear out the `protoc` inserted lines by the gRPC plugin - Updating `rewrite_imports.py` to rewrite the datastore imports --- .gitignore | 1 + Makefile | 25 +- gcloud/datastore/_datastore_v1.proto | 594 ----- gcloud/datastore/_datastore_v1_pb2.py | 1953 ----------------- gcloud/datastore/_generated/_datastore.proto | 289 +++ gcloud/datastore/_generated/_entity.proto | 196 ++ gcloud/datastore/_generated/_query.proto | 281 +++ .../_generated/datastore_grpc_pb2.py | 279 +++ gcloud/datastore/_generated/datastore_pb2.py | 899 +++++++- gcloud/datastore/_generated/entity_pb2.py | 519 ++++- gcloud/datastore/_generated/query_pb2.py | 950 +++++++- scripts/make_datastore_grpc.py | 115 + scripts/rewrite_imports.py | 4 +- 13 files changed, 3459 insertions(+), 2646 deletions(-) delete mode 100644 gcloud/datastore/_datastore_v1.proto delete mode 100644 gcloud/datastore/_datastore_v1_pb2.py create mode 100644 gcloud/datastore/_generated/_datastore.proto create mode 100644 gcloud/datastore/_generated/_entity.proto create mode 100644 gcloud/datastore/_generated/_query.proto create mode 100644 gcloud/datastore/_generated/datastore_grpc_pb2.py create mode 100644 scripts/make_datastore_grpc.py diff --git a/.gitignore b/.gitignore index fc141b1ca80b..c69d02bb0e65 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ scripts/pylintrc_reduced # Directories used for creating generated PB2 files generated_python/ cloud-bigtable-client/ +googleapis-pb/ diff --git a/Makefile b/Makefile index 01131e8afa75..31063afe38ed 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ GENERATED_DIR=$(shell pwd)/generated_python BT_DIR=$(shell pwd)/gcloud/bigtable/_generated +DS_DIR=$(shell pwd)/gcloud/datastore/_generated GRPC_PLUGIN=grpc_python_plugin PROTOC_CMD=protoc BT_PROTOS_DIR=$(shell pwd)/cloud-bigtable-client/bigtable-protos/src/main/proto +DS_PROTOS_DIR=$(shell pwd)/googleapis-pb help: @echo 'Makefile for gcloud-python Bigtable protos ' @@ -12,8 +14,12 @@ help: @echo ' make clean Clean generated files ' generate: - [ -d cloud-bigtable-client ] || git clone https://github.com/GoogleCloudPlatform/cloud-bigtable-client + # Retrieve git repos that have our *.proto files. + [ -d cloud-bigtable-client ] || git clone https://github.com/GoogleCloudPlatform/cloud-bigtable-client --depth=1 cd cloud-bigtable-client && git pull origin master + [ -d googleapis-pb ] || git clone https://github.com/google/googleapis googleapis-pb --depth=1 + cd googleapis-pb && git pull origin master + # Make the directory where our *_pb2.py files will go. mkdir -p $(GENERATED_DIR) # Generate all *_pb2.py files that require gRPC. $(PROTOC_CMD) \ @@ -27,24 +33,31 @@ generate: # Generate all *_pb2.py files that do not require gRPC. $(PROTOC_CMD) \ --proto_path=$(BT_PROTOS_DIR) \ + --proto_path=$(DS_PROTOS_DIR) \ --python_out=$(GENERATED_DIR) \ $(BT_PROTOS_DIR)/google/bigtable/v1/bigtable_data.proto \ $(BT_PROTOS_DIR)/google/bigtable/v1/bigtable_service_messages.proto \ $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto \ $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto \ $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_data.proto \ - $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto + $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/bigtable_table_service_messages.proto \ + $(DS_PROTOS_DIR)/google/datastore/v1beta3/datastore.proto \ + $(DS_PROTOS_DIR)/google/datastore/v1beta3/entity.proto \ + $(DS_PROTOS_DIR)/google/datastore/v1beta3/query.proto # Move the newly generated *_pb2.py files into our library. mv $(GENERATED_DIR)/google/bigtable/v1/* $(BT_DIR) mv $(GENERATED_DIR)/google/bigtable/admin/cluster/v1/* $(BT_DIR) mv $(GENERATED_DIR)/google/bigtable/admin/table/v1/* $(BT_DIR) + mv $(GENERATED_DIR)/google/datastore/v1beta3/* $(DS_DIR) # Remove all existing *.proto files before we replace rm -f $(BT_DIR)/*.proto + rm -f $(DS_DIR)/*.proto # Copy over the *.proto files into our library. cp $(BT_PROTOS_DIR)/google/bigtable/v1/*.proto $(BT_DIR) cp $(BT_PROTOS_DIR)/google/bigtable/admin/cluster/v1/*.proto $(BT_DIR) cp $(BT_PROTOS_DIR)/google/bigtable/admin/table/v1/*.proto $(BT_DIR) cp $(BT_PROTOS_DIR)/google/longrunning/operations.proto $(BT_DIR) + cp $(DS_PROTOS_DIR)/google/datastore/v1beta3/*.proto $(DS_DIR) # Rename all *.proto files in our library with an # underscore and remove executable bit. cd $(BT_DIR) && \ @@ -52,10 +65,18 @@ generate: chmod -x $$filename ; \ mv $$filename _$$filename ; \ done + cd $(DS_DIR) && \ + for filename in *.proto; do \ + chmod -x $$filename ; \ + mv $$filename _$$filename ; \ + done # Separate the gRPC parts of the operations service from the # non-gRPC parts so that the protos from `googleapis-common-protos` # can be used without gRPC. python scripts/make_operations_grpc.py + # Separate the gRPC parts of the datastore service from the + # non-gRPC parts so that the protos can be used without gRPC. + python scripts/make_datastore_grpc.py # Rewrite the imports in the generated *_pb2.py files. python scripts/rewrite_imports.py diff --git a/gcloud/datastore/_datastore_v1.proto b/gcloud/datastore/_datastore_v1.proto deleted file mode 100644 index 3d562709ddef..000000000000 --- a/gcloud/datastore/_datastore_v1.proto +++ /dev/null @@ -1,594 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// The datastore v1 service proto definitions - -syntax = "proto2"; - -package api.services.datastore; -option java_package = "com.google.api.services.datastore"; - - -// An identifier for a particular subset of entities. -// -// Entities are partitioned into various subsets, each used by different -// datasets and different namespaces within a dataset and so forth. -// -// All input partition IDs are normalized before use. -// A partition ID is normalized as follows: -// If the partition ID is unset or is set to an empty partition ID, replace it -// with the context partition ID. -// Otherwise, if the partition ID has no dataset ID, assign it the context -// partition ID's dataset ID. -// Unless otherwise documented, the context partition ID has the dataset ID set -// to the context dataset ID and no other partition dimension set. -// -// A partition ID is empty if all of its fields are unset. -// -// Partition dimension: -// A dimension may be unset. -// A dimension's value must never be "". -// A dimension's value must match [A-Za-z\d\.\-_]{1,100} -// If the value of any dimension matches regex "__.*__", -// the partition is reserved/read-only. -// A reserved/read-only partition ID is forbidden in certain documented contexts. -// -// Dataset ID: -// A dataset id's value must never be "". -// A dataset id's value must match -// ([a-z\d\-]{1,100}~)?([a-z\d][a-z\d\-\.]{0,99}:)?([a-z\d][a-z\d\-]{0,99} -message PartitionId { - // The dataset ID. - optional string dataset_id = 3; - // The namespace. - optional string namespace = 4; -} - -// A unique identifier for an entity. -// If a key's partition id or any of its path kinds or names are -// reserved/read-only, the key is reserved/read-only. -// A reserved/read-only key is forbidden in certain documented contexts. -message Key { - // Entities are partitioned into subsets, currently identified by a dataset - // (usually implicitly specified by the project) and namespace ID. - // Queries are scoped to a single partition. - optional PartitionId partition_id = 1; - - // A (kind, ID/name) pair used to construct a key path. - // - // At most one of name or ID may be set. - // If either is set, the element is complete. - // If neither is set, the element is incomplete. - message PathElement { - // The kind of the entity. - // A kind matching regex "__.*__" is reserved/read-only. - // A kind must not contain more than 500 characters. - // Cannot be "". - required string kind = 1; - // The ID of the entity. - // Never equal to zero. Values less than zero are discouraged and will not - // be supported in the future. - optional int64 id = 2; - // The name of the entity. - // A name matching regex "__.*__" is reserved/read-only. - // A name must not be more than 500 characters. - // Cannot be "". - optional string name = 3; - } - - // The entity path. - // An entity path consists of one or more elements composed of a kind and a - // string or numerical identifier, which identify entities. The first - // element identifies a root entity, the second element identifies - // a child of the root entity, the third element a child of the - // second entity, and so forth. The entities identified by all prefixes of - // the path are called the element's ancestors. - // An entity path is always fully complete: ALL of the entity's ancestors - // are required to be in the path along with the entity identifier itself. - // The only exception is that in some documented cases, the identifier in the - // last path element (for the entity) itself may be omitted. A path can never - // be empty. - repeated PathElement path_element = 2; -} - -// A message that can hold any of the supported value types and associated -// metadata. -// -// At most one of the Value fields may be set. -// If none are set the value is "null". -// -message Value { - // A boolean value. - optional bool boolean_value = 1; - // An integer value. - optional int64 integer_value = 2; - // A double value. - optional double double_value = 3; - // A timestamp value. - optional int64 timestamp_microseconds_value = 4; - // A key value. - optional Key key_value = 5; - // A blob key value. - optional string blob_key_value = 16; - // A UTF-8 encoded string value. - optional string string_value = 17; - // A blob value. - optional bytes blob_value = 18; - // An entity value. - // May have no key. - // May have a key with an incomplete key path. - // May have a reserved/read-only key. - optional Entity entity_value = 6; - // A list value. - // Cannot contain another list value. - // Cannot also have a meaning and indexing set. - repeated Value list_value = 7; - - // The meaning field is reserved and should not be used. - optional int32 meaning = 14; - - // If the value should be indexed. - // - // The indexed property may be set for a - // null value. - // When indexed is true, stringValue - // is limited to 500 characters and the blob value is limited to 500 bytes. - // Exception: If meaning is set to 2, string_value is limited to 2038 - // characters regardless of indexed. - // When indexed is true, meaning 15 and 22 are not allowed, and meaning 16 - // will be ignored on input (and will never be set on output). - // Input values by default have indexed set to - // true; however, you can explicitly set indexed to - // true if you want. (An output value never has - // indexed explicitly set to true.) If a value is - // itself an entity, it cannot have indexed set to - // true. - // Exception: An entity value with meaning 9, 20 or 21 may be indexed. - optional bool indexed = 15 [default = true]; -} - -// An entity property. -message Property { - // The name of the property. - // A property name matching regex "__.*__" is reserved. - // A reserved property name is forbidden in certain documented contexts. - // The name must not contain more than 500 characters. - // Cannot be "". - required string name = 1; - - // The value(s) of the property. - // Each value can have only one value property populated. For example, - // you cannot have a values list of { value: { integerValue: 22, - // stringValue: "a" } }, but you can have { value: { listValue: - // [ { integerValue: 22 }, { stringValue: "a" } ] }. - required Value value = 4; -} - -// An entity. -// -// An entity is limited to 1 megabyte when stored. That roughly -// corresponds to a limit of 1 megabyte for the serialized form of this -// message. -message Entity { - // The entity's key. - // - // An entity must have a key, unless otherwise documented (for example, - // an entity in Value.entityValue may have no key). - // An entity's kind is its key's path's last element's kind, - // or null if it has no key. - optional Key key = 1; - // The entity's properties. - // Each property's name must be unique for its entity. - repeated Property property = 2; -} - -// The result of fetching an entity from the datastore. -message EntityResult { - // Specifies what data the 'entity' field contains. - // A ResultType is either implied (for example, in LookupResponse.found it - // is always FULL) or specified by context (for example, in message - // QueryResultBatch, field 'entity_result_type' specifies a ResultType - // for all the values in field 'entity_result'). - enum ResultType { - FULL = 1; // The entire entity. - PROJECTION = 2; // A projected subset of properties. - // The entity may have no key. - // A property value may have meaning 18. - KEY_ONLY = 3; // Only the key. - } - - // The resulting entity. - required Entity entity = 1; -} - -// A query. -message Query { - // The projection to return. If not set the entire entity is returned. - repeated PropertyExpression projection = 2; - - // The kinds to query (if empty, returns entities from all kinds). - repeated KindExpression kind = 3; - - // The filter to apply (optional). - optional Filter filter = 4; - - // The order to apply to the query results (if empty, order is unspecified). - repeated PropertyOrder order = 5; - - // The properties to group by (if empty, no grouping is applied to the - // result set). - repeated PropertyReference group_by = 6; - - // A starting point for the query results. Optional. Query cursors are - // returned in query result batches. - optional bytes /* serialized QueryCursor */ start_cursor = 7; - - // An ending point for the query results. Optional. Query cursors are - // returned in query result batches. - optional bytes /* serialized QueryCursor */ end_cursor = 8; - - // The number of results to skip. Applies before limit, but after all other - // constraints (optional, defaults to 0). - optional int32 offset = 10 [default=0]; - - // The maximum number of results to return. Applies after all other - // constraints. Optional. - optional int32 limit = 11; -} - -// A representation of a kind. -message KindExpression { - // The name of the kind. - required string name = 1; -} - -// A reference to a property relative to the kind expressions. -// exactly. -message PropertyReference { - // The name of the property. - required string name = 2; -} - -// A representation of a property in a projection. -message PropertyExpression { - enum AggregationFunction { - FIRST = 1; - } - // The property to project. - required PropertyReference property = 1; - // The aggregation function to apply to the property. Optional. - // Can only be used when grouping by at least one property. Must - // then be set on all properties in the projection that are not - // being grouped by. - optional AggregationFunction aggregation_function = 2; -} - -// The desired order for a specific property. -message PropertyOrder { - enum Direction { - ASCENDING = 1; - DESCENDING = 2; - } - // The property to order by. - required PropertyReference property = 1; - // The direction to order by. - optional Direction direction = 2 [default=ASCENDING]; -} - -// A holder for any type of filter. Exactly one field should be specified. -message Filter { - // A composite filter. - optional CompositeFilter composite_filter = 1; - // A filter on a property. - optional PropertyFilter property_filter = 2; -} - -// A filter that merges the multiple other filters using the given operation. -message CompositeFilter { - enum Operator { - AND = 1; - } - - // The operator for combining multiple filters. - required Operator operator = 1; - // The list of filters to combine. - // Must contain at least one filter. - repeated Filter filter = 2; -} - -// A filter on a specific property. -message PropertyFilter { - enum Operator { - LESS_THAN = 1; - LESS_THAN_OR_EQUAL = 2; - GREATER_THAN = 3; - GREATER_THAN_OR_EQUAL = 4; - EQUAL = 5; - - HAS_ANCESTOR = 11; - } - - // The property to filter by. - required PropertyReference property = 1; - // The operator to filter by. - required Operator operator = 2; - // The value to compare the property to. - required Value value = 3; -} - -// A GQL query. -message GqlQuery { - required string query_string = 1; - // When false, the query string must not contain a literal. - optional bool allow_literal = 2 [default = false]; - // A named argument must set field GqlQueryArg.name. - // No two named arguments may have the same name. - // For each non-reserved named binding site in the query string, - // there must be a named argument with that name, - // but not necessarily the inverse. - repeated GqlQueryArg name_arg = 3; - // Numbered binding site @1 references the first numbered argument, - // effectively using 1-based indexing, rather than the usual 0. - // A numbered argument must NOT set field GqlQueryArg.name. - // For each binding site numbered i in query_string, - // there must be an ith numbered argument. - // The inverse must also be true. - repeated GqlQueryArg number_arg = 4; -} - -// A binding argument for a GQL query. -// Exactly one of fields value and cursor must be set. -message GqlQueryArg { - // Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". - // Must not match regex "__.*__". - // Must not be "". - optional string name = 1; - optional Value value = 2; - optional bytes cursor = 3; -} - -// A batch of results produced by a query. -message QueryResultBatch { - // The possible values for the 'more_results' field. - enum MoreResultsType { - NOT_FINISHED = 1; // There are additional batches to fetch from this query. - MORE_RESULTS_AFTER_LIMIT = 2; // The query is finished, but there are more - // results after the limit. - NO_MORE_RESULTS = 3; // The query has been exhausted. - } - - // The result type for every entity in entityResults. - required EntityResult.ResultType entity_result_type = 1; - // The results for this batch. - repeated EntityResult entity_result = 2; - - // A cursor that points to the position after the last result in the batch. - // May be absent. - optional bytes /* serialized QueryCursor */ end_cursor = 4; - - // The state of the query after the current batch. - required MoreResultsType more_results = 5; - - // The number of results skipped because of Query.offset. - optional int32 skipped_results = 6; -} - -// A set of changes to apply. -// -// No entity in this message may have a reserved property name, -// not even a property in an entity in a value. -// No value in this message may have meaning 18, -// not even a value in an entity in another value. -// -// If entities with duplicate keys are present, an arbitrary choice will -// be made as to which is written. -message Mutation { - // Entities to upsert. - // Each upserted entity's key must have a complete path and - // must not be reserved/read-only. - repeated Entity upsert = 1; - // Entities to update. - // Each updated entity's key must have a complete path and - // must not be reserved/read-only. - repeated Entity update = 2; - // Entities to insert. - // Each inserted entity's key must have a complete path and - // must not be reserved/read-only. - repeated Entity insert = 3; - // Insert entities with a newly allocated ID. - // Each inserted entity's key must omit the final identifier in its path and - // must not be reserved/read-only. - repeated Entity insert_auto_id = 4; - // Keys of entities to delete. - // Each key must have a complete key path and must not be reserved/read-only. - repeated Key delete = 5; - // Ignore a user specified read-only period. Optional. - optional bool force = 6; -} - -// The result of applying a mutation. -message MutationResult { - // Number of index writes. - required int32 index_updates = 1; - // Keys for insertAutoId entities. One per entity from the - // request, in the same order. - repeated Key insert_auto_id_key = 2; -} - -// Options shared by read requests. -message ReadOptions { - enum ReadConsistency { - DEFAULT = 0; - STRONG = 1; - EVENTUAL = 2; - } - - // The read consistency to use. - // Cannot be set when transaction is set. - // Lookup and ancestor queries default to STRONG, global queries default to - // EVENTUAL and cannot be set to STRONG. - optional ReadConsistency read_consistency = 1 [default=DEFAULT]; - - // The transaction to use. Optional. - optional bytes /* serialized Transaction */ transaction = 2; -} - -// The request for Lookup. -message LookupRequest { - - // Options for this lookup request. Optional. - optional ReadOptions read_options = 1; - // Keys of entities to look up from the datastore. - repeated Key key = 3; -} - -// The response for Lookup. -message LookupResponse { - - // The order of results in these fields is undefined and has no relation to - // the order of the keys in the input. - - // Entities found as ResultType.FULL entities. - repeated EntityResult found = 1; - - // Entities not found as ResultType.KEY_ONLY entities. - repeated EntityResult missing = 2; - - // A list of keys that were not looked up due to resource constraints. - repeated Key deferred = 3; -} - - -// The request for RunQuery. -message RunQueryRequest { - - // The options for this query. - optional ReadOptions read_options = 1; - - // Entities are partitioned into subsets, identified by a dataset (usually - // implicitly specified by the project) and namespace ID. Queries are scoped - // to a single partition. - // This partition ID is normalized with the standard default context - // partition ID, but all other partition IDs in RunQueryRequest are - // normalized with this partition ID as the context partition ID. - optional PartitionId partition_id = 2; - - // The query to run. - // Either this field or field gql_query must be set, but not both. - optional Query query = 3; - // The GQL query to run. - // Either this field or field query must be set, but not both. - optional GqlQuery gql_query = 7; -} - -// The response for RunQuery. -message RunQueryResponse { - - // A batch of query results (always present). - optional QueryResultBatch batch = 1; - -} - -// The request for BeginTransaction. -message BeginTransactionRequest { - - enum IsolationLevel { - SNAPSHOT = 0; // Read from a consistent snapshot. Concurrent transactions - // conflict if their mutations conflict. For example: - // Read(A),Write(B) may not conflict with Read(B),Write(A), - // but Read(B),Write(B) does conflict with Read(B),Write(B). - SERIALIZABLE = 1; // Read from a consistent snapshot. Concurrent - // transactions conflict if they cannot be serialized. - // For example Read(A),Write(B) does conflict with - // Read(B),Write(A) but Read(A) may not conflict with - // Write(A). - } - - // The transaction isolation level. - optional IsolationLevel isolation_level = 1 [default=SNAPSHOT]; -} - -// The response for BeginTransaction. -message BeginTransactionResponse { - - // The transaction identifier (always present). - optional bytes /* serialized Transaction */ transaction = 1; -} - -// The request for Rollback. -message RollbackRequest { - - // The transaction identifier, returned by a call to - // beginTransaction. - required bytes /* serialized Transaction */ transaction = 1; -} - -// The response for Rollback. -message RollbackResponse { -// Empty -} - -// The request for Commit. -message CommitRequest { - - enum Mode { - TRANSACTIONAL = 1; - NON_TRANSACTIONAL = 2; - } - - // The transaction identifier, returned by a call to - // beginTransaction. Must be set when mode is TRANSACTIONAL. - optional bytes /* serialized Transaction */ transaction = 1; - // The mutation to perform. Optional. - optional Mutation mutation = 2; - // The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. - optional Mode mode = 5 [default=TRANSACTIONAL]; -} - -// The response for Commit. -message CommitResponse { - - // The result of performing the mutation (if any). - optional MutationResult mutation_result = 1; -} - -// The request for AllocateIds. -message AllocateIdsRequest { - - // A list of keys with incomplete key paths to allocate IDs for. - // No key may be reserved/read-only. - repeated Key key = 1; -} - -// The response for AllocateIds. -message AllocateIdsResponse { - - // The keys specified in the request (in the same order), each with - // its key path completed with a newly allocated ID. - repeated Key key = 1; -} - -// Each rpc normalizes the partition IDs of the keys in its input entities, -// and always returns entities with keys with normalized partition IDs. -// (Note that applies to all entities, including entities in values.) -service DatastoreService { - // Look up some entities by key. - rpc Lookup(LookupRequest) returns (LookupResponse) { - }; - // Query for entities. - rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) { - }; - // Begin a new transaction. - rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { - }; - // Commit a transaction, optionally creating, deleting or modifying some - // entities. - rpc Commit(CommitRequest) returns (CommitResponse) { - }; - // Roll back a transaction. - rpc Rollback(RollbackRequest) returns (RollbackResponse) { - }; - // Allocate IDs for incomplete keys (useful for referencing an entity before - // it is inserted). - rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) { - }; -} diff --git a/gcloud/datastore/_datastore_v1_pb2.py b/gcloud/datastore/_datastore_v1_pb2.py deleted file mode 100644 index e31b4baec791..000000000000 --- a/gcloud/datastore/_datastore_v1_pb2.py +++ /dev/null @@ -1,1953 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: _datastore_v1.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='_datastore_v1.proto', - package='api.services.datastore', - serialized_pb=_b('\n\x13_datastore_v1.proto\x12\x16\x61pi.services.datastore\"4\n\x0bPartitionId\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\"\xb6\x01\n\x03Key\x12\x39\n\x0cpartition_id\x18\x01 \x01(\x0b\x32#.api.services.datastore.PartitionId\x12=\n\x0cpath_element\x18\x02 \x03(\x0b\x32\'.api.services.datastore.Key.PathElement\x1a\x35\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x02(\t\x12\n\n\x02id\x18\x02 \x01(\x03\x12\x0c\n\x04name\x18\x03 \x01(\t\"\xf4\x02\n\x05Value\x12\x15\n\rboolean_value\x18\x01 \x01(\x08\x12\x15\n\rinteger_value\x18\x02 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x03 \x01(\x01\x12$\n\x1ctimestamp_microseconds_value\x18\x04 \x01(\x03\x12.\n\tkey_value\x18\x05 \x01(\x0b\x32\x1b.api.services.datastore.Key\x12\x16\n\x0e\x62lob_key_value\x18\x10 \x01(\t\x12\x14\n\x0cstring_value\x18\x11 \x01(\t\x12\x12\n\nblob_value\x18\x12 \x01(\x0c\x12\x34\n\x0c\x65ntity_value\x18\x06 \x01(\x0b\x32\x1e.api.services.datastore.Entity\x12\x31\n\nlist_value\x18\x07 \x03(\x0b\x32\x1d.api.services.datastore.Value\x12\x0f\n\x07meaning\x18\x0e \x01(\x05\x12\x15\n\x07indexed\x18\x0f \x01(\x08:\x04true\"F\n\x08Property\x12\x0c\n\x04name\x18\x01 \x02(\t\x12,\n\x05value\x18\x04 \x02(\x0b\x32\x1d.api.services.datastore.Value\"f\n\x06\x45ntity\x12(\n\x03key\x18\x01 \x01(\x0b\x32\x1b.api.services.datastore.Key\x12\x32\n\x08property\x18\x02 \x03(\x0b\x32 .api.services.datastore.Property\"t\n\x0c\x45ntityResult\x12.\n\x06\x65ntity\x18\x01 \x02(\x0b\x32\x1e.api.services.datastore.Entity\"4\n\nResultType\x12\x08\n\x04\x46ULL\x10\x01\x12\x0e\n\nPROJECTION\x10\x02\x12\x0c\n\x08KEY_ONLY\x10\x03\"\xec\x02\n\x05Query\x12>\n\nprojection\x18\x02 \x03(\x0b\x32*.api.services.datastore.PropertyExpression\x12\x34\n\x04kind\x18\x03 \x03(\x0b\x32&.api.services.datastore.KindExpression\x12.\n\x06\x66ilter\x18\x04 \x01(\x0b\x32\x1e.api.services.datastore.Filter\x12\x34\n\x05order\x18\x05 \x03(\x0b\x32%.api.services.datastore.PropertyOrder\x12;\n\x08group_by\x18\x06 \x03(\x0b\x32).api.services.datastore.PropertyReference\x12\x14\n\x0cstart_cursor\x18\x07 \x01(\x0c\x12\x12\n\nend_cursor\x18\x08 \x01(\x0c\x12\x11\n\x06offset\x18\n \x01(\x05:\x01\x30\x12\r\n\x05limit\x18\x0b \x01(\x05\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x02(\t\"!\n\x11PropertyReference\x12\x0c\n\x04name\x18\x02 \x02(\t\"\xd1\x01\n\x12PropertyExpression\x12;\n\x08property\x18\x01 \x02(\x0b\x32).api.services.datastore.PropertyReference\x12\\\n\x14\x61ggregation_function\x18\x02 \x01(\x0e\x32>.api.services.datastore.PropertyExpression.AggregationFunction\" \n\x13\x41ggregationFunction\x12\t\n\x05\x46IRST\x10\x01\"\xc7\x01\n\rPropertyOrder\x12;\n\x08property\x18\x01 \x02(\x0b\x32).api.services.datastore.PropertyReference\x12M\n\tdirection\x18\x02 \x01(\x0e\x32/.api.services.datastore.PropertyOrder.Direction:\tASCENDING\"*\n\tDirection\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"\x8c\x01\n\x06\x46ilter\x12\x41\n\x10\x63omposite_filter\x18\x01 \x01(\x0b\x32\'.api.services.datastore.CompositeFilter\x12?\n\x0fproperty_filter\x18\x02 \x01(\x0b\x32&.api.services.datastore.PropertyFilter\"\x9a\x01\n\x0f\x43ompositeFilter\x12\x42\n\x08operator\x18\x01 \x02(\x0e\x32\x30.api.services.datastore.CompositeFilter.Operator\x12.\n\x06\x66ilter\x18\x02 \x03(\x0b\x32\x1e.api.services.datastore.Filter\"\x13\n\x08Operator\x12\x07\n\x03\x41ND\x10\x01\"\xbb\x02\n\x0ePropertyFilter\x12;\n\x08property\x18\x01 \x02(\x0b\x32).api.services.datastore.PropertyReference\x12\x41\n\x08operator\x18\x02 \x02(\x0e\x32/.api.services.datastore.PropertyFilter.Operator\x12,\n\x05value\x18\x03 \x02(\x0b\x32\x1d.api.services.datastore.Value\"{\n\x08Operator\x12\r\n\tLESS_THAN\x10\x01\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\t\n\x05\x45QUAL\x10\x05\x12\x10\n\x0cHAS_ANCESTOR\x10\x0b\"\xae\x01\n\x08GqlQuery\x12\x14\n\x0cquery_string\x18\x01 \x02(\t\x12\x1c\n\rallow_literal\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x35\n\x08name_arg\x18\x03 \x03(\x0b\x32#.api.services.datastore.GqlQueryArg\x12\x37\n\nnumber_arg\x18\x04 \x03(\x0b\x32#.api.services.datastore.GqlQueryArg\"Y\n\x0bGqlQueryArg\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.api.services.datastore.Value\x12\x0e\n\x06\x63ursor\x18\x03 \x01(\x0c\"\xf1\x02\n\x10QueryResultBatch\x12K\n\x12\x65ntity_result_type\x18\x01 \x02(\x0e\x32/.api.services.datastore.EntityResult.ResultType\x12;\n\rentity_result\x18\x02 \x03(\x0b\x32$.api.services.datastore.EntityResult\x12\x12\n\nend_cursor\x18\x04 \x01(\x0c\x12N\n\x0cmore_results\x18\x05 \x02(\x0e\x32\x38.api.services.datastore.QueryResultBatch.MoreResultsType\x12\x17\n\x0fskipped_results\x18\x06 \x01(\x05\"V\n\x0fMoreResultsType\x12\x10\n\x0cNOT_FINISHED\x10\x01\x12\x1c\n\x18MORE_RESULTS_AFTER_LIMIT\x10\x02\x12\x13\n\x0fNO_MORE_RESULTS\x10\x03\"\x8e\x02\n\x08Mutation\x12.\n\x06upsert\x18\x01 \x03(\x0b\x32\x1e.api.services.datastore.Entity\x12.\n\x06update\x18\x02 \x03(\x0b\x32\x1e.api.services.datastore.Entity\x12.\n\x06insert\x18\x03 \x03(\x0b\x32\x1e.api.services.datastore.Entity\x12\x36\n\x0einsert_auto_id\x18\x04 \x03(\x0b\x32\x1e.api.services.datastore.Entity\x12+\n\x06\x64\x65lete\x18\x05 \x03(\x0b\x32\x1b.api.services.datastore.Key\x12\r\n\x05\x66orce\x18\x06 \x01(\x08\"`\n\x0eMutationResult\x12\x15\n\rindex_updates\x18\x01 \x02(\x05\x12\x37\n\x12insert_auto_id_key\x18\x02 \x03(\x0b\x32\x1b.api.services.datastore.Key\"\xb4\x01\n\x0bReadOptions\x12V\n\x10read_consistency\x18\x01 \x01(\x0e\x32\x33.api.services.datastore.ReadOptions.ReadConsistency:\x07\x44\x45\x46\x41ULT\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\"8\n\x0fReadConsistency\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STRONG\x10\x01\x12\x0c\n\x08\x45VENTUAL\x10\x02\"t\n\rLookupRequest\x12\x39\n\x0cread_options\x18\x01 \x01(\x0b\x32#.api.services.datastore.ReadOptions\x12(\n\x03key\x18\x03 \x03(\x0b\x32\x1b.api.services.datastore.Key\"\xab\x01\n\x0eLookupResponse\x12\x33\n\x05\x66ound\x18\x01 \x03(\x0b\x32$.api.services.datastore.EntityResult\x12\x35\n\x07missing\x18\x02 \x03(\x0b\x32$.api.services.datastore.EntityResult\x12-\n\x08\x64\x65\x66\x65rred\x18\x03 \x03(\x0b\x32\x1b.api.services.datastore.Key\"\xea\x01\n\x0fRunQueryRequest\x12\x39\n\x0cread_options\x18\x01 \x01(\x0b\x32#.api.services.datastore.ReadOptions\x12\x39\n\x0cpartition_id\x18\x02 \x01(\x0b\x32#.api.services.datastore.PartitionId\x12,\n\x05query\x18\x03 \x01(\x0b\x32\x1d.api.services.datastore.Query\x12\x33\n\tgql_query\x18\x07 \x01(\x0b\x32 .api.services.datastore.GqlQuery\"K\n\x10RunQueryResponse\x12\x37\n\x05\x62\x61tch\x18\x01 \x01(\x0b\x32(.api.services.datastore.QueryResultBatch\"\xae\x01\n\x17\x42\x65ginTransactionRequest\x12\x61\n\x0fisolation_level\x18\x01 \x01(\x0e\x32>.api.services.datastore.BeginTransactionRequest.IsolationLevel:\x08SNAPSHOT\"0\n\x0eIsolationLevel\x12\x0c\n\x08SNAPSHOT\x10\x00\x12\x10\n\x0cSERIALIZABLE\x10\x01\"/\n\x18\x42\x65ginTransactionResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\"&\n\x0fRollbackRequest\x12\x13\n\x0btransaction\x18\x01 \x02(\x0c\"\x12\n\x10RollbackResponse\"\xd3\x01\n\rCommitRequest\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\x12\x32\n\x08mutation\x18\x02 \x01(\x0b\x32 .api.services.datastore.Mutation\x12G\n\x04mode\x18\x05 \x01(\x0e\x32*.api.services.datastore.CommitRequest.Mode:\rTRANSACTIONAL\"0\n\x04Mode\x12\x11\n\rTRANSACTIONAL\x10\x01\x12\x15\n\x11NON_TRANSACTIONAL\x10\x02\"Q\n\x0e\x43ommitResponse\x12?\n\x0fmutation_result\x18\x01 \x01(\x0b\x32&.api.services.datastore.MutationResult\">\n\x12\x41llocateIdsRequest\x12(\n\x03key\x18\x01 \x03(\x0b\x32\x1b.api.services.datastore.Key\"?\n\x13\x41llocateIdsResponse\x12(\n\x03key\x18\x01 \x03(\x0b\x32\x1b.api.services.datastore.Key2\xed\x04\n\x10\x44\x61tastoreService\x12Y\n\x06Lookup\x12%.api.services.datastore.LookupRequest\x1a&.api.services.datastore.LookupResponse\"\x00\x12_\n\x08RunQuery\x12\'.api.services.datastore.RunQueryRequest\x1a(.api.services.datastore.RunQueryResponse\"\x00\x12w\n\x10\x42\x65ginTransaction\x12/.api.services.datastore.BeginTransactionRequest\x1a\x30.api.services.datastore.BeginTransactionResponse\"\x00\x12Y\n\x06\x43ommit\x12%.api.services.datastore.CommitRequest\x1a&.api.services.datastore.CommitResponse\"\x00\x12_\n\x08Rollback\x12\'.api.services.datastore.RollbackRequest\x1a(.api.services.datastore.RollbackResponse\"\x00\x12h\n\x0b\x41llocateIds\x12*.api.services.datastore.AllocateIdsRequest\x1a+.api.services.datastore.AllocateIdsResponse\"\x00\x42#\n!com.google.api.services.datastore') -) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - - -_ENTITYRESULT_RESULTTYPE = _descriptor.EnumDescriptor( - name='ResultType', - full_name='api.services.datastore.EntityResult.ResultType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='FULL', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='PROJECTION', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='KEY_ONLY', index=2, number=3, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=901, - serialized_end=953, -) -_sym_db.RegisterEnumDescriptor(_ENTITYRESULT_RESULTTYPE) - -_PROPERTYEXPRESSION_AGGREGATIONFUNCTION = _descriptor.EnumDescriptor( - name='AggregationFunction', - full_name='api.services.datastore.PropertyExpression.AggregationFunction', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='FIRST', index=0, number=1, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1567, - serialized_end=1599, -) -_sym_db.RegisterEnumDescriptor(_PROPERTYEXPRESSION_AGGREGATIONFUNCTION) - -_PROPERTYORDER_DIRECTION = _descriptor.EnumDescriptor( - name='Direction', - full_name='api.services.datastore.PropertyOrder.Direction', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='ASCENDING', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DESCENDING', index=1, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1759, - serialized_end=1801, -) -_sym_db.RegisterEnumDescriptor(_PROPERTYORDER_DIRECTION) - -_COMPOSITEFILTER_OPERATOR = _descriptor.EnumDescriptor( - name='Operator', - full_name='api.services.datastore.CompositeFilter.Operator', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='AND', index=0, number=1, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2082, - serialized_end=2101, -) -_sym_db.RegisterEnumDescriptor(_COMPOSITEFILTER_OPERATOR) - -_PROPERTYFILTER_OPERATOR = _descriptor.EnumDescriptor( - name='Operator', - full_name='api.services.datastore.PropertyFilter.Operator', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='LESS_THAN', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='LESS_THAN_OR_EQUAL', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='GREATER_THAN', index=2, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='GREATER_THAN_OR_EQUAL', index=3, number=4, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EQUAL', index=4, number=5, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='HAS_ANCESTOR', index=5, number=11, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2296, - serialized_end=2419, -) -_sym_db.RegisterEnumDescriptor(_PROPERTYFILTER_OPERATOR) - -_QUERYRESULTBATCH_MORERESULTSTYPE = _descriptor.EnumDescriptor( - name='MoreResultsType', - full_name='api.services.datastore.QueryResultBatch.MoreResultsType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='NOT_FINISHED', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='MORE_RESULTS_AFTER_LIMIT', index=1, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NO_MORE_RESULTS', index=2, number=3, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2973, - serialized_end=3059, -) -_sym_db.RegisterEnumDescriptor(_QUERYRESULTBATCH_MORERESULTSTYPE) - -_READOPTIONS_READCONSISTENCY = _descriptor.EnumDescriptor( - name='ReadConsistency', - full_name='api.services.datastore.ReadOptions.ReadConsistency', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='DEFAULT', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='STRONG', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EVENTUAL', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=3557, - serialized_end=3613, -) -_sym_db.RegisterEnumDescriptor(_READOPTIONS_READCONSISTENCY) - -_BEGINTRANSACTIONREQUEST_ISOLATIONLEVEL = _descriptor.EnumDescriptor( - name='IsolationLevel', - full_name='api.services.datastore.BeginTransactionRequest.IsolationLevel', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='SNAPSHOT', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SERIALIZABLE', index=1, number=1, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=4348, - serialized_end=4396, -) -_sym_db.RegisterEnumDescriptor(_BEGINTRANSACTIONREQUEST_ISOLATIONLEVEL) - -_COMMITREQUEST_MODE = _descriptor.EnumDescriptor( - name='Mode', - full_name='api.services.datastore.CommitRequest.Mode', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='TRANSACTIONAL', index=0, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NON_TRANSACTIONAL', index=1, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=4671, - serialized_end=4719, -) -_sym_db.RegisterEnumDescriptor(_COMMITREQUEST_MODE) - - -_PARTITIONID = _descriptor.Descriptor( - name='PartitionId', - full_name='api.services.datastore.PartitionId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='dataset_id', full_name='api.services.datastore.PartitionId.dataset_id', index=0, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='namespace', full_name='api.services.datastore.PartitionId.namespace', index=1, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=47, - serialized_end=99, -) - - -_KEY_PATHELEMENT = _descriptor.Descriptor( - name='PathElement', - full_name='api.services.datastore.Key.PathElement', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kind', full_name='api.services.datastore.Key.PathElement.kind', index=0, - number=1, type=9, cpp_type=9, label=2, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='id', full_name='api.services.datastore.Key.PathElement.id', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='name', full_name='api.services.datastore.Key.PathElement.name', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=231, - serialized_end=284, -) - -_KEY = _descriptor.Descriptor( - name='Key', - full_name='api.services.datastore.Key', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='partition_id', full_name='api.services.datastore.Key.partition_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='path_element', full_name='api.services.datastore.Key.path_element', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[_KEY_PATHELEMENT, ], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=102, - serialized_end=284, -) - - -_VALUE = _descriptor.Descriptor( - name='Value', - full_name='api.services.datastore.Value', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='boolean_value', full_name='api.services.datastore.Value.boolean_value', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='integer_value', full_name='api.services.datastore.Value.integer_value', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='double_value', full_name='api.services.datastore.Value.double_value', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='timestamp_microseconds_value', full_name='api.services.datastore.Value.timestamp_microseconds_value', index=3, - number=4, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='key_value', full_name='api.services.datastore.Value.key_value', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='blob_key_value', full_name='api.services.datastore.Value.blob_key_value', index=5, - number=16, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='string_value', full_name='api.services.datastore.Value.string_value', index=6, - number=17, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='blob_value', full_name='api.services.datastore.Value.blob_value', index=7, - number=18, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='entity_value', full_name='api.services.datastore.Value.entity_value', index=8, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='list_value', full_name='api.services.datastore.Value.list_value', index=9, - number=7, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='meaning', full_name='api.services.datastore.Value.meaning', index=10, - number=14, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='indexed', full_name='api.services.datastore.Value.indexed', index=11, - number=15, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=True, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=287, - serialized_end=659, -) - - -_PROPERTY = _descriptor.Descriptor( - name='Property', - full_name='api.services.datastore.Property', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='api.services.datastore.Property.name', index=0, - number=1, type=9, cpp_type=9, label=2, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='api.services.datastore.Property.value', index=1, - number=4, type=11, cpp_type=10, label=2, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=661, - serialized_end=731, -) - - -_ENTITY = _descriptor.Descriptor( - name='Entity', - full_name='api.services.datastore.Entity', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='api.services.datastore.Entity.key', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='property', full_name='api.services.datastore.Entity.property', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=733, - serialized_end=835, -) - - -_ENTITYRESULT = _descriptor.Descriptor( - name='EntityResult', - full_name='api.services.datastore.EntityResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='entity', full_name='api.services.datastore.EntityResult.entity', index=0, - number=1, type=11, cpp_type=10, label=2, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _ENTITYRESULT_RESULTTYPE, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=837, - serialized_end=953, -) - - -_QUERY = _descriptor.Descriptor( - name='Query', - full_name='api.services.datastore.Query', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='projection', full_name='api.services.datastore.Query.projection', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='kind', full_name='api.services.datastore.Query.kind', index=1, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='filter', full_name='api.services.datastore.Query.filter', index=2, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='order', full_name='api.services.datastore.Query.order', index=3, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='group_by', full_name='api.services.datastore.Query.group_by', index=4, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='start_cursor', full_name='api.services.datastore.Query.start_cursor', index=5, - number=7, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='end_cursor', full_name='api.services.datastore.Query.end_cursor', index=6, - number=8, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='offset', full_name='api.services.datastore.Query.offset', index=7, - number=10, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='limit', full_name='api.services.datastore.Query.limit', index=8, - number=11, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=956, - serialized_end=1320, -) - - -_KINDEXPRESSION = _descriptor.Descriptor( - name='KindExpression', - full_name='api.services.datastore.KindExpression', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='api.services.datastore.KindExpression.name', index=0, - number=1, type=9, cpp_type=9, label=2, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=1322, - serialized_end=1352, -) - - -_PROPERTYREFERENCE = _descriptor.Descriptor( - name='PropertyReference', - full_name='api.services.datastore.PropertyReference', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='api.services.datastore.PropertyReference.name', index=0, - number=2, type=9, cpp_type=9, label=2, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=1354, - serialized_end=1387, -) - - -_PROPERTYEXPRESSION = _descriptor.Descriptor( - name='PropertyExpression', - full_name='api.services.datastore.PropertyExpression', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='property', full_name='api.services.datastore.PropertyExpression.property', index=0, - number=1, type=11, cpp_type=10, label=2, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='aggregation_function', full_name='api.services.datastore.PropertyExpression.aggregation_function', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _PROPERTYEXPRESSION_AGGREGATIONFUNCTION, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=1390, - serialized_end=1599, -) - - -_PROPERTYORDER = _descriptor.Descriptor( - name='PropertyOrder', - full_name='api.services.datastore.PropertyOrder', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='property', full_name='api.services.datastore.PropertyOrder.property', index=0, - number=1, type=11, cpp_type=10, label=2, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='direction', full_name='api.services.datastore.PropertyOrder.direction', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _PROPERTYORDER_DIRECTION, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=1602, - serialized_end=1801, -) - - -_FILTER = _descriptor.Descriptor( - name='Filter', - full_name='api.services.datastore.Filter', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='composite_filter', full_name='api.services.datastore.Filter.composite_filter', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='property_filter', full_name='api.services.datastore.Filter.property_filter', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=1804, - serialized_end=1944, -) - - -_COMPOSITEFILTER = _descriptor.Descriptor( - name='CompositeFilter', - full_name='api.services.datastore.CompositeFilter', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='operator', full_name='api.services.datastore.CompositeFilter.operator', index=0, - number=1, type=14, cpp_type=8, label=2, - has_default_value=False, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='filter', full_name='api.services.datastore.CompositeFilter.filter', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _COMPOSITEFILTER_OPERATOR, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=1947, - serialized_end=2101, -) - - -_PROPERTYFILTER = _descriptor.Descriptor( - name='PropertyFilter', - full_name='api.services.datastore.PropertyFilter', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='property', full_name='api.services.datastore.PropertyFilter.property', index=0, - number=1, type=11, cpp_type=10, label=2, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='operator', full_name='api.services.datastore.PropertyFilter.operator', index=1, - number=2, type=14, cpp_type=8, label=2, - has_default_value=False, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='api.services.datastore.PropertyFilter.value', index=2, - number=3, type=11, cpp_type=10, label=2, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _PROPERTYFILTER_OPERATOR, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=2104, - serialized_end=2419, -) - - -_GQLQUERY = _descriptor.Descriptor( - name='GqlQuery', - full_name='api.services.datastore.GqlQuery', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='query_string', full_name='api.services.datastore.GqlQuery.query_string', index=0, - number=1, type=9, cpp_type=9, label=2, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='allow_literal', full_name='api.services.datastore.GqlQuery.allow_literal', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='name_arg', full_name='api.services.datastore.GqlQuery.name_arg', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='number_arg', full_name='api.services.datastore.GqlQuery.number_arg', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=2422, - serialized_end=2596, -) - - -_GQLQUERYARG = _descriptor.Descriptor( - name='GqlQueryArg', - full_name='api.services.datastore.GqlQueryArg', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='api.services.datastore.GqlQueryArg.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='value', full_name='api.services.datastore.GqlQueryArg.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='cursor', full_name='api.services.datastore.GqlQueryArg.cursor', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=2598, - serialized_end=2687, -) - - -_QUERYRESULTBATCH = _descriptor.Descriptor( - name='QueryResultBatch', - full_name='api.services.datastore.QueryResultBatch', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='entity_result_type', full_name='api.services.datastore.QueryResultBatch.entity_result_type', index=0, - number=1, type=14, cpp_type=8, label=2, - has_default_value=False, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='entity_result', full_name='api.services.datastore.QueryResultBatch.entity_result', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='end_cursor', full_name='api.services.datastore.QueryResultBatch.end_cursor', index=2, - number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='more_results', full_name='api.services.datastore.QueryResultBatch.more_results', index=3, - number=5, type=14, cpp_type=8, label=2, - has_default_value=False, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='skipped_results', full_name='api.services.datastore.QueryResultBatch.skipped_results', index=4, - number=6, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _QUERYRESULTBATCH_MORERESULTSTYPE, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=2690, - serialized_end=3059, -) - - -_MUTATION = _descriptor.Descriptor( - name='Mutation', - full_name='api.services.datastore.Mutation', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='upsert', full_name='api.services.datastore.Mutation.upsert', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='update', full_name='api.services.datastore.Mutation.update', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='insert', full_name='api.services.datastore.Mutation.insert', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='insert_auto_id', full_name='api.services.datastore.Mutation.insert_auto_id', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='delete', full_name='api.services.datastore.Mutation.delete', index=4, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='force', full_name='api.services.datastore.Mutation.force', index=5, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=3062, - serialized_end=3332, -) - - -_MUTATIONRESULT = _descriptor.Descriptor( - name='MutationResult', - full_name='api.services.datastore.MutationResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='index_updates', full_name='api.services.datastore.MutationResult.index_updates', index=0, - number=1, type=5, cpp_type=1, label=2, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='insert_auto_id_key', full_name='api.services.datastore.MutationResult.insert_auto_id_key', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=3334, - serialized_end=3430, -) - - -_READOPTIONS = _descriptor.Descriptor( - name='ReadOptions', - full_name='api.services.datastore.ReadOptions', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='read_consistency', full_name='api.services.datastore.ReadOptions.read_consistency', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='transaction', full_name='api.services.datastore.ReadOptions.transaction', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _READOPTIONS_READCONSISTENCY, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=3433, - serialized_end=3613, -) - - -_LOOKUPREQUEST = _descriptor.Descriptor( - name='LookupRequest', - full_name='api.services.datastore.LookupRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='read_options', full_name='api.services.datastore.LookupRequest.read_options', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='key', full_name='api.services.datastore.LookupRequest.key', index=1, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=3615, - serialized_end=3731, -) - - -_LOOKUPRESPONSE = _descriptor.Descriptor( - name='LookupResponse', - full_name='api.services.datastore.LookupResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='found', full_name='api.services.datastore.LookupResponse.found', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='missing', full_name='api.services.datastore.LookupResponse.missing', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='deferred', full_name='api.services.datastore.LookupResponse.deferred', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=3734, - serialized_end=3905, -) - - -_RUNQUERYREQUEST = _descriptor.Descriptor( - name='RunQueryRequest', - full_name='api.services.datastore.RunQueryRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='read_options', full_name='api.services.datastore.RunQueryRequest.read_options', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='partition_id', full_name='api.services.datastore.RunQueryRequest.partition_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='query', full_name='api.services.datastore.RunQueryRequest.query', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='gql_query', full_name='api.services.datastore.RunQueryRequest.gql_query', index=3, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=3908, - serialized_end=4142, -) - - -_RUNQUERYRESPONSE = _descriptor.Descriptor( - name='RunQueryResponse', - full_name='api.services.datastore.RunQueryResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='batch', full_name='api.services.datastore.RunQueryResponse.batch', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4144, - serialized_end=4219, -) - - -_BEGINTRANSACTIONREQUEST = _descriptor.Descriptor( - name='BeginTransactionRequest', - full_name='api.services.datastore.BeginTransactionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='isolation_level', full_name='api.services.datastore.BeginTransactionRequest.isolation_level', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _BEGINTRANSACTIONREQUEST_ISOLATIONLEVEL, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4222, - serialized_end=4396, -) - - -_BEGINTRANSACTIONRESPONSE = _descriptor.Descriptor( - name='BeginTransactionResponse', - full_name='api.services.datastore.BeginTransactionResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='transaction', full_name='api.services.datastore.BeginTransactionResponse.transaction', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4398, - serialized_end=4445, -) - - -_ROLLBACKREQUEST = _descriptor.Descriptor( - name='RollbackRequest', - full_name='api.services.datastore.RollbackRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='transaction', full_name='api.services.datastore.RollbackRequest.transaction', index=0, - number=1, type=12, cpp_type=9, label=2, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4447, - serialized_end=4485, -) - - -_ROLLBACKRESPONSE = _descriptor.Descriptor( - name='RollbackResponse', - full_name='api.services.datastore.RollbackResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4487, - serialized_end=4505, -) - - -_COMMITREQUEST = _descriptor.Descriptor( - name='CommitRequest', - full_name='api.services.datastore.CommitRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='transaction', full_name='api.services.datastore.CommitRequest.transaction', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='mutation', full_name='api.services.datastore.CommitRequest.mutation', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='mode', full_name='api.services.datastore.CommitRequest.mode', index=2, - number=5, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _COMMITREQUEST_MODE, - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4508, - serialized_end=4719, -) - - -_COMMITRESPONSE = _descriptor.Descriptor( - name='CommitResponse', - full_name='api.services.datastore.CommitResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='mutation_result', full_name='api.services.datastore.CommitResponse.mutation_result', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4721, - serialized_end=4802, -) - - -_ALLOCATEIDSREQUEST = _descriptor.Descriptor( - name='AllocateIdsRequest', - full_name='api.services.datastore.AllocateIdsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='api.services.datastore.AllocateIdsRequest.key', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4804, - serialized_end=4866, -) - - -_ALLOCATEIDSRESPONSE = _descriptor.Descriptor( - name='AllocateIdsResponse', - full_name='api.services.datastore.AllocateIdsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='api.services.datastore.AllocateIdsResponse.key', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - extension_ranges=[], - oneofs=[ - ], - serialized_start=4868, - serialized_end=4931, -) - -_KEY_PATHELEMENT.containing_type = _KEY -_KEY.fields_by_name['partition_id'].message_type = _PARTITIONID -_KEY.fields_by_name['path_element'].message_type = _KEY_PATHELEMENT -_VALUE.fields_by_name['key_value'].message_type = _KEY -_VALUE.fields_by_name['entity_value'].message_type = _ENTITY -_VALUE.fields_by_name['list_value'].message_type = _VALUE -_PROPERTY.fields_by_name['value'].message_type = _VALUE -_ENTITY.fields_by_name['key'].message_type = _KEY -_ENTITY.fields_by_name['property'].message_type = _PROPERTY -_ENTITYRESULT.fields_by_name['entity'].message_type = _ENTITY -_ENTITYRESULT_RESULTTYPE.containing_type = _ENTITYRESULT -_QUERY.fields_by_name['projection'].message_type = _PROPERTYEXPRESSION -_QUERY.fields_by_name['kind'].message_type = _KINDEXPRESSION -_QUERY.fields_by_name['filter'].message_type = _FILTER -_QUERY.fields_by_name['order'].message_type = _PROPERTYORDER -_QUERY.fields_by_name['group_by'].message_type = _PROPERTYREFERENCE -_PROPERTYEXPRESSION.fields_by_name['property'].message_type = _PROPERTYREFERENCE -_PROPERTYEXPRESSION.fields_by_name['aggregation_function'].enum_type = _PROPERTYEXPRESSION_AGGREGATIONFUNCTION -_PROPERTYEXPRESSION_AGGREGATIONFUNCTION.containing_type = _PROPERTYEXPRESSION -_PROPERTYORDER.fields_by_name['property'].message_type = _PROPERTYREFERENCE -_PROPERTYORDER.fields_by_name['direction'].enum_type = _PROPERTYORDER_DIRECTION -_PROPERTYORDER_DIRECTION.containing_type = _PROPERTYORDER -_FILTER.fields_by_name['composite_filter'].message_type = _COMPOSITEFILTER -_FILTER.fields_by_name['property_filter'].message_type = _PROPERTYFILTER -_COMPOSITEFILTER.fields_by_name['operator'].enum_type = _COMPOSITEFILTER_OPERATOR -_COMPOSITEFILTER.fields_by_name['filter'].message_type = _FILTER -_COMPOSITEFILTER_OPERATOR.containing_type = _COMPOSITEFILTER -_PROPERTYFILTER.fields_by_name['property'].message_type = _PROPERTYREFERENCE -_PROPERTYFILTER.fields_by_name['operator'].enum_type = _PROPERTYFILTER_OPERATOR -_PROPERTYFILTER.fields_by_name['value'].message_type = _VALUE -_PROPERTYFILTER_OPERATOR.containing_type = _PROPERTYFILTER -_GQLQUERY.fields_by_name['name_arg'].message_type = _GQLQUERYARG -_GQLQUERY.fields_by_name['number_arg'].message_type = _GQLQUERYARG -_GQLQUERYARG.fields_by_name['value'].message_type = _VALUE -_QUERYRESULTBATCH.fields_by_name['entity_result_type'].enum_type = _ENTITYRESULT_RESULTTYPE -_QUERYRESULTBATCH.fields_by_name['entity_result'].message_type = _ENTITYRESULT -_QUERYRESULTBATCH.fields_by_name['more_results'].enum_type = _QUERYRESULTBATCH_MORERESULTSTYPE -_QUERYRESULTBATCH_MORERESULTSTYPE.containing_type = _QUERYRESULTBATCH -_MUTATION.fields_by_name['upsert'].message_type = _ENTITY -_MUTATION.fields_by_name['update'].message_type = _ENTITY -_MUTATION.fields_by_name['insert'].message_type = _ENTITY -_MUTATION.fields_by_name['insert_auto_id'].message_type = _ENTITY -_MUTATION.fields_by_name['delete'].message_type = _KEY -_MUTATIONRESULT.fields_by_name['insert_auto_id_key'].message_type = _KEY -_READOPTIONS.fields_by_name['read_consistency'].enum_type = _READOPTIONS_READCONSISTENCY -_READOPTIONS_READCONSISTENCY.containing_type = _READOPTIONS -_LOOKUPREQUEST.fields_by_name['read_options'].message_type = _READOPTIONS -_LOOKUPREQUEST.fields_by_name['key'].message_type = _KEY -_LOOKUPRESPONSE.fields_by_name['found'].message_type = _ENTITYRESULT -_LOOKUPRESPONSE.fields_by_name['missing'].message_type = _ENTITYRESULT -_LOOKUPRESPONSE.fields_by_name['deferred'].message_type = _KEY -_RUNQUERYREQUEST.fields_by_name['read_options'].message_type = _READOPTIONS -_RUNQUERYREQUEST.fields_by_name['partition_id'].message_type = _PARTITIONID -_RUNQUERYREQUEST.fields_by_name['query'].message_type = _QUERY -_RUNQUERYREQUEST.fields_by_name['gql_query'].message_type = _GQLQUERY -_RUNQUERYRESPONSE.fields_by_name['batch'].message_type = _QUERYRESULTBATCH -_BEGINTRANSACTIONREQUEST.fields_by_name['isolation_level'].enum_type = _BEGINTRANSACTIONREQUEST_ISOLATIONLEVEL -_BEGINTRANSACTIONREQUEST_ISOLATIONLEVEL.containing_type = _BEGINTRANSACTIONREQUEST -_COMMITREQUEST.fields_by_name['mutation'].message_type = _MUTATION -_COMMITREQUEST.fields_by_name['mode'].enum_type = _COMMITREQUEST_MODE -_COMMITREQUEST_MODE.containing_type = _COMMITREQUEST -_COMMITRESPONSE.fields_by_name['mutation_result'].message_type = _MUTATIONRESULT -_ALLOCATEIDSREQUEST.fields_by_name['key'].message_type = _KEY -_ALLOCATEIDSRESPONSE.fields_by_name['key'].message_type = _KEY -DESCRIPTOR.message_types_by_name['PartitionId'] = _PARTITIONID -DESCRIPTOR.message_types_by_name['Key'] = _KEY -DESCRIPTOR.message_types_by_name['Value'] = _VALUE -DESCRIPTOR.message_types_by_name['Property'] = _PROPERTY -DESCRIPTOR.message_types_by_name['Entity'] = _ENTITY -DESCRIPTOR.message_types_by_name['EntityResult'] = _ENTITYRESULT -DESCRIPTOR.message_types_by_name['Query'] = _QUERY -DESCRIPTOR.message_types_by_name['KindExpression'] = _KINDEXPRESSION -DESCRIPTOR.message_types_by_name['PropertyReference'] = _PROPERTYREFERENCE -DESCRIPTOR.message_types_by_name['PropertyExpression'] = _PROPERTYEXPRESSION -DESCRIPTOR.message_types_by_name['PropertyOrder'] = _PROPERTYORDER -DESCRIPTOR.message_types_by_name['Filter'] = _FILTER -DESCRIPTOR.message_types_by_name['CompositeFilter'] = _COMPOSITEFILTER -DESCRIPTOR.message_types_by_name['PropertyFilter'] = _PROPERTYFILTER -DESCRIPTOR.message_types_by_name['GqlQuery'] = _GQLQUERY -DESCRIPTOR.message_types_by_name['GqlQueryArg'] = _GQLQUERYARG -DESCRIPTOR.message_types_by_name['QueryResultBatch'] = _QUERYRESULTBATCH -DESCRIPTOR.message_types_by_name['Mutation'] = _MUTATION -DESCRIPTOR.message_types_by_name['MutationResult'] = _MUTATIONRESULT -DESCRIPTOR.message_types_by_name['ReadOptions'] = _READOPTIONS -DESCRIPTOR.message_types_by_name['LookupRequest'] = _LOOKUPREQUEST -DESCRIPTOR.message_types_by_name['LookupResponse'] = _LOOKUPRESPONSE -DESCRIPTOR.message_types_by_name['RunQueryRequest'] = _RUNQUERYREQUEST -DESCRIPTOR.message_types_by_name['RunQueryResponse'] = _RUNQUERYRESPONSE -DESCRIPTOR.message_types_by_name['BeginTransactionRequest'] = _BEGINTRANSACTIONREQUEST -DESCRIPTOR.message_types_by_name['BeginTransactionResponse'] = _BEGINTRANSACTIONRESPONSE -DESCRIPTOR.message_types_by_name['RollbackRequest'] = _ROLLBACKREQUEST -DESCRIPTOR.message_types_by_name['RollbackResponse'] = _ROLLBACKRESPONSE -DESCRIPTOR.message_types_by_name['CommitRequest'] = _COMMITREQUEST -DESCRIPTOR.message_types_by_name['CommitResponse'] = _COMMITRESPONSE -DESCRIPTOR.message_types_by_name['AllocateIdsRequest'] = _ALLOCATEIDSREQUEST -DESCRIPTOR.message_types_by_name['AllocateIdsResponse'] = _ALLOCATEIDSRESPONSE - -PartitionId = _reflection.GeneratedProtocolMessageType('PartitionId', (_message.Message,), dict( - DESCRIPTOR = _PARTITIONID, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.PartitionId) - )) -_sym_db.RegisterMessage(PartitionId) - -Key = _reflection.GeneratedProtocolMessageType('Key', (_message.Message,), dict( - - PathElement = _reflection.GeneratedProtocolMessageType('PathElement', (_message.Message,), dict( - DESCRIPTOR = _KEY_PATHELEMENT, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Key.PathElement) - )) - , - DESCRIPTOR = _KEY, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Key) - )) -_sym_db.RegisterMessage(Key) -_sym_db.RegisterMessage(Key.PathElement) - -Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), dict( - DESCRIPTOR = _VALUE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Value) - )) -_sym_db.RegisterMessage(Value) - -Property = _reflection.GeneratedProtocolMessageType('Property', (_message.Message,), dict( - DESCRIPTOR = _PROPERTY, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Property) - )) -_sym_db.RegisterMessage(Property) - -Entity = _reflection.GeneratedProtocolMessageType('Entity', (_message.Message,), dict( - DESCRIPTOR = _ENTITY, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Entity) - )) -_sym_db.RegisterMessage(Entity) - -EntityResult = _reflection.GeneratedProtocolMessageType('EntityResult', (_message.Message,), dict( - DESCRIPTOR = _ENTITYRESULT, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.EntityResult) - )) -_sym_db.RegisterMessage(EntityResult) - -Query = _reflection.GeneratedProtocolMessageType('Query', (_message.Message,), dict( - DESCRIPTOR = _QUERY, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Query) - )) -_sym_db.RegisterMessage(Query) - -KindExpression = _reflection.GeneratedProtocolMessageType('KindExpression', (_message.Message,), dict( - DESCRIPTOR = _KINDEXPRESSION, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.KindExpression) - )) -_sym_db.RegisterMessage(KindExpression) - -PropertyReference = _reflection.GeneratedProtocolMessageType('PropertyReference', (_message.Message,), dict( - DESCRIPTOR = _PROPERTYREFERENCE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.PropertyReference) - )) -_sym_db.RegisterMessage(PropertyReference) - -PropertyExpression = _reflection.GeneratedProtocolMessageType('PropertyExpression', (_message.Message,), dict( - DESCRIPTOR = _PROPERTYEXPRESSION, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.PropertyExpression) - )) -_sym_db.RegisterMessage(PropertyExpression) - -PropertyOrder = _reflection.GeneratedProtocolMessageType('PropertyOrder', (_message.Message,), dict( - DESCRIPTOR = _PROPERTYORDER, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.PropertyOrder) - )) -_sym_db.RegisterMessage(PropertyOrder) - -Filter = _reflection.GeneratedProtocolMessageType('Filter', (_message.Message,), dict( - DESCRIPTOR = _FILTER, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Filter) - )) -_sym_db.RegisterMessage(Filter) - -CompositeFilter = _reflection.GeneratedProtocolMessageType('CompositeFilter', (_message.Message,), dict( - DESCRIPTOR = _COMPOSITEFILTER, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.CompositeFilter) - )) -_sym_db.RegisterMessage(CompositeFilter) - -PropertyFilter = _reflection.GeneratedProtocolMessageType('PropertyFilter', (_message.Message,), dict( - DESCRIPTOR = _PROPERTYFILTER, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.PropertyFilter) - )) -_sym_db.RegisterMessage(PropertyFilter) - -GqlQuery = _reflection.GeneratedProtocolMessageType('GqlQuery', (_message.Message,), dict( - DESCRIPTOR = _GQLQUERY, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.GqlQuery) - )) -_sym_db.RegisterMessage(GqlQuery) - -GqlQueryArg = _reflection.GeneratedProtocolMessageType('GqlQueryArg', (_message.Message,), dict( - DESCRIPTOR = _GQLQUERYARG, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.GqlQueryArg) - )) -_sym_db.RegisterMessage(GqlQueryArg) - -QueryResultBatch = _reflection.GeneratedProtocolMessageType('QueryResultBatch', (_message.Message,), dict( - DESCRIPTOR = _QUERYRESULTBATCH, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.QueryResultBatch) - )) -_sym_db.RegisterMessage(QueryResultBatch) - -Mutation = _reflection.GeneratedProtocolMessageType('Mutation', (_message.Message,), dict( - DESCRIPTOR = _MUTATION, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.Mutation) - )) -_sym_db.RegisterMessage(Mutation) - -MutationResult = _reflection.GeneratedProtocolMessageType('MutationResult', (_message.Message,), dict( - DESCRIPTOR = _MUTATIONRESULT, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.MutationResult) - )) -_sym_db.RegisterMessage(MutationResult) - -ReadOptions = _reflection.GeneratedProtocolMessageType('ReadOptions', (_message.Message,), dict( - DESCRIPTOR = _READOPTIONS, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.ReadOptions) - )) -_sym_db.RegisterMessage(ReadOptions) - -LookupRequest = _reflection.GeneratedProtocolMessageType('LookupRequest', (_message.Message,), dict( - DESCRIPTOR = _LOOKUPREQUEST, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.LookupRequest) - )) -_sym_db.RegisterMessage(LookupRequest) - -LookupResponse = _reflection.GeneratedProtocolMessageType('LookupResponse', (_message.Message,), dict( - DESCRIPTOR = _LOOKUPRESPONSE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.LookupResponse) - )) -_sym_db.RegisterMessage(LookupResponse) - -RunQueryRequest = _reflection.GeneratedProtocolMessageType('RunQueryRequest', (_message.Message,), dict( - DESCRIPTOR = _RUNQUERYREQUEST, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.RunQueryRequest) - )) -_sym_db.RegisterMessage(RunQueryRequest) - -RunQueryResponse = _reflection.GeneratedProtocolMessageType('RunQueryResponse', (_message.Message,), dict( - DESCRIPTOR = _RUNQUERYRESPONSE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.RunQueryResponse) - )) -_sym_db.RegisterMessage(RunQueryResponse) - -BeginTransactionRequest = _reflection.GeneratedProtocolMessageType('BeginTransactionRequest', (_message.Message,), dict( - DESCRIPTOR = _BEGINTRANSACTIONREQUEST, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.BeginTransactionRequest) - )) -_sym_db.RegisterMessage(BeginTransactionRequest) - -BeginTransactionResponse = _reflection.GeneratedProtocolMessageType('BeginTransactionResponse', (_message.Message,), dict( - DESCRIPTOR = _BEGINTRANSACTIONRESPONSE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.BeginTransactionResponse) - )) -_sym_db.RegisterMessage(BeginTransactionResponse) - -RollbackRequest = _reflection.GeneratedProtocolMessageType('RollbackRequest', (_message.Message,), dict( - DESCRIPTOR = _ROLLBACKREQUEST, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.RollbackRequest) - )) -_sym_db.RegisterMessage(RollbackRequest) - -RollbackResponse = _reflection.GeneratedProtocolMessageType('RollbackResponse', (_message.Message,), dict( - DESCRIPTOR = _ROLLBACKRESPONSE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.RollbackResponse) - )) -_sym_db.RegisterMessage(RollbackResponse) - -CommitRequest = _reflection.GeneratedProtocolMessageType('CommitRequest', (_message.Message,), dict( - DESCRIPTOR = _COMMITREQUEST, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.CommitRequest) - )) -_sym_db.RegisterMessage(CommitRequest) - -CommitResponse = _reflection.GeneratedProtocolMessageType('CommitResponse', (_message.Message,), dict( - DESCRIPTOR = _COMMITRESPONSE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.CommitResponse) - )) -_sym_db.RegisterMessage(CommitResponse) - -AllocateIdsRequest = _reflection.GeneratedProtocolMessageType('AllocateIdsRequest', (_message.Message,), dict( - DESCRIPTOR = _ALLOCATEIDSREQUEST, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.AllocateIdsRequest) - )) -_sym_db.RegisterMessage(AllocateIdsRequest) - -AllocateIdsResponse = _reflection.GeneratedProtocolMessageType('AllocateIdsResponse', (_message.Message,), dict( - DESCRIPTOR = _ALLOCATEIDSRESPONSE, - __module__ = '_datastore_v1_pb2' - # @@protoc_insertion_point(class_scope:api.services.datastore.AllocateIdsResponse) - )) -_sym_db.RegisterMessage(AllocateIdsResponse) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n!com.google.api.services.datastore')) -# @@protoc_insertion_point(module_scope) diff --git a/gcloud/datastore/_generated/_datastore.proto b/gcloud/datastore/_generated/_datastore.proto new file mode 100644 index 000000000000..6f6aedb39d8b --- /dev/null +++ b/gcloud/datastore/_generated/_datastore.proto @@ -0,0 +1,289 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.datastore.v1beta3; + +import "google/api/annotations.proto"; +import "google/datastore/v1beta3/entity.proto"; +import "google/datastore/v1beta3/query.proto"; + +option java_multiple_files = true; +option java_outer_classname = "DatastoreProto"; +option java_package = "com.google.datastore.v1beta3"; + + +// Each RPC normalizes the partition IDs of the keys in its input entities, +// and always returns entities with keys with normalized partition IDs. +// This applies to all keys and entities, including those in values, except keys +// with both an empty path and an empty or unset partition ID. Normalization of +// input keys sets the project ID (if not already set) to the project ID from +// the request. +// +service Datastore { + // Look up entities by key. + rpc Lookup(LookupRequest) returns (LookupResponse) { + option (google.api.http) = { post: "/v1beta3/projects/{project_id}:lookup" body: "*" }; + } + + // Query for entities. + rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) { + option (google.api.http) = { post: "/v1beta3/projects/{project_id}:runQuery" body: "*" }; + } + + // Begin a new transaction. + rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { + option (google.api.http) = { post: "/v1beta3/projects/{project_id}:beginTransaction" body: "*" }; + } + + // Commit a transaction, optionally creating, deleting or modifying some + // entities. + rpc Commit(CommitRequest) returns (CommitResponse) { + option (google.api.http) = { post: "/v1beta3/projects/{project_id}:commit" body: "*" }; + } + + // Roll back a transaction. + rpc Rollback(RollbackRequest) returns (RollbackResponse) { + option (google.api.http) = { post: "/v1beta3/projects/{project_id}:rollback" body: "*" }; + } + + // Allocate IDs for the given keys (useful for referencing an entity before + // it is inserted). + rpc AllocateIds(AllocateIdsRequest) returns (AllocateIdsResponse) { + option (google.api.http) = { post: "/v1beta3/projects/{project_id}:allocateIds" body: "*" }; + } +} + +// The request for [google.datastore.v1beta3.Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup]. +message LookupRequest { + // Project ID against which to make the request. + string project_id = 8; + + // Options for this lookup request. + ReadOptions read_options = 1; + + // Keys of entities to look up. + repeated Key keys = 3; +} + +// The response for [google.datastore.v1beta3.Datastore.Lookup][google.datastore.v1beta3.Datastore.Lookup]. +message LookupResponse { + // Entities found as `ResultType.FULL` entities. The order of results in this + // field is undefined and has no relation to the order of the keys in the + // input. + repeated EntityResult found = 1; + + // Entities not found as `ResultType.KEY_ONLY` entities. The order of results + // in this field is undefined and has no relation to the order of the keys + // in the input. + repeated EntityResult missing = 2; + + // A list of keys that were not looked up due to resource constraints. The + // order of results in this field is undefined and has no relation to the + // order of the keys in the input. + repeated Key deferred = 3; +} + +// The request for [google.datastore.v1beta3.Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery]. +message RunQueryRequest { + // Project ID against which to make the request. + string project_id = 8; + + // Entities are partitioned into subsets, identified by a partition ID. + // Queries are scoped to a single partition. + // This partition ID is normalized with the standard default context + // partition ID. + PartitionId partition_id = 2; + + // The options for this query. + ReadOptions read_options = 1; + + // The type of query. + oneof query_type { + // The query to run. + Query query = 3; + + // The GQL query to run. + GqlQuery gql_query = 7; + } +} + +// The response for [google.datastore.v1beta3.Datastore.RunQuery][google.datastore.v1beta3.Datastore.RunQuery]. +message RunQueryResponse { + // A batch of query results (always present). + QueryResultBatch batch = 1; + + // The parsed form of the `GqlQuery` from the request, if it was set. + Query query = 2; +} + +// The request for [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. +message BeginTransactionRequest { + // Project ID against which to make the request. + string project_id = 8; +} + +// The response for [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. +message BeginTransactionResponse { + // The transaction identifier (always present). + bytes transaction = 1; +} + +// The request for [google.datastore.v1beta3.Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback]. +message RollbackRequest { + // Project ID against which to make the request. + string project_id = 8; + + // The transaction identifier, returned by a call to + // [google.datastore.v1beta3.Datastore.BeginTransaction][google.datastore.v1beta3.Datastore.BeginTransaction]. + bytes transaction = 1; +} + +// The response for [google.datastore.v1beta3.Datastore.Rollback][google.datastore.v1beta3.Datastore.Rollback] +// (an empty message). +message RollbackResponse { + +} + +// The request for [google.datastore.v1beta3.Datastore.Commit][google.datastore.v1beta3.Datastore.Commit]. +message CommitRequest { + // Commit modes. + enum Mode { + // Unspecified. + MODE_UNSPECIFIED = 0; + + // Transactional. + TRANSACTIONAL = 1; + + // Non-transactional. + NON_TRANSACTIONAL = 2; + } + + // Project ID against which to make the request. + string project_id = 8; + + // The type of commit to perform. Defaults to `TRANSACTIONAL`. + Mode mode = 5; + + // Must be set when mode is `TRANSACTIONAL`. + oneof transaction_selector { + // The transaction in which to write. + bytes transaction = 1; + } + + // The mutations to perform. + // + // When mode is `TRANSACTIONAL`, mutations affecting a single entity are + // applied in order. The following sequences of mutations affecting a single + // entity are not permitted in a single `Commit` request: + // - `insert` followed by `insert` + // - `update` followed by `insert` + // - `upsert` followed by `insert` + // - `delete` followed by `update` + // + // When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single + // entity. + repeated Mutation mutations = 6; +} + +// The response for [google.datastore.v1beta3.Datastore.Commit][google.datastore.v1beta3.Datastore.Commit]. +message CommitResponse { + // The result of performing the mutations. + // The i-th mutation result corresponds to the i-th mutation in the request. + repeated MutationResult mutation_results = 3; + + // The number of index entries updated during the commit. + int32 index_updates = 4; +} + +// The request for [google.datastore.v1beta3.Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds]. +message AllocateIdsRequest { + // Project ID against which to make the request. + string project_id = 8; + + // A list of keys with incomplete key paths for which to allocate IDs. + // No key may be reserved/read-only. + repeated Key keys = 1; +} + +// The response for [google.datastore.v1beta3.Datastore.AllocateIds][google.datastore.v1beta3.Datastore.AllocateIds]. +message AllocateIdsResponse { + // The keys specified in the request (in the same order), each with + // its key path completed with a newly allocated ID. + repeated Key keys = 1; +} + +// A mutation to apply to an entity. +message Mutation { + // The mutation operation. + // + // For `insert`, `update`, and `upsert`: + // - The entity's key must not be reserved/read-only. + // - No property in the entity may have a reserved name, + // not even a property in an entity in a value. + // - No value in the entity may have meaning 18, + // not even a value in an entity in another value. + oneof operation { + // The entity to insert. The entity must not already exist. + // The entity's key's final path element may be incomplete. + Entity insert = 4; + + // The entity to update. The entity must already exist. + // Must have a complete key path. + Entity update = 5; + + // The entity to upsert. The entity may or may not already exist. + // The entity's key's final path element may be incomplete. + Entity upsert = 6; + + // The key of the entity to delete. The entity may or may not already exist. + // Must have a complete key path and must not be reserved/read-only. + Key delete = 7; + } +} + +// The result of applying a mutation. +message MutationResult { + // The automatically allocated key. + // Set only when the mutation allocated a key. + Key key = 3; +} + +// Options shared by read requests. +message ReadOptions { + // Read consistencies. + enum ReadConsistency { + // Unspecified. + READ_CONSISTENCY_UNSPECIFIED = 0; + + // Strong consistency. + STRONG = 1; + + // Eventual consistency. + EVENTUAL = 2; + } + + // If not specified, lookups and ancestor queries default to + // `read_consistency`=`STRONG`, global queries default to + // `read_consistency`=`EVENTUAL`. + oneof consistency_type { + // The non-transactional read consistency to use. + // Cannot be set to `STRONG` for global queries. + ReadConsistency read_consistency = 1; + + // The transaction in which to read. + bytes transaction = 2; + } +} diff --git a/gcloud/datastore/_generated/_entity.proto b/gcloud/datastore/_generated/_entity.proto new file mode 100644 index 000000000000..12423eb419f6 --- /dev/null +++ b/gcloud/datastore/_generated/_entity.proto @@ -0,0 +1,196 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.datastore.v1beta3; + +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/latlng.proto"; + +option java_multiple_files = true; +option java_outer_classname = "EntityProto"; +option java_package = "com.google.datastore.v1beta3"; + + +// A partition ID identifies a grouping of entities. The grouping is always +// by project and namespace, however the namespace ID may be empty. +// +// A partition ID contains several dimensions: +// project ID and namespace ID. +// Partition dimensions: +// - A dimension may be `""`. +// - A dimension must be valid UTF-8 bytes. +// - A dimension's value must match regex `[A-Za-z\d\.\-_]{1,100}` +// If the value of any dimension matches regex `__.*__`, the partition is +// reserved/read-only. +// A reserved/read-only partition ID is forbidden in certain documented +// contexts. +// +// Foreign partition IDs (in which the project ID does +// not match the context project ID ) are discouraged. +// Reads and writes of foreign partition IDs may fail if the project is not in an active state. +message PartitionId { + // Project ID. + string project_id = 2; + + // Namespace ID. + string namespace_id = 4; +} + +// A unique identifier for an entity. +// If a key's partition id or any of its path kinds or names are +// reserved/read-only, the key is reserved/read-only. +// A reserved/read-only key is forbidden in certain documented contexts. +message Key { + // A (kind, ID/name) pair used to construct a key path. + // + // If either name nor ID is set, the element is complete. + // If neither is set, the element is incomplete. + message PathElement { + // The kind of the entity. + // A kind matching regex `__.*__` is reserved/read-only. + // A kind must not contain more than 1500 bytes when UTF-8 encoded. + // Cannot be `""`. + string kind = 1; + + // The type of id. + oneof id_type { + // The auto allocated ID of the entity. + // Never equal to zero. Values less than zero are discouraged and may not + // be supported in the future. + int64 id = 2; + + // The name of the entity. + // A name matching regex `__.*__` is reserved/read-only. + // A name must not be more than 1500 bytes when UTF-8 encoded. + // Cannot be `""`. + string name = 3; + } + } + + // Entities are partitioned into subsets, currently identified by a dataset + // (usually implicitly specified by the project) and namespace ID. + // Queries are scoped to a single partition. + PartitionId partition_id = 1; + + // The entity path. + // An entity path consists of one or more elements composed of a kind and a + // string or numerical identifier, which identify entities. The first + // element identifies a _root entity_, the second element identifies + // a _child_ of the root entity, the third element a child of the + // second entity, and so forth. The entities identified by all prefixes of + // the path are called the element's _ancestors_. + // An entity path is always fully complete: *all* of the entity's ancestors + // are required to be in the path along with the entity identifier itself. + // The only exception is that in some documented cases, the identifier in the + // last path element (for the entity) itself may be omitted. A path can never + // be empty. The path can have at most 100 elements. + repeated PathElement path = 2; +} + +// An array value. +message ArrayValue { + // Values in the array. + // The order of this array may not be preserved if it contains a mix of + // indexed and unindexed values. + repeated Value values = 1; +} + +// A message that can hold any of the supported value types and associated +// metadata. +message Value { + // Must have a value set. + oneof value_type { + // A null value. + google.protobuf.NullValue null_value = 11; + + // A boolean value. + bool boolean_value = 1; + + // An integer value. + int64 integer_value = 2; + + // A double value. + double double_value = 3; + + // A timestamp value. + // When stored in the Datastore, precise only to microseconds; + // any additional precision is rounded down. + google.protobuf.Timestamp timestamp_value = 10; + + // A key value. + Key key_value = 5; + + // A UTF-8 encoded string value. + // When `exclude_from_indexes` is false (it is indexed) and meaning is not + // 2, may have at most 1500 bytes. + // When meaning is 2, may have at most 2083 bytes. + // Otherwise, may be set to at least 1,000,000 bytes + string string_value = 17; + + // A blob value. + // May have at most 1,000,000 bytes. + // When `exclude_from_indexes` is false, may have at most 1500 bytes. + // In JSON requests, must be base64-encoded. + bytes blob_value = 18; + + // A geo point value representing a point on the surface of Earth. + google.type.LatLng geo_point_value = 8; + + // An entity value. + // May have no key. + // May have a key with an incomplete key path. + // May have a reserved/read-only key. + Entity entity_value = 6; + + // An array value. + // Cannot contain another array value. + // A `Value` instance that sets field `array_value` must not set fields + // `meaning` or `exclude_from_indexes`. + ArrayValue array_value = 9; + } + + // The `meaning` field should only be populated for backwards compatibility. + int32 meaning = 14; + + // If the value should be excluded from all indexes including those defined + // explicitly. + bool exclude_from_indexes = 19; +} + +// An entity. +// +// An entity is limited to 1 megabyte when stored. That _roughly_ +// corresponds to a limit of 1 megabyte for the serialized form of this +// message. +message Entity { + // The entity's key. + // + // An entity must have a key, unless otherwise documented (for example, + // an entity in `Value.entity_value` may have no key). + // An entity's kind is its key's path's last element's kind, + // or null if it has no key. + Key key = 1; + + // The entity's properties. + // The map's keys are property names. + // A property name matching regex `__.*__` is reserved. + // A reserved property name is forbidden in certain documented contexts. + // The name must not contain more than 500 characters. + // The name cannot be `""`. + map properties = 3; +} diff --git a/gcloud/datastore/_generated/_query.proto b/gcloud/datastore/_generated/_query.proto new file mode 100644 index 000000000000..80cbb2045ebc --- /dev/null +++ b/gcloud/datastore/_generated/_query.proto @@ -0,0 +1,281 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.datastore.v1beta3; + +import "google/api/annotations.proto"; +import "google/datastore/v1beta3/entity.proto"; +import "google/protobuf/wrappers.proto"; + +option java_multiple_files = true; +option java_outer_classname = "QueryProto"; +option java_package = "com.google.datastore.v1beta3"; + + +// The result of fetching an entity from the datastore. +message EntityResult { + // Specifies what data the 'entity' field contains. + // A `ResultType` is either implied (for example, in `LookupResponse.found` + // from `datastore.proto`, it is always `FULL`) or specified by context (for + // example, in message `QueryResultBatch`, field `entity_result_type` + // specifies a `ResultType` for all the values in field `entity_results`). + enum ResultType { + // Unspecified. + RESULT_TYPE_UNSPECIFIED = 0; + + // The entire entity. + FULL = 1; + + // A projected subset of properties. The entity may have no key. A property + // value may have meaning 18. + PROJECTION = 2; + + // Only the key. + KEY_ONLY = 3; + } + + // The resulting entity. + Entity entity = 1; + + // A cursor that points to the position after the result entity. + // Set only when the `EntityResult` is part of a `QueryResultBatch` message. + bytes cursor = 3; +} + +// A query. +message Query { + // The projection to return. Defaults to returning all properties. + repeated Projection projection = 2; + + // The kinds to query (if empty, returns entities of all kinds). + // Currently at most 1 kind may be specified. + repeated KindExpression kind = 3; + + // The filter to apply. + Filter filter = 4; + + // The order to apply to the query results (if empty, order is unspecified). + repeated PropertyOrder order = 5; + + // The properties to make distinct. The query results will contain the first + // result for each distinct combination of values for the given properties + // (if empty, all results are returned). + repeated PropertyReference distinct_on = 6; + + // A starting point for the query results. Query cursors are + // returned in query result batches. + bytes start_cursor = 7; + + // An ending point for the query results. Query cursors are + // returned in query result batches. + bytes end_cursor = 8; + + // The number of results to skip. Applies before limit, but after all other + // constraints. + // Must be >= 0. + int32 offset = 10; + + // The maximum number of results to return. Applies after all other + // constraints. + // Unspecified is interpreted as no limit. + // Must be >= 0. + google.protobuf.Int32Value limit = 12; +} + +// A representation of a kind. +message KindExpression { + // The name of the kind. + string name = 1; +} + +// A reference to a property relative to the kind expressions. +message PropertyReference { + // The name of the property. + string name = 2; +} + +// A representation of a property in a projection. +message Projection { + // The property to project. + PropertyReference property = 1; +} + +// The desired order for a specific property. +message PropertyOrder { + // Direction. + enum Direction { + // Unspecified. + DIRECTION_UNSPECIFIED = 0; + + // Ascending. + ASCENDING = 1; + + // Descending. + DESCENDING = 2; + } + + // The property to order by. + PropertyReference property = 1; + + // The direction to order by. Defaults to `ASCENDING`. + Direction direction = 2; +} + +// A holder for any type of filter. +message Filter { + // The type of filter. + oneof filter_type { + // A composite filter. + CompositeFilter composite_filter = 1; + + // A filter on a property. + PropertyFilter property_filter = 2; + } +} + +// A filter that merges the multiple other filters using the given operator. +message CompositeFilter { + // Composite filter operator. + enum Operator { + // Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0; + + // And. + AND = 1; + } + + // The operator for combining multiple filters. + Operator op = 1; + + // The list of filters to combine. + // Must contain at least one filter. + repeated Filter filters = 2; +} + +// A filter on a specific property. +message PropertyFilter { + // Property filter operator. + enum Operator { + // Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0; + + // Less than. + LESS_THAN = 1; + + // Less than or equal. + LESS_THAN_OR_EQUAL = 2; + + // Greater than. + GREATER_THAN = 3; + + // Greater than or equal. + GREATER_THAN_OR_EQUAL = 4; + + // Equal. + EQUAL = 5; + + // Has ancestor. + HAS_ANCESTOR = 11; + } + + // The property to filter by. + PropertyReference property = 1; + + // The operator to filter by. + Operator op = 2; + + // The value to compare the property to. + Value value = 3; +} + +// A GQL query. +message GqlQuery { + // A string of the format described + // [here](https://developers.google.com/datastore/docs/concepts/gql). + string query_string = 1; + + // When false, the query string must not contain any literals and instead + // must bind all values. For example, + // `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while + // `SELECT * FROM Kind WHERE a = @value` is. + bool allow_literals = 2; + + // For each non-reserved named binding site in the query string, + // there must be a named parameter with that name, + // but not necessarily the inverse. + // Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex + // `__.*__`, and must not be `""`. + map named_bindings = 5; + + // Numbered binding site @1 references the first numbered parameter, + // effectively using 1-based indexing, rather than the usual 0. + // For each binding site numbered i in `query_string`, + // there must be an i-th numbered parameter. + // The inverse must also be true. + repeated GqlQueryParameter positional_bindings = 4; +} + +// A binding parameter for a GQL query. +message GqlQueryParameter { + // The type of parameter. + oneof parameter_type { + // Value. + Value value = 2; + + // Cursor. + bytes cursor = 3; + } +} + +// A batch of results produced by a query. +message QueryResultBatch { + // The possible values for the `more_results` field. + enum MoreResultsType { + // Unspecified. This value is never used. + MORE_RESULTS_TYPE_UNSPECIFIED = 0; + + // There may be additional batches to fetch from this query. + NOT_FINISHED = 1; + + // The query is finished, but there may be more results after the limit. + MORE_RESULTS_AFTER_LIMIT = 2; + + // The query is finished, but there may be more results after the end cursor. + MORE_RESULTS_AFTER_CURSOR = 4; + + // The query has been exhausted. + NO_MORE_RESULTS = 3; + } + + // The number of results skipped, typically because of an offset. + int32 skipped_results = 6; + + // A cursor that points to the position after the last skipped result. + // Will be set when `skipped_results` != 0. + bytes skipped_cursor = 3; + + // The result type for every entity in `entity_results`. + EntityResult.ResultType entity_result_type = 1; + + // The results for this batch. + repeated EntityResult entity_results = 2; + + // A cursor that points to the position after the last result in the batch. + bytes end_cursor = 4; + + // The state of the query after the current batch. + MoreResultsType more_results = 5; +} diff --git a/gcloud/datastore/_generated/datastore_grpc_pb2.py b/gcloud/datastore/_generated/datastore_grpc_pb2.py new file mode 100644 index 000000000000..5e648344259e --- /dev/null +++ b/gcloud/datastore/_generated/datastore_grpc_pb2.py @@ -0,0 +1,279 @@ +import abc +from grpc.beta import implementations as beta_implementations +from grpc.early_adopter import implementations as early_adopter_implementations +from grpc.framework.alpha import utilities as alpha_utilities +from grpc.framework.common import cardinality +from grpc.framework.interfaces.face import utilities as face_utilities +class EarlyAdopterDatastoreServicer(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def Lookup(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def RunQuery(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def BeginTransaction(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def Commit(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def Rollback(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def AllocateIds(self, request, context): + raise NotImplementedError() +class EarlyAdopterDatastoreServer(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def start(self): + raise NotImplementedError() + @abc.abstractmethod + def stop(self): + raise NotImplementedError() +class EarlyAdopterDatastoreStub(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def Lookup(self, request): + raise NotImplementedError() + Lookup.async = None + @abc.abstractmethod + def RunQuery(self, request): + raise NotImplementedError() + RunQuery.async = None + @abc.abstractmethod + def BeginTransaction(self, request): + raise NotImplementedError() + BeginTransaction.async = None + @abc.abstractmethod + def Commit(self, request): + raise NotImplementedError() + Commit.async = None + @abc.abstractmethod + def Rollback(self, request): + raise NotImplementedError() + Rollback.async = None + @abc.abstractmethod + def AllocateIds(self, request): + raise NotImplementedError() + AllocateIds.async = None +def early_adopter_create_Datastore_server(servicer, port, private_key=None, certificate_chain=None): + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + method_service_descriptions = { + "AllocateIds": alpha_utilities.unary_unary_service_description( + servicer.AllocateIds, + gcloud.datastore._generated.datastore_pb2.AllocateIdsRequest.FromString, + gcloud.datastore._generated.datastore_pb2.AllocateIdsResponse.SerializeToString, + ), + "BeginTransaction": alpha_utilities.unary_unary_service_description( + servicer.BeginTransaction, + gcloud.datastore._generated.datastore_pb2.BeginTransactionRequest.FromString, + gcloud.datastore._generated.datastore_pb2.BeginTransactionResponse.SerializeToString, + ), + "Commit": alpha_utilities.unary_unary_service_description( + servicer.Commit, + gcloud.datastore._generated.datastore_pb2.CommitRequest.FromString, + gcloud.datastore._generated.datastore_pb2.CommitResponse.SerializeToString, + ), + "Lookup": alpha_utilities.unary_unary_service_description( + servicer.Lookup, + gcloud.datastore._generated.datastore_pb2.LookupRequest.FromString, + gcloud.datastore._generated.datastore_pb2.LookupResponse.SerializeToString, + ), + "Rollback": alpha_utilities.unary_unary_service_description( + servicer.Rollback, + gcloud.datastore._generated.datastore_pb2.RollbackRequest.FromString, + gcloud.datastore._generated.datastore_pb2.RollbackResponse.SerializeToString, + ), + "RunQuery": alpha_utilities.unary_unary_service_description( + servicer.RunQuery, + gcloud.datastore._generated.datastore_pb2.RunQueryRequest.FromString, + gcloud.datastore._generated.datastore_pb2.RunQueryResponse.SerializeToString, + ), + } + return early_adopter_implementations.server("google.datastore.v1beta3.Datastore", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain) +def early_adopter_create_Datastore_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None): + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + method_invocation_descriptions = { + "AllocateIds": alpha_utilities.unary_unary_invocation_description( + gcloud.datastore._generated.datastore_pb2.AllocateIdsRequest.SerializeToString, + gcloud.datastore._generated.datastore_pb2.AllocateIdsResponse.FromString, + ), + "BeginTransaction": alpha_utilities.unary_unary_invocation_description( + gcloud.datastore._generated.datastore_pb2.BeginTransactionRequest.SerializeToString, + gcloud.datastore._generated.datastore_pb2.BeginTransactionResponse.FromString, + ), + "Commit": alpha_utilities.unary_unary_invocation_description( + gcloud.datastore._generated.datastore_pb2.CommitRequest.SerializeToString, + gcloud.datastore._generated.datastore_pb2.CommitResponse.FromString, + ), + "Lookup": alpha_utilities.unary_unary_invocation_description( + gcloud.datastore._generated.datastore_pb2.LookupRequest.SerializeToString, + gcloud.datastore._generated.datastore_pb2.LookupResponse.FromString, + ), + "Rollback": alpha_utilities.unary_unary_invocation_description( + gcloud.datastore._generated.datastore_pb2.RollbackRequest.SerializeToString, + gcloud.datastore._generated.datastore_pb2.RollbackResponse.FromString, + ), + "RunQuery": alpha_utilities.unary_unary_invocation_description( + gcloud.datastore._generated.datastore_pb2.RunQueryRequest.SerializeToString, + gcloud.datastore._generated.datastore_pb2.RunQueryResponse.FromString, + ), + } + return early_adopter_implementations.stub("google.datastore.v1beta3.Datastore", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override) + +class BetaDatastoreServicer(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def Lookup(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def RunQuery(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def BeginTransaction(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def Commit(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def Rollback(self, request, context): + raise NotImplementedError() + @abc.abstractmethod + def AllocateIds(self, request, context): + raise NotImplementedError() + +class BetaDatastoreStub(object): + """The interface to which stubs will conform.""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def Lookup(self, request, timeout): + raise NotImplementedError() + Lookup.future = None + @abc.abstractmethod + def RunQuery(self, request, timeout): + raise NotImplementedError() + RunQuery.future = None + @abc.abstractmethod + def BeginTransaction(self, request, timeout): + raise NotImplementedError() + BeginTransaction.future = None + @abc.abstractmethod + def Commit(self, request, timeout): + raise NotImplementedError() + Commit.future = None + @abc.abstractmethod + def Rollback(self, request, timeout): + raise NotImplementedError() + Rollback.future = None + @abc.abstractmethod + def AllocateIds(self, request, timeout): + raise NotImplementedError() + AllocateIds.future = None + +def beta_create_Datastore_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + request_deserializers = { + ('google.datastore.v1beta3.Datastore', 'AllocateIds'): gcloud.datastore._generated.datastore_pb2.AllocateIdsRequest.FromString, + ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): gcloud.datastore._generated.datastore_pb2.BeginTransactionRequest.FromString, + ('google.datastore.v1beta3.Datastore', 'Commit'): gcloud.datastore._generated.datastore_pb2.CommitRequest.FromString, + ('google.datastore.v1beta3.Datastore', 'Lookup'): gcloud.datastore._generated.datastore_pb2.LookupRequest.FromString, + ('google.datastore.v1beta3.Datastore', 'Rollback'): gcloud.datastore._generated.datastore_pb2.RollbackRequest.FromString, + ('google.datastore.v1beta3.Datastore', 'RunQuery'): gcloud.datastore._generated.datastore_pb2.RunQueryRequest.FromString, + } + response_serializers = { + ('google.datastore.v1beta3.Datastore', 'AllocateIds'): gcloud.datastore._generated.datastore_pb2.AllocateIdsResponse.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): gcloud.datastore._generated.datastore_pb2.BeginTransactionResponse.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'Commit'): gcloud.datastore._generated.datastore_pb2.CommitResponse.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'Lookup'): gcloud.datastore._generated.datastore_pb2.LookupResponse.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'Rollback'): gcloud.datastore._generated.datastore_pb2.RollbackResponse.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'RunQuery'): gcloud.datastore._generated.datastore_pb2.RunQueryResponse.SerializeToString, + } + method_implementations = { + ('google.datastore.v1beta3.Datastore', 'AllocateIds'): face_utilities.unary_unary_inline(servicer.AllocateIds), + ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): face_utilities.unary_unary_inline(servicer.BeginTransaction), + ('google.datastore.v1beta3.Datastore', 'Commit'): face_utilities.unary_unary_inline(servicer.Commit), + ('google.datastore.v1beta3.Datastore', 'Lookup'): face_utilities.unary_unary_inline(servicer.Lookup), + ('google.datastore.v1beta3.Datastore', 'Rollback'): face_utilities.unary_unary_inline(servicer.Rollback), + ('google.datastore.v1beta3.Datastore', 'RunQuery'): face_utilities.unary_unary_inline(servicer.RunQuery), + } + server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) + return beta_implementations.server(method_implementations, options=server_options) + +def beta_create_Datastore_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + import gcloud.datastore._generated.datastore_pb2 + request_serializers = { + ('google.datastore.v1beta3.Datastore', 'AllocateIds'): gcloud.datastore._generated.datastore_pb2.AllocateIdsRequest.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): gcloud.datastore._generated.datastore_pb2.BeginTransactionRequest.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'Commit'): gcloud.datastore._generated.datastore_pb2.CommitRequest.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'Lookup'): gcloud.datastore._generated.datastore_pb2.LookupRequest.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'Rollback'): gcloud.datastore._generated.datastore_pb2.RollbackRequest.SerializeToString, + ('google.datastore.v1beta3.Datastore', 'RunQuery'): gcloud.datastore._generated.datastore_pb2.RunQueryRequest.SerializeToString, + } + response_deserializers = { + ('google.datastore.v1beta3.Datastore', 'AllocateIds'): gcloud.datastore._generated.datastore_pb2.AllocateIdsResponse.FromString, + ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): gcloud.datastore._generated.datastore_pb2.BeginTransactionResponse.FromString, + ('google.datastore.v1beta3.Datastore', 'Commit'): gcloud.datastore._generated.datastore_pb2.CommitResponse.FromString, + ('google.datastore.v1beta3.Datastore', 'Lookup'): gcloud.datastore._generated.datastore_pb2.LookupResponse.FromString, + ('google.datastore.v1beta3.Datastore', 'Rollback'): gcloud.datastore._generated.datastore_pb2.RollbackResponse.FromString, + ('google.datastore.v1beta3.Datastore', 'RunQuery'): gcloud.datastore._generated.datastore_pb2.RunQueryResponse.FromString, + } + cardinalities = { + 'AllocateIds': cardinality.Cardinality.UNARY_UNARY, + 'BeginTransaction': cardinality.Cardinality.UNARY_UNARY, + 'Commit': cardinality.Cardinality.UNARY_UNARY, + 'Lookup': cardinality.Cardinality.UNARY_UNARY, + 'Rollback': cardinality.Cardinality.UNARY_UNARY, + 'RunQuery': cardinality.Cardinality.UNARY_UNARY, + } + stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) + return beta_implementations.dynamic_stub(channel, 'google.datastore.v1beta3.Datastore', cardinalities, options=stub_options) diff --git a/gcloud/datastore/_generated/datastore_pb2.py b/gcloud/datastore/_generated/datastore_pb2.py index 398146391c2f..ffba033868c0 100644 --- a/gcloud/datastore/_generated/datastore_pb2.py +++ b/gcloud/datastore/_generated/datastore_pb2.py @@ -1,37 +1,862 @@ -# Copyright 2015 Google Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Datastore shim to emulate v1beta3 module structure. - -This module intended to pair with datastore.proto. -""" - -from gcloud.datastore import _datastore_v1_pb2 - - -LookupRequest = _datastore_v1_pb2.LookupRequest -LookupResponse = _datastore_v1_pb2.LookupResponse -RunQueryRequest = _datastore_v1_pb2.RunQueryRequest -RunQueryResponse = _datastore_v1_pb2.RunQueryResponse -BeginTransactionRequest = _datastore_v1_pb2.BeginTransactionRequest -BeginTransactionResponse = _datastore_v1_pb2.BeginTransactionResponse -RollbackRequest = _datastore_v1_pb2.RollbackRequest -RollbackResponse = _datastore_v1_pb2.RollbackResponse -CommitRequest = _datastore_v1_pb2.CommitRequest -CommitResponse = _datastore_v1_pb2.CommitResponse -AllocateIdsRequest = _datastore_v1_pb2.AllocateIdsRequest -AllocateIdsResponse = _datastore_v1_pb2.AllocateIdsResponse -Mutation = _datastore_v1_pb2.Mutation -MutationResult = _datastore_v1_pb2.MutationResult -ReadOptions = _datastore_v1_pb2.ReadOptions +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/datastore/v1beta3/datastore.proto + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from gcloud.datastore._generated import entity_pb2 as google_dot_datastore_dot_v1beta3_dot_entity__pb2 +from gcloud.datastore._generated import query_pb2 as google_dot_datastore_dot_v1beta3_dot_query__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/datastore/v1beta3/datastore.proto', + package='google.datastore.v1beta3', + syntax='proto3', + serialized_pb=b'\n(google/datastore/v1beta3/datastore.proto\x12\x18google.datastore.v1beta3\x1a\x1cgoogle/api/annotations.proto\x1a%google/datastore/v1beta3/entity.proto\x1a$google/datastore/v1beta3/query.proto\"\x8d\x01\n\rLookupRequest\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12;\n\x0cread_options\x18\x01 \x01(\x0b\x32%.google.datastore.v1beta3.ReadOptions\x12+\n\x04keys\x18\x03 \x03(\x0b\x32\x1d.google.datastore.v1beta3.Key\"\xb1\x01\n\x0eLookupResponse\x12\x35\n\x05\x66ound\x18\x01 \x03(\x0b\x32&.google.datastore.v1beta3.EntityResult\x12\x37\n\x07missing\x18\x02 \x03(\x0b\x32&.google.datastore.v1beta3.EntityResult\x12/\n\x08\x64\x65\x66\x65rred\x18\x03 \x03(\x0b\x32\x1d.google.datastore.v1beta3.Key\"\x98\x02\n\x0fRunQueryRequest\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12;\n\x0cpartition_id\x18\x02 \x01(\x0b\x32%.google.datastore.v1beta3.PartitionId\x12;\n\x0cread_options\x18\x01 \x01(\x0b\x32%.google.datastore.v1beta3.ReadOptions\x12\x30\n\x05query\x18\x03 \x01(\x0b\x32\x1f.google.datastore.v1beta3.QueryH\x00\x12\x37\n\tgql_query\x18\x07 \x01(\x0b\x32\".google.datastore.v1beta3.GqlQueryH\x00\x42\x0c\n\nquery_type\"}\n\x10RunQueryResponse\x12\x39\n\x05\x62\x61tch\x18\x01 \x01(\x0b\x32*.google.datastore.v1beta3.QueryResultBatch\x12.\n\x05query\x18\x02 \x01(\x0b\x32\x1f.google.datastore.v1beta3.Query\"-\n\x17\x42\x65ginTransactionRequest\x12\x12\n\nproject_id\x18\x08 \x01(\t\"/\n\x18\x42\x65ginTransactionResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\":\n\x0fRollbackRequest\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\"\x12\n\x10RollbackResponse\"\x8d\x02\n\rCommitRequest\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12:\n\x04mode\x18\x05 \x01(\x0e\x32,.google.datastore.v1beta3.CommitRequest.Mode\x12\x15\n\x0btransaction\x18\x01 \x01(\x0cH\x00\x12\x35\n\tmutations\x18\x06 \x03(\x0b\x32\".google.datastore.v1beta3.Mutation\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x11\n\rTRANSACTIONAL\x10\x01\x12\x15\n\x11NON_TRANSACTIONAL\x10\x02\x42\x16\n\x14transaction_selector\"k\n\x0e\x43ommitResponse\x12\x42\n\x10mutation_results\x18\x03 \x03(\x0b\x32(.google.datastore.v1beta3.MutationResult\x12\x15\n\rindex_updates\x18\x04 \x01(\x05\"U\n\x12\x41llocateIdsRequest\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12+\n\x04keys\x18\x01 \x03(\x0b\x32\x1d.google.datastore.v1beta3.Key\"B\n\x13\x41llocateIdsResponse\x12+\n\x04keys\x18\x01 \x03(\x0b\x32\x1d.google.datastore.v1beta3.Key\"\xe4\x01\n\x08Mutation\x12\x32\n\x06insert\x18\x04 \x01(\x0b\x32 .google.datastore.v1beta3.EntityH\x00\x12\x32\n\x06update\x18\x05 \x01(\x0b\x32 .google.datastore.v1beta3.EntityH\x00\x12\x32\n\x06upsert\x18\x06 \x01(\x0b\x32 .google.datastore.v1beta3.EntityH\x00\x12/\n\x06\x64\x65lete\x18\x07 \x01(\x0b\x32\x1d.google.datastore.v1beta3.KeyH\x00\x42\x0b\n\toperation\"<\n\x0eMutationResult\x12*\n\x03key\x18\x03 \x01(\x0b\x32\x1d.google.datastore.v1beta3.Key\"\xda\x01\n\x0bReadOptions\x12Q\n\x10read_consistency\x18\x01 \x01(\x0e\x32\x35.google.datastore.v1beta3.ReadOptions.ReadConsistencyH\x00\x12\x15\n\x0btransaction\x18\x02 \x01(\x0cH\x00\"M\n\x0fReadConsistency\x12 \n\x1cREAD_CONSISTENCY_UNSPECIFIED\x10\x00\x12\n\n\x06STRONG\x10\x01\x12\x0c\n\x08\x45VENTUAL\x10\x02\x42\x12\n\x10\x63onsistency_type2\xb7\x07\n\tDatastore\x12\x8d\x01\n\x06Lookup\x12\'.google.datastore.v1beta3.LookupRequest\x1a(.google.datastore.v1beta3.LookupResponse\"0\x82\xd3\xe4\x93\x02*\"%/v1beta3/projects/{project_id}:lookup:\x01*\x12\x95\x01\n\x08RunQuery\x12).google.datastore.v1beta3.RunQueryRequest\x1a*.google.datastore.v1beta3.RunQueryResponse\"2\x82\xd3\xe4\x93\x02,\"\'/v1beta3/projects/{project_id}:runQuery:\x01*\x12\xb5\x01\n\x10\x42\x65ginTransaction\x12\x31.google.datastore.v1beta3.BeginTransactionRequest\x1a\x32.google.datastore.v1beta3.BeginTransactionResponse\":\x82\xd3\xe4\x93\x02\x34\"//v1beta3/projects/{project_id}:beginTransaction:\x01*\x12\x8d\x01\n\x06\x43ommit\x12\'.google.datastore.v1beta3.CommitRequest\x1a(.google.datastore.v1beta3.CommitResponse\"0\x82\xd3\xe4\x93\x02*\"%/v1beta3/projects/{project_id}:commit:\x01*\x12\x95\x01\n\x08Rollback\x12).google.datastore.v1beta3.RollbackRequest\x1a*.google.datastore.v1beta3.RollbackResponse\"2\x82\xd3\xe4\x93\x02,\"\'/v1beta3/projects/{project_id}:rollback:\x01*\x12\xa1\x01\n\x0b\x41llocateIds\x12,.google.datastore.v1beta3.AllocateIdsRequest\x1a-.google.datastore.v1beta3.AllocateIdsResponse\"5\x82\xd3\xe4\x93\x02/\"*/v1beta3/projects/{project_id}:allocateIds:\x01*B0\n\x1c\x63om.google.datastore.v1beta3B\x0e\x44\x61tastoreProtoP\x01\x62\x06proto3' + , + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_datastore_dot_v1beta3_dot_entity__pb2.DESCRIPTOR,google_dot_datastore_dot_v1beta3_dot_query__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + + +_COMMITREQUEST_MODE = _descriptor.EnumDescriptor( + name='Mode', + full_name='google.datastore.v1beta3.CommitRequest.Mode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='MODE_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TRANSACTIONAL', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NON_TRANSACTIONAL', index=2, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1263, + serialized_end=1333, +) +_sym_db.RegisterEnumDescriptor(_COMMITREQUEST_MODE) + +_READOPTIONS_READCONSISTENCY = _descriptor.EnumDescriptor( + name='ReadConsistency', + full_name='google.datastore.v1beta3.ReadOptions.ReadConsistency', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='READ_CONSISTENCY_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='STRONG', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EVENTUAL', index=2, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=2038, + serialized_end=2115, +) +_sym_db.RegisterEnumDescriptor(_READOPTIONS_READCONSISTENCY) + + +_LOOKUPREQUEST = _descriptor.Descriptor( + name='LookupRequest', + full_name='google.datastore.v1beta3.LookupRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.LookupRequest.project_id', index=0, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='read_options', full_name='google.datastore.v1beta3.LookupRequest.read_options', index=1, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='keys', full_name='google.datastore.v1beta3.LookupRequest.keys', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=178, + serialized_end=319, +) + + +_LOOKUPRESPONSE = _descriptor.Descriptor( + name='LookupResponse', + full_name='google.datastore.v1beta3.LookupResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='found', full_name='google.datastore.v1beta3.LookupResponse.found', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='missing', full_name='google.datastore.v1beta3.LookupResponse.missing', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='deferred', full_name='google.datastore.v1beta3.LookupResponse.deferred', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=322, + serialized_end=499, +) + + +_RUNQUERYREQUEST = _descriptor.Descriptor( + name='RunQueryRequest', + full_name='google.datastore.v1beta3.RunQueryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.RunQueryRequest.project_id', index=0, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='partition_id', full_name='google.datastore.v1beta3.RunQueryRequest.partition_id', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='read_options', full_name='google.datastore.v1beta3.RunQueryRequest.read_options', index=2, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='query', full_name='google.datastore.v1beta3.RunQueryRequest.query', index=3, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='gql_query', full_name='google.datastore.v1beta3.RunQueryRequest.gql_query', index=4, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='query_type', full_name='google.datastore.v1beta3.RunQueryRequest.query_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=502, + serialized_end=782, +) + + +_RUNQUERYRESPONSE = _descriptor.Descriptor( + name='RunQueryResponse', + full_name='google.datastore.v1beta3.RunQueryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='batch', full_name='google.datastore.v1beta3.RunQueryResponse.batch', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='query', full_name='google.datastore.v1beta3.RunQueryResponse.query', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=784, + serialized_end=909, +) + + +_BEGINTRANSACTIONREQUEST = _descriptor.Descriptor( + name='BeginTransactionRequest', + full_name='google.datastore.v1beta3.BeginTransactionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.BeginTransactionRequest.project_id', index=0, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=911, + serialized_end=956, +) + + +_BEGINTRANSACTIONRESPONSE = _descriptor.Descriptor( + name='BeginTransactionResponse', + full_name='google.datastore.v1beta3.BeginTransactionResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='transaction', full_name='google.datastore.v1beta3.BeginTransactionResponse.transaction', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=958, + serialized_end=1005, +) + + +_ROLLBACKREQUEST = _descriptor.Descriptor( + name='RollbackRequest', + full_name='google.datastore.v1beta3.RollbackRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.RollbackRequest.project_id', index=0, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='transaction', full_name='google.datastore.v1beta3.RollbackRequest.transaction', index=1, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1007, + serialized_end=1065, +) + + +_ROLLBACKRESPONSE = _descriptor.Descriptor( + name='RollbackResponse', + full_name='google.datastore.v1beta3.RollbackResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1067, + serialized_end=1085, +) + + +_COMMITREQUEST = _descriptor.Descriptor( + name='CommitRequest', + full_name='google.datastore.v1beta3.CommitRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.CommitRequest.project_id', index=0, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='mode', full_name='google.datastore.v1beta3.CommitRequest.mode', index=1, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='transaction', full_name='google.datastore.v1beta3.CommitRequest.transaction', index=2, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='mutations', full_name='google.datastore.v1beta3.CommitRequest.mutations', index=3, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _COMMITREQUEST_MODE, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='transaction_selector', full_name='google.datastore.v1beta3.CommitRequest.transaction_selector', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1088, + serialized_end=1357, +) + + +_COMMITRESPONSE = _descriptor.Descriptor( + name='CommitResponse', + full_name='google.datastore.v1beta3.CommitResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='mutation_results', full_name='google.datastore.v1beta3.CommitResponse.mutation_results', index=0, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='index_updates', full_name='google.datastore.v1beta3.CommitResponse.index_updates', index=1, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1359, + serialized_end=1466, +) + + +_ALLOCATEIDSREQUEST = _descriptor.Descriptor( + name='AllocateIdsRequest', + full_name='google.datastore.v1beta3.AllocateIdsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.AllocateIdsRequest.project_id', index=0, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='keys', full_name='google.datastore.v1beta3.AllocateIdsRequest.keys', index=1, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1468, + serialized_end=1553, +) + + +_ALLOCATEIDSRESPONSE = _descriptor.Descriptor( + name='AllocateIdsResponse', + full_name='google.datastore.v1beta3.AllocateIdsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='keys', full_name='google.datastore.v1beta3.AllocateIdsResponse.keys', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1555, + serialized_end=1621, +) + + +_MUTATION = _descriptor.Descriptor( + name='Mutation', + full_name='google.datastore.v1beta3.Mutation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='insert', full_name='google.datastore.v1beta3.Mutation.insert', index=0, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='update', full_name='google.datastore.v1beta3.Mutation.update', index=1, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='upsert', full_name='google.datastore.v1beta3.Mutation.upsert', index=2, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='delete', full_name='google.datastore.v1beta3.Mutation.delete', index=3, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='operation', full_name='google.datastore.v1beta3.Mutation.operation', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1624, + serialized_end=1852, +) + + +_MUTATIONRESULT = _descriptor.Descriptor( + name='MutationResult', + full_name='google.datastore.v1beta3.MutationResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.datastore.v1beta3.MutationResult.key', index=0, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1854, + serialized_end=1914, +) + + +_READOPTIONS = _descriptor.Descriptor( + name='ReadOptions', + full_name='google.datastore.v1beta3.ReadOptions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='read_consistency', full_name='google.datastore.v1beta3.ReadOptions.read_consistency', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='transaction', full_name='google.datastore.v1beta3.ReadOptions.transaction', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _READOPTIONS_READCONSISTENCY, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='consistency_type', full_name='google.datastore.v1beta3.ReadOptions.consistency_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1917, + serialized_end=2135, +) + +_LOOKUPREQUEST.fields_by_name['read_options'].message_type = _READOPTIONS +_LOOKUPREQUEST.fields_by_name['keys'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._KEY +_LOOKUPRESPONSE.fields_by_name['found'].message_type = google_dot_datastore_dot_v1beta3_dot_query__pb2._ENTITYRESULT +_LOOKUPRESPONSE.fields_by_name['missing'].message_type = google_dot_datastore_dot_v1beta3_dot_query__pb2._ENTITYRESULT +_LOOKUPRESPONSE.fields_by_name['deferred'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._KEY +_RUNQUERYREQUEST.fields_by_name['partition_id'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._PARTITIONID +_RUNQUERYREQUEST.fields_by_name['read_options'].message_type = _READOPTIONS +_RUNQUERYREQUEST.fields_by_name['query'].message_type = google_dot_datastore_dot_v1beta3_dot_query__pb2._QUERY +_RUNQUERYREQUEST.fields_by_name['gql_query'].message_type = google_dot_datastore_dot_v1beta3_dot_query__pb2._GQLQUERY +_RUNQUERYREQUEST.oneofs_by_name['query_type'].fields.append( + _RUNQUERYREQUEST.fields_by_name['query']) +_RUNQUERYREQUEST.fields_by_name['query'].containing_oneof = _RUNQUERYREQUEST.oneofs_by_name['query_type'] +_RUNQUERYREQUEST.oneofs_by_name['query_type'].fields.append( + _RUNQUERYREQUEST.fields_by_name['gql_query']) +_RUNQUERYREQUEST.fields_by_name['gql_query'].containing_oneof = _RUNQUERYREQUEST.oneofs_by_name['query_type'] +_RUNQUERYRESPONSE.fields_by_name['batch'].message_type = google_dot_datastore_dot_v1beta3_dot_query__pb2._QUERYRESULTBATCH +_RUNQUERYRESPONSE.fields_by_name['query'].message_type = google_dot_datastore_dot_v1beta3_dot_query__pb2._QUERY +_COMMITREQUEST.fields_by_name['mode'].enum_type = _COMMITREQUEST_MODE +_COMMITREQUEST.fields_by_name['mutations'].message_type = _MUTATION +_COMMITREQUEST_MODE.containing_type = _COMMITREQUEST +_COMMITREQUEST.oneofs_by_name['transaction_selector'].fields.append( + _COMMITREQUEST.fields_by_name['transaction']) +_COMMITREQUEST.fields_by_name['transaction'].containing_oneof = _COMMITREQUEST.oneofs_by_name['transaction_selector'] +_COMMITRESPONSE.fields_by_name['mutation_results'].message_type = _MUTATIONRESULT +_ALLOCATEIDSREQUEST.fields_by_name['keys'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._KEY +_ALLOCATEIDSRESPONSE.fields_by_name['keys'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._KEY +_MUTATION.fields_by_name['insert'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._ENTITY +_MUTATION.fields_by_name['update'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._ENTITY +_MUTATION.fields_by_name['upsert'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._ENTITY +_MUTATION.fields_by_name['delete'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._KEY +_MUTATION.oneofs_by_name['operation'].fields.append( + _MUTATION.fields_by_name['insert']) +_MUTATION.fields_by_name['insert'].containing_oneof = _MUTATION.oneofs_by_name['operation'] +_MUTATION.oneofs_by_name['operation'].fields.append( + _MUTATION.fields_by_name['update']) +_MUTATION.fields_by_name['update'].containing_oneof = _MUTATION.oneofs_by_name['operation'] +_MUTATION.oneofs_by_name['operation'].fields.append( + _MUTATION.fields_by_name['upsert']) +_MUTATION.fields_by_name['upsert'].containing_oneof = _MUTATION.oneofs_by_name['operation'] +_MUTATION.oneofs_by_name['operation'].fields.append( + _MUTATION.fields_by_name['delete']) +_MUTATION.fields_by_name['delete'].containing_oneof = _MUTATION.oneofs_by_name['operation'] +_MUTATIONRESULT.fields_by_name['key'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._KEY +_READOPTIONS.fields_by_name['read_consistency'].enum_type = _READOPTIONS_READCONSISTENCY +_READOPTIONS_READCONSISTENCY.containing_type = _READOPTIONS +_READOPTIONS.oneofs_by_name['consistency_type'].fields.append( + _READOPTIONS.fields_by_name['read_consistency']) +_READOPTIONS.fields_by_name['read_consistency'].containing_oneof = _READOPTIONS.oneofs_by_name['consistency_type'] +_READOPTIONS.oneofs_by_name['consistency_type'].fields.append( + _READOPTIONS.fields_by_name['transaction']) +_READOPTIONS.fields_by_name['transaction'].containing_oneof = _READOPTIONS.oneofs_by_name['consistency_type'] +DESCRIPTOR.message_types_by_name['LookupRequest'] = _LOOKUPREQUEST +DESCRIPTOR.message_types_by_name['LookupResponse'] = _LOOKUPRESPONSE +DESCRIPTOR.message_types_by_name['RunQueryRequest'] = _RUNQUERYREQUEST +DESCRIPTOR.message_types_by_name['RunQueryResponse'] = _RUNQUERYRESPONSE +DESCRIPTOR.message_types_by_name['BeginTransactionRequest'] = _BEGINTRANSACTIONREQUEST +DESCRIPTOR.message_types_by_name['BeginTransactionResponse'] = _BEGINTRANSACTIONRESPONSE +DESCRIPTOR.message_types_by_name['RollbackRequest'] = _ROLLBACKREQUEST +DESCRIPTOR.message_types_by_name['RollbackResponse'] = _ROLLBACKRESPONSE +DESCRIPTOR.message_types_by_name['CommitRequest'] = _COMMITREQUEST +DESCRIPTOR.message_types_by_name['CommitResponse'] = _COMMITRESPONSE +DESCRIPTOR.message_types_by_name['AllocateIdsRequest'] = _ALLOCATEIDSREQUEST +DESCRIPTOR.message_types_by_name['AllocateIdsResponse'] = _ALLOCATEIDSRESPONSE +DESCRIPTOR.message_types_by_name['Mutation'] = _MUTATION +DESCRIPTOR.message_types_by_name['MutationResult'] = _MUTATIONRESULT +DESCRIPTOR.message_types_by_name['ReadOptions'] = _READOPTIONS + +LookupRequest = _reflection.GeneratedProtocolMessageType('LookupRequest', (_message.Message,), dict( + DESCRIPTOR = _LOOKUPREQUEST, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.LookupRequest) + )) +_sym_db.RegisterMessage(LookupRequest) + +LookupResponse = _reflection.GeneratedProtocolMessageType('LookupResponse', (_message.Message,), dict( + DESCRIPTOR = _LOOKUPRESPONSE, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.LookupResponse) + )) +_sym_db.RegisterMessage(LookupResponse) + +RunQueryRequest = _reflection.GeneratedProtocolMessageType('RunQueryRequest', (_message.Message,), dict( + DESCRIPTOR = _RUNQUERYREQUEST, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.RunQueryRequest) + )) +_sym_db.RegisterMessage(RunQueryRequest) + +RunQueryResponse = _reflection.GeneratedProtocolMessageType('RunQueryResponse', (_message.Message,), dict( + DESCRIPTOR = _RUNQUERYRESPONSE, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.RunQueryResponse) + )) +_sym_db.RegisterMessage(RunQueryResponse) + +BeginTransactionRequest = _reflection.GeneratedProtocolMessageType('BeginTransactionRequest', (_message.Message,), dict( + DESCRIPTOR = _BEGINTRANSACTIONREQUEST, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.BeginTransactionRequest) + )) +_sym_db.RegisterMessage(BeginTransactionRequest) + +BeginTransactionResponse = _reflection.GeneratedProtocolMessageType('BeginTransactionResponse', (_message.Message,), dict( + DESCRIPTOR = _BEGINTRANSACTIONRESPONSE, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.BeginTransactionResponse) + )) +_sym_db.RegisterMessage(BeginTransactionResponse) + +RollbackRequest = _reflection.GeneratedProtocolMessageType('RollbackRequest', (_message.Message,), dict( + DESCRIPTOR = _ROLLBACKREQUEST, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.RollbackRequest) + )) +_sym_db.RegisterMessage(RollbackRequest) + +RollbackResponse = _reflection.GeneratedProtocolMessageType('RollbackResponse', (_message.Message,), dict( + DESCRIPTOR = _ROLLBACKRESPONSE, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.RollbackResponse) + )) +_sym_db.RegisterMessage(RollbackResponse) + +CommitRequest = _reflection.GeneratedProtocolMessageType('CommitRequest', (_message.Message,), dict( + DESCRIPTOR = _COMMITREQUEST, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.CommitRequest) + )) +_sym_db.RegisterMessage(CommitRequest) + +CommitResponse = _reflection.GeneratedProtocolMessageType('CommitResponse', (_message.Message,), dict( + DESCRIPTOR = _COMMITRESPONSE, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.CommitResponse) + )) +_sym_db.RegisterMessage(CommitResponse) + +AllocateIdsRequest = _reflection.GeneratedProtocolMessageType('AllocateIdsRequest', (_message.Message,), dict( + DESCRIPTOR = _ALLOCATEIDSREQUEST, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.AllocateIdsRequest) + )) +_sym_db.RegisterMessage(AllocateIdsRequest) + +AllocateIdsResponse = _reflection.GeneratedProtocolMessageType('AllocateIdsResponse', (_message.Message,), dict( + DESCRIPTOR = _ALLOCATEIDSRESPONSE, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.AllocateIdsResponse) + )) +_sym_db.RegisterMessage(AllocateIdsResponse) + +Mutation = _reflection.GeneratedProtocolMessageType('Mutation', (_message.Message,), dict( + DESCRIPTOR = _MUTATION, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Mutation) + )) +_sym_db.RegisterMessage(Mutation) + +MutationResult = _reflection.GeneratedProtocolMessageType('MutationResult', (_message.Message,), dict( + DESCRIPTOR = _MUTATIONRESULT, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.MutationResult) + )) +_sym_db.RegisterMessage(MutationResult) + +ReadOptions = _reflection.GeneratedProtocolMessageType('ReadOptions', (_message.Message,), dict( + DESCRIPTOR = _READOPTIONS, + __module__ = 'google.datastore.v1beta3.datastore_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.ReadOptions) + )) +_sym_db.RegisterMessage(ReadOptions) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\034com.google.datastore.v1beta3B\016DatastoreProtoP\001') +# @@protoc_insertion_point(module_scope) diff --git a/gcloud/datastore/_generated/entity_pb2.py b/gcloud/datastore/_generated/entity_pb2.py index 4c071ac38de1..3295047f731f 100644 --- a/gcloud/datastore/_generated/entity_pb2.py +++ b/gcloud/datastore/_generated/entity_pb2.py @@ -1,26 +1,493 @@ -# Copyright 2015 Google Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Datastore shim to emulate v1beta3 module structure. - -This module intended to pair with entity.proto. -""" - -from gcloud.datastore import _datastore_v1_pb2 - - -PartitionId = _datastore_v1_pb2.PartitionId -Key = _datastore_v1_pb2.Key -Value = _datastore_v1_pb2.Value -Entity = _datastore_v1_pb2.Entity +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/datastore/v1beta3/entity.proto + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.type import latlng_pb2 as google_dot_type_dot_latlng__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/datastore/v1beta3/entity.proto', + package='google.datastore.v1beta3', + syntax='proto3', + serialized_pb=b'\n%google/datastore/v1beta3/entity.proto\x12\x18google.datastore.v1beta3\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18google/type/latlng.proto\"7\n\x0bPartitionId\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\"\xc1\x01\n\x03Key\x12;\n\x0cpartition_id\x18\x01 \x01(\x0b\x32%.google.datastore.v1beta3.PartitionId\x12\x37\n\x04path\x18\x02 \x03(\x0b\x32).google.datastore.v1beta3.Key.PathElement\x1a\x44\n\x0bPathElement\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\x03H\x00\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x42\t\n\x07id_type\"=\n\nArrayValue\x12/\n\x06values\x18\x01 \x03(\x0b\x32\x1f.google.datastore.v1beta3.Value\"\x80\x04\n\x05Value\x12\x30\n\nnull_value\x18\x0b \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x17\n\rboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x32\n\tkey_value\x18\x05 \x01(\x0b\x32\x1d.google.datastore.v1beta3.KeyH\x00\x12\x16\n\x0cstring_value\x18\x11 \x01(\tH\x00\x12\x14\n\nblob_value\x18\x12 \x01(\x0cH\x00\x12.\n\x0fgeo_point_value\x18\x08 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x12\x38\n\x0c\x65ntity_value\x18\x06 \x01(\x0b\x32 .google.datastore.v1beta3.EntityH\x00\x12;\n\x0b\x61rray_value\x18\t \x01(\x0b\x32$.google.datastore.v1beta3.ArrayValueH\x00\x12\x0f\n\x07meaning\x18\x0e \x01(\x05\x12\x1c\n\x14\x65xclude_from_indexes\x18\x13 \x01(\x08\x42\x0c\n\nvalue_type\"\xce\x01\n\x06\x45ntity\x12*\n\x03key\x18\x01 \x01(\x0b\x32\x1d.google.datastore.v1beta3.Key\x12\x44\n\nproperties\x18\x03 \x03(\x0b\x32\x30.google.datastore.v1beta3.Entity.PropertiesEntry\x1aR\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.google.datastore.v1beta3.Value:\x02\x38\x01\x42-\n\x1c\x63om.google.datastore.v1beta3B\x0b\x45ntityProtoP\x01\x62\x06proto3' + , + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_type_dot_latlng__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + + + +_PARTITIONID = _descriptor.Descriptor( + name='PartitionId', + full_name='google.datastore.v1beta3.PartitionId', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='project_id', full_name='google.datastore.v1beta3.PartitionId.project_id', index=0, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='namespace_id', full_name='google.datastore.v1beta3.PartitionId.namespace_id', index=1, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=186, + serialized_end=241, +) + + +_KEY_PATHELEMENT = _descriptor.Descriptor( + name='PathElement', + full_name='google.datastore.v1beta3.Key.PathElement', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='kind', full_name='google.datastore.v1beta3.Key.PathElement.kind', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='id', full_name='google.datastore.v1beta3.Key.PathElement.id', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='name', full_name='google.datastore.v1beta3.Key.PathElement.name', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='id_type', full_name='google.datastore.v1beta3.Key.PathElement.id_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=369, + serialized_end=437, +) + +_KEY = _descriptor.Descriptor( + name='Key', + full_name='google.datastore.v1beta3.Key', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='partition_id', full_name='google.datastore.v1beta3.Key.partition_id', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='path', full_name='google.datastore.v1beta3.Key.path', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_KEY_PATHELEMENT, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=244, + serialized_end=437, +) + + +_ARRAYVALUE = _descriptor.Descriptor( + name='ArrayValue', + full_name='google.datastore.v1beta3.ArrayValue', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='values', full_name='google.datastore.v1beta3.ArrayValue.values', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=439, + serialized_end=500, +) + + +_VALUE = _descriptor.Descriptor( + name='Value', + full_name='google.datastore.v1beta3.Value', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='null_value', full_name='google.datastore.v1beta3.Value.null_value', index=0, + number=11, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='boolean_value', full_name='google.datastore.v1beta3.Value.boolean_value', index=1, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='integer_value', full_name='google.datastore.v1beta3.Value.integer_value', index=2, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='double_value', full_name='google.datastore.v1beta3.Value.double_value', index=3, + number=3, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='timestamp_value', full_name='google.datastore.v1beta3.Value.timestamp_value', index=4, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='key_value', full_name='google.datastore.v1beta3.Value.key_value', index=5, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='string_value', full_name='google.datastore.v1beta3.Value.string_value', index=6, + number=17, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='blob_value', full_name='google.datastore.v1beta3.Value.blob_value', index=7, + number=18, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='geo_point_value', full_name='google.datastore.v1beta3.Value.geo_point_value', index=8, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='entity_value', full_name='google.datastore.v1beta3.Value.entity_value', index=9, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='array_value', full_name='google.datastore.v1beta3.Value.array_value', index=10, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='meaning', full_name='google.datastore.v1beta3.Value.meaning', index=11, + number=14, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='exclude_from_indexes', full_name='google.datastore.v1beta3.Value.exclude_from_indexes', index=12, + number=19, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='value_type', full_name='google.datastore.v1beta3.Value.value_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=503, + serialized_end=1015, +) + + +_ENTITY_PROPERTIESENTRY = _descriptor.Descriptor( + name='PropertiesEntry', + full_name='google.datastore.v1beta3.Entity.PropertiesEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.datastore.v1beta3.Entity.PropertiesEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='google.datastore.v1beta3.Entity.PropertiesEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), b'8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1142, + serialized_end=1224, +) + +_ENTITY = _descriptor.Descriptor( + name='Entity', + full_name='google.datastore.v1beta3.Entity', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.datastore.v1beta3.Entity.key', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='properties', full_name='google.datastore.v1beta3.Entity.properties', index=1, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_ENTITY_PROPERTIESENTRY, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1018, + serialized_end=1224, +) + +_KEY_PATHELEMENT.containing_type = _KEY +_KEY_PATHELEMENT.oneofs_by_name['id_type'].fields.append( + _KEY_PATHELEMENT.fields_by_name['id']) +_KEY_PATHELEMENT.fields_by_name['id'].containing_oneof = _KEY_PATHELEMENT.oneofs_by_name['id_type'] +_KEY_PATHELEMENT.oneofs_by_name['id_type'].fields.append( + _KEY_PATHELEMENT.fields_by_name['name']) +_KEY_PATHELEMENT.fields_by_name['name'].containing_oneof = _KEY_PATHELEMENT.oneofs_by_name['id_type'] +_KEY.fields_by_name['partition_id'].message_type = _PARTITIONID +_KEY.fields_by_name['path'].message_type = _KEY_PATHELEMENT +_ARRAYVALUE.fields_by_name['values'].message_type = _VALUE +_VALUE.fields_by_name['null_value'].enum_type = google_dot_protobuf_dot_struct__pb2._NULLVALUE +_VALUE.fields_by_name['timestamp_value'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_VALUE.fields_by_name['key_value'].message_type = _KEY +_VALUE.fields_by_name['geo_point_value'].message_type = google_dot_type_dot_latlng__pb2._LATLNG +_VALUE.fields_by_name['entity_value'].message_type = _ENTITY +_VALUE.fields_by_name['array_value'].message_type = _ARRAYVALUE +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['null_value']) +_VALUE.fields_by_name['null_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['boolean_value']) +_VALUE.fields_by_name['boolean_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['integer_value']) +_VALUE.fields_by_name['integer_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['double_value']) +_VALUE.fields_by_name['double_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['timestamp_value']) +_VALUE.fields_by_name['timestamp_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['key_value']) +_VALUE.fields_by_name['key_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['string_value']) +_VALUE.fields_by_name['string_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['blob_value']) +_VALUE.fields_by_name['blob_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['geo_point_value']) +_VALUE.fields_by_name['geo_point_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['entity_value']) +_VALUE.fields_by_name['entity_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_VALUE.oneofs_by_name['value_type'].fields.append( + _VALUE.fields_by_name['array_value']) +_VALUE.fields_by_name['array_value'].containing_oneof = _VALUE.oneofs_by_name['value_type'] +_ENTITY_PROPERTIESENTRY.fields_by_name['value'].message_type = _VALUE +_ENTITY_PROPERTIESENTRY.containing_type = _ENTITY +_ENTITY.fields_by_name['key'].message_type = _KEY +_ENTITY.fields_by_name['properties'].message_type = _ENTITY_PROPERTIESENTRY +DESCRIPTOR.message_types_by_name['PartitionId'] = _PARTITIONID +DESCRIPTOR.message_types_by_name['Key'] = _KEY +DESCRIPTOR.message_types_by_name['ArrayValue'] = _ARRAYVALUE +DESCRIPTOR.message_types_by_name['Value'] = _VALUE +DESCRIPTOR.message_types_by_name['Entity'] = _ENTITY + +PartitionId = _reflection.GeneratedProtocolMessageType('PartitionId', (_message.Message,), dict( + DESCRIPTOR = _PARTITIONID, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.PartitionId) + )) +_sym_db.RegisterMessage(PartitionId) + +Key = _reflection.GeneratedProtocolMessageType('Key', (_message.Message,), dict( + + PathElement = _reflection.GeneratedProtocolMessageType('PathElement', (_message.Message,), dict( + DESCRIPTOR = _KEY_PATHELEMENT, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Key.PathElement) + )) + , + DESCRIPTOR = _KEY, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Key) + )) +_sym_db.RegisterMessage(Key) +_sym_db.RegisterMessage(Key.PathElement) + +ArrayValue = _reflection.GeneratedProtocolMessageType('ArrayValue', (_message.Message,), dict( + DESCRIPTOR = _ARRAYVALUE, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.ArrayValue) + )) +_sym_db.RegisterMessage(ArrayValue) + +Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), dict( + DESCRIPTOR = _VALUE, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Value) + )) +_sym_db.RegisterMessage(Value) + +Entity = _reflection.GeneratedProtocolMessageType('Entity', (_message.Message,), dict( + + PropertiesEntry = _reflection.GeneratedProtocolMessageType('PropertiesEntry', (_message.Message,), dict( + DESCRIPTOR = _ENTITY_PROPERTIESENTRY, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Entity.PropertiesEntry) + )) + , + DESCRIPTOR = _ENTITY, + __module__ = 'google.datastore.v1beta3.entity_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Entity) + )) +_sym_db.RegisterMessage(Entity) +_sym_db.RegisterMessage(Entity.PropertiesEntry) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\034com.google.datastore.v1beta3B\013EntityProtoP\001') +_ENTITY_PROPERTIESENTRY.has_options = True +_ENTITY_PROPERTIESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), b'8\001') +# @@protoc_insertion_point(module_scope) diff --git a/gcloud/datastore/_generated/query_pb2.py b/gcloud/datastore/_generated/query_pb2.py index b3427c33525c..e843253850be 100644 --- a/gcloud/datastore/_generated/query_pb2.py +++ b/gcloud/datastore/_generated/query_pb2.py @@ -1,33 +1,917 @@ -# Copyright 2015 Google Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Datastore shim to emulate v1beta3 module structure. - -This module intended to pair with query.proto. -""" - -from gcloud.datastore import _datastore_v1_pb2 - - -EntityResult = _datastore_v1_pb2.EntityResult -Query = _datastore_v1_pb2.Query -KindExpression = _datastore_v1_pb2.KindExpression -PropertyReference = _datastore_v1_pb2.PropertyReference -PropertyOrder = _datastore_v1_pb2.PropertyOrder -Filter = _datastore_v1_pb2.Filter -CompositeFilter = _datastore_v1_pb2.CompositeFilter -PropertyFilter = _datastore_v1_pb2.PropertyFilter -GqlQuery = _datastore_v1_pb2.GqlQuery -GqlQueryArg = _datastore_v1_pb2.GqlQueryArg -QueryResultBatch = _datastore_v1_pb2.QueryResultBatch +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/datastore/v1beta3/query.proto + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from gcloud.datastore._generated import entity_pb2 as google_dot_datastore_dot_v1beta3_dot_entity__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/datastore/v1beta3/query.proto', + package='google.datastore.v1beta3', + syntax='proto3', + serialized_pb=b'\n$google/datastore/v1beta3/query.proto\x12\x18google.datastore.v1beta3\x1a\x1cgoogle/api/annotations.proto\x1a%google/datastore/v1beta3/entity.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa3\x01\n\x0c\x45ntityResult\x12\x30\n\x06\x65ntity\x18\x01 \x01(\x0b\x32 .google.datastore.v1beta3.Entity\x12\x0e\n\x06\x63ursor\x18\x03 \x01(\x0c\"Q\n\nResultType\x12\x1b\n\x17RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0e\n\nPROJECTION\x10\x02\x12\x0c\n\x08KEY_ONLY\x10\x03\"\x8b\x03\n\x05Query\x12\x38\n\nprojection\x18\x02 \x03(\x0b\x32$.google.datastore.v1beta3.Projection\x12\x36\n\x04kind\x18\x03 \x03(\x0b\x32(.google.datastore.v1beta3.KindExpression\x12\x30\n\x06\x66ilter\x18\x04 \x01(\x0b\x32 .google.datastore.v1beta3.Filter\x12\x36\n\x05order\x18\x05 \x03(\x0b\x32\'.google.datastore.v1beta3.PropertyOrder\x12@\n\x0b\x64istinct_on\x18\x06 \x03(\x0b\x32+.google.datastore.v1beta3.PropertyReference\x12\x14\n\x0cstart_cursor\x18\x07 \x01(\x0c\x12\x12\n\nend_cursor\x18\x08 \x01(\x0c\x12\x0e\n\x06offset\x18\n \x01(\x05\x12*\n\x05limit\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32Value\"\x1e\n\x0eKindExpression\x12\x0c\n\x04name\x18\x01 \x01(\t\"!\n\x11PropertyReference\x12\x0c\n\x04name\x18\x02 \x01(\t\"K\n\nProjection\x12=\n\x08property\x18\x01 \x01(\x0b\x32+.google.datastore.v1beta3.PropertyReference\"\xdb\x01\n\rPropertyOrder\x12=\n\x08property\x18\x01 \x01(\x0b\x32+.google.datastore.v1beta3.PropertyReference\x12\x44\n\tdirection\x18\x02 \x01(\x0e\x32\x31.google.datastore.v1beta3.PropertyOrder.Direction\"E\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"\xa3\x01\n\x06\x46ilter\x12\x45\n\x10\x63omposite_filter\x18\x01 \x01(\x0b\x32).google.datastore.v1beta3.CompositeFilterH\x00\x12\x43\n\x0fproperty_filter\x18\x02 \x01(\x0b\x32(.google.datastore.v1beta3.PropertyFilterH\x00\x42\r\n\x0b\x66ilter_type\"\xb3\x01\n\x0f\x43ompositeFilter\x12>\n\x02op\x18\x01 \x01(\x0e\x32\x32.google.datastore.v1beta3.CompositeFilter.Operator\x12\x31\n\x07\x66ilters\x18\x02 \x03(\x0b\x32 .google.datastore.v1beta3.Filter\"-\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41ND\x10\x01\"\xd6\x02\n\x0ePropertyFilter\x12=\n\x08property\x18\x01 \x01(\x0b\x32+.google.datastore.v1beta3.PropertyReference\x12=\n\x02op\x18\x02 \x01(\x0e\x32\x31.google.datastore.v1beta3.PropertyFilter.Operator\x12.\n\x05value\x18\x03 \x01(\x0b\x32\x1f.google.datastore.v1beta3.Value\"\x95\x01\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\r\n\tLESS_THAN\x10\x01\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\n\x0cGREATER_THAN\x10\x03\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\t\n\x05\x45QUAL\x10\x05\x12\x10\n\x0cHAS_ANCESTOR\x10\x0b\"\xb4\x02\n\x08GqlQuery\x12\x14\n\x0cquery_string\x18\x01 \x01(\t\x12\x16\n\x0e\x61llow_literals\x18\x02 \x01(\x08\x12M\n\x0enamed_bindings\x18\x05 \x03(\x0b\x32\x35.google.datastore.v1beta3.GqlQuery.NamedBindingsEntry\x12H\n\x13positional_bindings\x18\x04 \x03(\x0b\x32+.google.datastore.v1beta3.GqlQueryParameter\x1a\x61\n\x12NamedBindingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.google.datastore.v1beta3.GqlQueryParameter:\x02\x38\x01\"i\n\x11GqlQueryParameter\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1f.google.datastore.v1beta3.ValueH\x00\x12\x10\n\x06\x63ursor\x18\x03 \x01(\x0cH\x00\x42\x10\n\x0eparameter_type\"\xd3\x03\n\x10QueryResultBatch\x12\x17\n\x0fskipped_results\x18\x06 \x01(\x05\x12\x16\n\x0eskipped_cursor\x18\x03 \x01(\x0c\x12M\n\x12\x65ntity_result_type\x18\x01 \x01(\x0e\x32\x31.google.datastore.v1beta3.EntityResult.ResultType\x12>\n\x0e\x65ntity_results\x18\x02 \x03(\x0b\x32&.google.datastore.v1beta3.EntityResult\x12\x12\n\nend_cursor\x18\x04 \x01(\x0c\x12P\n\x0cmore_results\x18\x05 \x01(\x0e\x32:.google.datastore.v1beta3.QueryResultBatch.MoreResultsType\"\x98\x01\n\x0fMoreResultsType\x12!\n\x1dMORE_RESULTS_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_FINISHED\x10\x01\x12\x1c\n\x18MORE_RESULTS_AFTER_LIMIT\x10\x02\x12\x1d\n\x19MORE_RESULTS_AFTER_CURSOR\x10\x04\x12\x13\n\x0fNO_MORE_RESULTS\x10\x03\x42,\n\x1c\x63om.google.datastore.v1beta3B\nQueryProtoP\x01\x62\x06proto3' + , + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_datastore_dot_v1beta3_dot_entity__pb2.DESCRIPTOR,google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,]) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + + +_ENTITYRESULT_RESULTTYPE = _descriptor.EnumDescriptor( + name='ResultType', + full_name='google.datastore.v1beta3.EntityResult.ResultType', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='RESULT_TYPE_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FULL', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PROJECTION', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='KEY_ONLY', index=3, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=250, + serialized_end=331, +) +_sym_db.RegisterEnumDescriptor(_ENTITYRESULT_RESULTTYPE) + +_PROPERTYORDER_DIRECTION = _descriptor.EnumDescriptor( + name='Direction', + full_name='google.datastore.v1beta3.PropertyOrder.Direction', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='DIRECTION_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ASCENDING', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DESCENDING', index=2, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1026, + serialized_end=1095, +) +_sym_db.RegisterEnumDescriptor(_PROPERTYORDER_DIRECTION) + +_COMPOSITEFILTER_OPERATOR = _descriptor.EnumDescriptor( + name='Operator', + full_name='google.datastore.v1beta3.CompositeFilter.Operator', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='OPERATOR_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='AND', index=1, number=1, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1398, + serialized_end=1443, +) +_sym_db.RegisterEnumDescriptor(_COMPOSITEFILTER_OPERATOR) + +_PROPERTYFILTER_OPERATOR = _descriptor.EnumDescriptor( + name='Operator', + full_name='google.datastore.v1beta3.PropertyFilter.Operator', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='OPERATOR_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LESS_THAN', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LESS_THAN_OR_EQUAL', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='GREATER_THAN', index=3, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='GREATER_THAN_OR_EQUAL', index=4, number=4, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='EQUAL', index=5, number=5, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='HAS_ANCESTOR', index=6, number=11, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1639, + serialized_end=1788, +) +_sym_db.RegisterEnumDescriptor(_PROPERTYFILTER_OPERATOR) + +_QUERYRESULTBATCH_MORERESULTSTYPE = _descriptor.EnumDescriptor( + name='MoreResultsType', + full_name='google.datastore.v1beta3.QueryResultBatch.MoreResultsType', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='MORE_RESULTS_TYPE_UNSPECIFIED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NOT_FINISHED', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MORE_RESULTS_AFTER_LIMIT', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MORE_RESULTS_AFTER_CURSOR', index=3, number=4, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NO_MORE_RESULTS', index=4, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=2524, + serialized_end=2676, +) +_sym_db.RegisterEnumDescriptor(_QUERYRESULTBATCH_MORERESULTSTYPE) + + +_ENTITYRESULT = _descriptor.Descriptor( + name='EntityResult', + full_name='google.datastore.v1beta3.EntityResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='entity', full_name='google.datastore.v1beta3.EntityResult.entity', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='cursor', full_name='google.datastore.v1beta3.EntityResult.cursor', index=1, + number=3, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _ENTITYRESULT_RESULTTYPE, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=168, + serialized_end=331, +) + + +_QUERY = _descriptor.Descriptor( + name='Query', + full_name='google.datastore.v1beta3.Query', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='projection', full_name='google.datastore.v1beta3.Query.projection', index=0, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='kind', full_name='google.datastore.v1beta3.Query.kind', index=1, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='filter', full_name='google.datastore.v1beta3.Query.filter', index=2, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='order', full_name='google.datastore.v1beta3.Query.order', index=3, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='distinct_on', full_name='google.datastore.v1beta3.Query.distinct_on', index=4, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='start_cursor', full_name='google.datastore.v1beta3.Query.start_cursor', index=5, + number=7, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='end_cursor', full_name='google.datastore.v1beta3.Query.end_cursor', index=6, + number=8, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='offset', full_name='google.datastore.v1beta3.Query.offset', index=7, + number=10, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='limit', full_name='google.datastore.v1beta3.Query.limit', index=8, + number=12, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=334, + serialized_end=729, +) + + +_KINDEXPRESSION = _descriptor.Descriptor( + name='KindExpression', + full_name='google.datastore.v1beta3.KindExpression', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.datastore.v1beta3.KindExpression.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=731, + serialized_end=761, +) + + +_PROPERTYREFERENCE = _descriptor.Descriptor( + name='PropertyReference', + full_name='google.datastore.v1beta3.PropertyReference', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.datastore.v1beta3.PropertyReference.name', index=0, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=763, + serialized_end=796, +) + + +_PROJECTION = _descriptor.Descriptor( + name='Projection', + full_name='google.datastore.v1beta3.Projection', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='property', full_name='google.datastore.v1beta3.Projection.property', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=798, + serialized_end=873, +) + + +_PROPERTYORDER = _descriptor.Descriptor( + name='PropertyOrder', + full_name='google.datastore.v1beta3.PropertyOrder', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='property', full_name='google.datastore.v1beta3.PropertyOrder.property', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='direction', full_name='google.datastore.v1beta3.PropertyOrder.direction', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _PROPERTYORDER_DIRECTION, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=876, + serialized_end=1095, +) + + +_FILTER = _descriptor.Descriptor( + name='Filter', + full_name='google.datastore.v1beta3.Filter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='composite_filter', full_name='google.datastore.v1beta3.Filter.composite_filter', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='property_filter', full_name='google.datastore.v1beta3.Filter.property_filter', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='filter_type', full_name='google.datastore.v1beta3.Filter.filter_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1098, + serialized_end=1261, +) + + +_COMPOSITEFILTER = _descriptor.Descriptor( + name='CompositeFilter', + full_name='google.datastore.v1beta3.CompositeFilter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='op', full_name='google.datastore.v1beta3.CompositeFilter.op', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='filters', full_name='google.datastore.v1beta3.CompositeFilter.filters', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _COMPOSITEFILTER_OPERATOR, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1264, + serialized_end=1443, +) + + +_PROPERTYFILTER = _descriptor.Descriptor( + name='PropertyFilter', + full_name='google.datastore.v1beta3.PropertyFilter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='property', full_name='google.datastore.v1beta3.PropertyFilter.property', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='op', full_name='google.datastore.v1beta3.PropertyFilter.op', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='google.datastore.v1beta3.PropertyFilter.value', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _PROPERTYFILTER_OPERATOR, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1446, + serialized_end=1788, +) + + +_GQLQUERY_NAMEDBINDINGSENTRY = _descriptor.Descriptor( + name='NamedBindingsEntry', + full_name='google.datastore.v1beta3.GqlQuery.NamedBindingsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.datastore.v1beta3.GqlQuery.NamedBindingsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='google.datastore.v1beta3.GqlQuery.NamedBindingsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), b'8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2002, + serialized_end=2099, +) + +_GQLQUERY = _descriptor.Descriptor( + name='GqlQuery', + full_name='google.datastore.v1beta3.GqlQuery', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='query_string', full_name='google.datastore.v1beta3.GqlQuery.query_string', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='allow_literals', full_name='google.datastore.v1beta3.GqlQuery.allow_literals', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='named_bindings', full_name='google.datastore.v1beta3.GqlQuery.named_bindings', index=2, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='positional_bindings', full_name='google.datastore.v1beta3.GqlQuery.positional_bindings', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_GQLQUERY_NAMEDBINDINGSENTRY, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1791, + serialized_end=2099, +) + + +_GQLQUERYPARAMETER = _descriptor.Descriptor( + name='GqlQueryParameter', + full_name='google.datastore.v1beta3.GqlQueryParameter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='google.datastore.v1beta3.GqlQueryParameter.value', index=0, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='cursor', full_name='google.datastore.v1beta3.GqlQueryParameter.cursor', index=1, + number=3, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='parameter_type', full_name='google.datastore.v1beta3.GqlQueryParameter.parameter_type', + index=0, containing_type=None, fields=[]), + ], + serialized_start=2101, + serialized_end=2206, +) + + +_QUERYRESULTBATCH = _descriptor.Descriptor( + name='QueryResultBatch', + full_name='google.datastore.v1beta3.QueryResultBatch', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='skipped_results', full_name='google.datastore.v1beta3.QueryResultBatch.skipped_results', index=0, + number=6, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='skipped_cursor', full_name='google.datastore.v1beta3.QueryResultBatch.skipped_cursor', index=1, + number=3, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='entity_result_type', full_name='google.datastore.v1beta3.QueryResultBatch.entity_result_type', index=2, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='entity_results', full_name='google.datastore.v1beta3.QueryResultBatch.entity_results', index=3, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='end_cursor', full_name='google.datastore.v1beta3.QueryResultBatch.end_cursor', index=4, + number=4, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='more_results', full_name='google.datastore.v1beta3.QueryResultBatch.more_results', index=5, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _QUERYRESULTBATCH_MORERESULTSTYPE, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2209, + serialized_end=2676, +) + +_ENTITYRESULT.fields_by_name['entity'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._ENTITY +_ENTITYRESULT_RESULTTYPE.containing_type = _ENTITYRESULT +_QUERY.fields_by_name['projection'].message_type = _PROJECTION +_QUERY.fields_by_name['kind'].message_type = _KINDEXPRESSION +_QUERY.fields_by_name['filter'].message_type = _FILTER +_QUERY.fields_by_name['order'].message_type = _PROPERTYORDER +_QUERY.fields_by_name['distinct_on'].message_type = _PROPERTYREFERENCE +_QUERY.fields_by_name['limit'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT32VALUE +_PROJECTION.fields_by_name['property'].message_type = _PROPERTYREFERENCE +_PROPERTYORDER.fields_by_name['property'].message_type = _PROPERTYREFERENCE +_PROPERTYORDER.fields_by_name['direction'].enum_type = _PROPERTYORDER_DIRECTION +_PROPERTYORDER_DIRECTION.containing_type = _PROPERTYORDER +_FILTER.fields_by_name['composite_filter'].message_type = _COMPOSITEFILTER +_FILTER.fields_by_name['property_filter'].message_type = _PROPERTYFILTER +_FILTER.oneofs_by_name['filter_type'].fields.append( + _FILTER.fields_by_name['composite_filter']) +_FILTER.fields_by_name['composite_filter'].containing_oneof = _FILTER.oneofs_by_name['filter_type'] +_FILTER.oneofs_by_name['filter_type'].fields.append( + _FILTER.fields_by_name['property_filter']) +_FILTER.fields_by_name['property_filter'].containing_oneof = _FILTER.oneofs_by_name['filter_type'] +_COMPOSITEFILTER.fields_by_name['op'].enum_type = _COMPOSITEFILTER_OPERATOR +_COMPOSITEFILTER.fields_by_name['filters'].message_type = _FILTER +_COMPOSITEFILTER_OPERATOR.containing_type = _COMPOSITEFILTER +_PROPERTYFILTER.fields_by_name['property'].message_type = _PROPERTYREFERENCE +_PROPERTYFILTER.fields_by_name['op'].enum_type = _PROPERTYFILTER_OPERATOR +_PROPERTYFILTER.fields_by_name['value'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._VALUE +_PROPERTYFILTER_OPERATOR.containing_type = _PROPERTYFILTER +_GQLQUERY_NAMEDBINDINGSENTRY.fields_by_name['value'].message_type = _GQLQUERYPARAMETER +_GQLQUERY_NAMEDBINDINGSENTRY.containing_type = _GQLQUERY +_GQLQUERY.fields_by_name['named_bindings'].message_type = _GQLQUERY_NAMEDBINDINGSENTRY +_GQLQUERY.fields_by_name['positional_bindings'].message_type = _GQLQUERYPARAMETER +_GQLQUERYPARAMETER.fields_by_name['value'].message_type = google_dot_datastore_dot_v1beta3_dot_entity__pb2._VALUE +_GQLQUERYPARAMETER.oneofs_by_name['parameter_type'].fields.append( + _GQLQUERYPARAMETER.fields_by_name['value']) +_GQLQUERYPARAMETER.fields_by_name['value'].containing_oneof = _GQLQUERYPARAMETER.oneofs_by_name['parameter_type'] +_GQLQUERYPARAMETER.oneofs_by_name['parameter_type'].fields.append( + _GQLQUERYPARAMETER.fields_by_name['cursor']) +_GQLQUERYPARAMETER.fields_by_name['cursor'].containing_oneof = _GQLQUERYPARAMETER.oneofs_by_name['parameter_type'] +_QUERYRESULTBATCH.fields_by_name['entity_result_type'].enum_type = _ENTITYRESULT_RESULTTYPE +_QUERYRESULTBATCH.fields_by_name['entity_results'].message_type = _ENTITYRESULT +_QUERYRESULTBATCH.fields_by_name['more_results'].enum_type = _QUERYRESULTBATCH_MORERESULTSTYPE +_QUERYRESULTBATCH_MORERESULTSTYPE.containing_type = _QUERYRESULTBATCH +DESCRIPTOR.message_types_by_name['EntityResult'] = _ENTITYRESULT +DESCRIPTOR.message_types_by_name['Query'] = _QUERY +DESCRIPTOR.message_types_by_name['KindExpression'] = _KINDEXPRESSION +DESCRIPTOR.message_types_by_name['PropertyReference'] = _PROPERTYREFERENCE +DESCRIPTOR.message_types_by_name['Projection'] = _PROJECTION +DESCRIPTOR.message_types_by_name['PropertyOrder'] = _PROPERTYORDER +DESCRIPTOR.message_types_by_name['Filter'] = _FILTER +DESCRIPTOR.message_types_by_name['CompositeFilter'] = _COMPOSITEFILTER +DESCRIPTOR.message_types_by_name['PropertyFilter'] = _PROPERTYFILTER +DESCRIPTOR.message_types_by_name['GqlQuery'] = _GQLQUERY +DESCRIPTOR.message_types_by_name['GqlQueryParameter'] = _GQLQUERYPARAMETER +DESCRIPTOR.message_types_by_name['QueryResultBatch'] = _QUERYRESULTBATCH + +EntityResult = _reflection.GeneratedProtocolMessageType('EntityResult', (_message.Message,), dict( + DESCRIPTOR = _ENTITYRESULT, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.EntityResult) + )) +_sym_db.RegisterMessage(EntityResult) + +Query = _reflection.GeneratedProtocolMessageType('Query', (_message.Message,), dict( + DESCRIPTOR = _QUERY, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Query) + )) +_sym_db.RegisterMessage(Query) + +KindExpression = _reflection.GeneratedProtocolMessageType('KindExpression', (_message.Message,), dict( + DESCRIPTOR = _KINDEXPRESSION, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.KindExpression) + )) +_sym_db.RegisterMessage(KindExpression) + +PropertyReference = _reflection.GeneratedProtocolMessageType('PropertyReference', (_message.Message,), dict( + DESCRIPTOR = _PROPERTYREFERENCE, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.PropertyReference) + )) +_sym_db.RegisterMessage(PropertyReference) + +Projection = _reflection.GeneratedProtocolMessageType('Projection', (_message.Message,), dict( + DESCRIPTOR = _PROJECTION, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Projection) + )) +_sym_db.RegisterMessage(Projection) + +PropertyOrder = _reflection.GeneratedProtocolMessageType('PropertyOrder', (_message.Message,), dict( + DESCRIPTOR = _PROPERTYORDER, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.PropertyOrder) + )) +_sym_db.RegisterMessage(PropertyOrder) + +Filter = _reflection.GeneratedProtocolMessageType('Filter', (_message.Message,), dict( + DESCRIPTOR = _FILTER, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.Filter) + )) +_sym_db.RegisterMessage(Filter) + +CompositeFilter = _reflection.GeneratedProtocolMessageType('CompositeFilter', (_message.Message,), dict( + DESCRIPTOR = _COMPOSITEFILTER, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.CompositeFilter) + )) +_sym_db.RegisterMessage(CompositeFilter) + +PropertyFilter = _reflection.GeneratedProtocolMessageType('PropertyFilter', (_message.Message,), dict( + DESCRIPTOR = _PROPERTYFILTER, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.PropertyFilter) + )) +_sym_db.RegisterMessage(PropertyFilter) + +GqlQuery = _reflection.GeneratedProtocolMessageType('GqlQuery', (_message.Message,), dict( + + NamedBindingsEntry = _reflection.GeneratedProtocolMessageType('NamedBindingsEntry', (_message.Message,), dict( + DESCRIPTOR = _GQLQUERY_NAMEDBINDINGSENTRY, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.GqlQuery.NamedBindingsEntry) + )) + , + DESCRIPTOR = _GQLQUERY, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.GqlQuery) + )) +_sym_db.RegisterMessage(GqlQuery) +_sym_db.RegisterMessage(GqlQuery.NamedBindingsEntry) + +GqlQueryParameter = _reflection.GeneratedProtocolMessageType('GqlQueryParameter', (_message.Message,), dict( + DESCRIPTOR = _GQLQUERYPARAMETER, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.GqlQueryParameter) + )) +_sym_db.RegisterMessage(GqlQueryParameter) + +QueryResultBatch = _reflection.GeneratedProtocolMessageType('QueryResultBatch', (_message.Message,), dict( + DESCRIPTOR = _QUERYRESULTBATCH, + __module__ = 'google.datastore.v1beta3.query_pb2' + # @@protoc_insertion_point(class_scope:google.datastore.v1beta3.QueryResultBatch) + )) +_sym_db.RegisterMessage(QueryResultBatch) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\034com.google.datastore.v1beta3B\nQueryProtoP\001') +_GQLQUERY_NAMEDBINDINGSENTRY.has_options = True +_GQLQUERY_NAMEDBINDINGSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), b'8\001') +# @@protoc_insertion_point(module_scope) diff --git a/scripts/make_datastore_grpc.py b/scripts/make_datastore_grpc.py new file mode 100644 index 000000000000..7ff9a35fd7df --- /dev/null +++ b/scripts/make_datastore_grpc.py @@ -0,0 +1,115 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Get the inserted gRPC lines for datastore pb2 file.""" + +import os +import shutil +import subprocess +import tempfile + + +ROOT_DIR = os.path.abspath( + os.path.join(os.path.dirname(__file__), '..')) +PROTOS_DIR = os.path.join(ROOT_DIR, 'googleapis-pb') +PROTO_PATH = os.path.join(PROTOS_DIR, 'google', 'datastore', + 'v1beta3', 'datastore.proto') +GRPC_ONLY_FILE = os.path.join(ROOT_DIR, 'gcloud', 'datastore', + '_generated', 'datastore_grpc_pb2.py') +PROTOC_CMD = 'protoc' +GRPC_PLUGIN = 'grpc_python_plugin' + + +def get_pb2_contents_with_grpc(): + """Get pb2 lines generated by protoc with gRPC plugin. + + :rtype: list + :returns: A list of lines in the generated file. + """ + temp_dir = tempfile.mkdtemp() + generated_path = os.path.join(temp_dir, 'google', 'datastore', + 'v1beta3', 'datastore_pb2.py') + try: + subprocess.check_output([ + PROTOC_CMD, + '--proto_path', + PROTOS_DIR, + '--python_out', + temp_dir, + '--plugin', + 'protoc-gen-grpc=' + GRPC_PLUGIN, + '--grpc_out', + temp_dir, + PROTO_PATH, + ]) + with open(generated_path, 'rb') as file_obj: + return file_obj.readlines() + finally: + shutil.rmtree(temp_dir, ignore_errors=True) + + +def get_pb2_contents_without_grpc(): + """Get pb2 lines generated by protoc without gRPC plugin. + + :rtype: list + :returns: A list of lines in the generated file. + """ + temp_dir = tempfile.mkdtemp() + generated_path = os.path.join(temp_dir, 'google', 'datastore', + 'v1beta3', 'datastore_pb2.py') + try: + subprocess.check_output([ + PROTOC_CMD, + '--proto_path', + PROTOS_DIR, + '--python_out', + temp_dir, + PROTO_PATH, + ]) + with open(generated_path, 'rb') as file_obj: + return file_obj.readlines() + finally: + shutil.rmtree(temp_dir, ignore_errors=True) + + +def get_pb2_grpc_only(): + """Get pb2 lines that are only in gRPC. + + :rtype: list + :returns: A list of lines that are only in the pb2 file + generated with the gRPC plugin. + """ + grpc_contents = get_pb2_contents_with_grpc() + non_grpc_contents = get_pb2_contents_without_grpc() + + grpc_only_lines = [] + curr_non_grpc_line = 0 + for line in grpc_contents: + if line == non_grpc_contents[curr_non_grpc_line]: + curr_non_grpc_line += 1 + else: + grpc_only_lines.append(line) + + return grpc_only_lines + + +def main(): + """Write gRPC-only lines to custom module.""" + grpc_only_lines = get_pb2_grpc_only() + with open(GRPC_ONLY_FILE, 'wb') as file_obj: + file_obj.write(''.join(grpc_only_lines)) + + +if __name__ == '__main__': + main() diff --git a/scripts/rewrite_imports.py b/scripts/rewrite_imports.py index 4af5ec9a89fd..7429ec14734c 100644 --- a/scripts/rewrite_imports.py +++ b/scripts/rewrite_imports.py @@ -27,6 +27,7 @@ 'google.bigtable.admin.cluster.v1': 'gcloud.bigtable._generated', 'google.bigtable.admin.table.v1': 'gcloud.bigtable._generated', 'google.bigtable.v1': 'gcloud.bigtable._generated', + 'google.datastore.v1beta3': 'gcloud.datastore._generated', } @@ -134,7 +135,8 @@ def rewrite_file(filename): def main(): """Rewrites all PB2 files.""" - pb2_files = glob.glob('gcloud/bigtable/_generated/*pb2.py') + pb2_files = (glob.glob('gcloud/bigtable/_generated/*pb2.py') + + glob.glob('gcloud/datastore/_generated/*pb2.py')) for filename in pb2_files: rewrite_file(filename) From a5cb9e3bb13146df121a28db6d4efa48ec459add Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 7 Jan 2016 14:15:23 -0800 Subject: [PATCH 3/3] Updating lint rules to account for new generated files. --- scripts/pylintrc_default | 6 ++---- scripts/run_pylint.py | 7 +++---- tox.ini | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/pylintrc_default b/scripts/pylintrc_default index 79c31cf9a83c..79586b614d56 100644 --- a/scripts/pylintrc_default +++ b/scripts/pylintrc_default @@ -27,10 +27,8 @@ # DEFAULT: ignore=CVS # NOTE: This path must be relative due to the use of # os.walk in astroid.modutils.get_module_files. -# RATIONALE: -# _datastore_v1_pb2.py: protobuf-generated code. -ignore = - _datastore_v1_pb2.py +# RATIONALE: No files to ignore. +ignore= # Pickle collected data for later comparisons. # DEFAULT: persistent=yes diff --git a/scripts/run_pylint.py b/scripts/run_pylint.py index d3d6ac2437c2..89975a3047ee 100644 --- a/scripts/run_pylint.py +++ b/scripts/run_pylint.py @@ -29,12 +29,11 @@ IGNORED_DIRECTORIES = [ - 'gcloud/bigtable/_generated', - 'gcloud/datastore/_generated', + os.path.join('gcloud', 'bigtable', '_generated'), + os.path.join('gcloud', 'datastore', '_generated'), ] IGNORED_FILES = [ - 'gcloud/datastore/_datastore_v1_pb2.py', - 'docs/conf.py', + os.path.join('docs', 'conf.py'), 'setup.py', ] SCRIPTS_DIR = os.path.abspath(os.path.dirname(__file__)) diff --git a/tox.ini b/tox.ini index 31b8ba2789a5..f35c8f8f1c81 100644 --- a/tox.ini +++ b/tox.ini @@ -61,7 +61,7 @@ deps = {[testenv:docs]deps} passenv = {[testenv:docs]passenv} [pep8] -exclude = gcloud/datastore/_generated/*,gcloud/datastore/_datastore_v1_pb2.py,gcloud/bigtable/_generated/*,docs/conf.py, +exclude = docs/conf.py,gcloud/bigtable/_generated/*,gcloud/datastore/_generated/* verbose = 1 [testenv:lint]