Skip to content

Commit

Permalink
build: update gapic generator to allow individual location mixin gene…
Browse files Browse the repository at this point in the history
…ration (#1251)

* feat: New PropertyMask field which allows partial commits, lookups, and query results

PiperOrigin-RevId: 635449160

Source-Link: googleapis/googleapis@dde0ec1

Source-Link: googleapis/googleapis-gen@8caa60d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGNhYTYwZDlhZWE4Mjk2NGExOWNkZjhmYWY5MTM4NDkxMWRiOGJkZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* build: update gapic generator to allow individual location mixin generation

PiperOrigin-RevId: 638462084

Source-Link: googleapis/googleapis@e5d5636

Source-Link: googleapis/googleapis-gen@d02b2f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDAyYjJmOTIzOWMzZTFkZTY0N2VmMzdmYjEwYTVlNDI0YWEwYjdhNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: danieljbruce <[email protected]>
  • Loading branch information
3 people committed Jun 4, 2024
1 parent b7ff5c8 commit fb82e1c
Show file tree
Hide file tree
Showing 8 changed files with 519 additions and 2 deletions.
42 changes: 42 additions & 0 deletions protos/google/datastore/v1/datastore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ message LookupRequest {

// Required. Keys of entities to look up.
repeated Key keys = 3 [(google.api.field_behavior) = REQUIRED];

// The properties to return. Defaults to returning all properties.
//
// If this field is set and an entity has a property not referenced in the
// mask, it will be absent from [LookupResponse.found.entity.properties][].
//
// The entity's key is always returned.
PropertyMask property_mask = 5;
}

// The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
Expand Down Expand Up @@ -234,6 +242,13 @@ message RunQueryRequest {
GqlQuery gql_query = 7;
}

// The properties to return.
// This field must not be set for a projection query.
//
// See
// [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
PropertyMask property_mask = 10;

// Optional. Explain options for the query. If set, additional query
// statistics will be returned. If not, only query results will be returned.
ExplainOptions explain_options = 12 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -526,6 +541,16 @@ message Mutation {
// mutation conflicts.
google.protobuf.Timestamp update_time = 11;
}

// The properties to write in this mutation.
// None of the properties in the mask may have a reserved name, except for
// `__key__`.
// This field is ignored for `delete`.
//
// If the entity already exists, only properties referenced in the mask are
// updated, others are left untouched.
// Properties referenced in the mask but not in the entity are deleted.
PropertyMask property_mask = 9;
}

// The result of applying a mutation.
Expand Down Expand Up @@ -555,6 +580,23 @@ message MutationResult {
bool conflict_detected = 5;
}

// The set of arbitrarily nested property paths used to restrict an operation to
// only a subset of properties in an entity.
message PropertyMask {
// The paths to the properties covered by this mask.
//
// A path is a list of property names separated by dots (`.`), for example
// `foo.bar` means the property `bar` inside the entity property `foo` inside
// the entity associated with this path.
//
// If a property name contains a dot `.` or a backslash `\`, then that
// name must be escaped.
//
// A path must not be empty, and may not reference a value inside an
// [array value][google.datastore.v1.Value.array_value].
repeated string paths = 1;
}

// The options shared by read requests.
message ReadOptions {
// The possible values for read consistencies.
Expand Down
115 changes: 115 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb82e1c

Please sign in to comment.