Skip to content

Commit

Permalink
feat(firestore): update the api
Browse files Browse the repository at this point in the history
#### firestore:v1

The following keys were deleted:
- schemas.GoogleFirestoreAdminV1RestoreDatabaseRequest.properties.kmsKeyName.type (Total Keys: 1)
- schemas.GoogleFirestoreAdminV1RestoreDatabaseRequest.properties.useBackupEncryption.$ref (Total Keys: 1)
- schemas.GoogleFirestoreAdminV1RestoreDatabaseRequest.properties.useGoogleDefaultEncryption.$ref (Total Keys: 1)

The following keys were added:
- schemas.GoogleFirestoreAdminV1CustomerManagedEncryptionOptions (Total Keys: 3)
- schemas.GoogleFirestoreAdminV1EncryptionConfig (Total Keys: 5)
- schemas.GoogleFirestoreAdminV1GoogleDefaultEncryptionOptions (Total Keys: 2)
- schemas.GoogleFirestoreAdminV1RestoreDatabaseRequest.properties.encryptionConfig.$ref (Total Keys: 1)
- schemas.GoogleFirestoreAdminV1SourceEncryptionOptions (Total Keys: 2)
  • Loading branch information
yoshi-automation committed Aug 13, 2024
1 parent e5b52c5 commit 941d833
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/dyn/firestore_v1.projects.databases.documents.html
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ <h3>Method Details</h3>
An object of the form:

{ # The response for Firestore.Listen.
&quot;documentChange&quot;: { # A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. For PipelineQueryTargets, `document` will be in the new pipeline format, For a Listen stream with both QueryTargets and PipelineQueryTargets present, if a document matches both types of queries, then a separate DocumentChange messages will be sent out one for each set. # A Document has changed.
&quot;documentChange&quot;: { # A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. # A Document has changed.
&quot;document&quot;: { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # The new state of the Document. If `mask` is set, contains only fields that were updated or added.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query.
&quot;fields&quot;: { # The document&#x27;s fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. For example, the structured field `&quot;foo&quot; : { map_value: { &quot;x&amp;y&quot; : { string_value: &quot;hello&quot; }}}` would be represented by the field path `` foo.`x&amp;y` ``. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. A quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&amp;y` `` represents `x&amp;y` and `` `bak\`tik` `` represents `` bak`tik ``.
Expand Down
12 changes: 8 additions & 4 deletions docs/dyn/firestore_v1.projects.databases.html
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,14 @@ <h3>Method Details</h3>
{ # The request message for FirestoreAdmin.RestoreDatabase.
&quot;backup&quot;: &quot;A String&quot;, # Backup to restore from. Must be from the same project as the parent. The restored database will be created in the same location as the source backup. Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
&quot;databaseId&quot;: &quot;A String&quot;, # Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. This database id must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. &quot;(default)&quot; database id is also valid.
&quot;kmsKeyName&quot;: &quot;A String&quot;, # Use Customer Managed Encryption Keys (CMEK) for encryption. Only keys in the same location as the restored database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
&quot;useBackupEncryption&quot;: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } # The restored database will use the same encryption configuration as the backup. This is the default option when no `encryption_config` is specified.
},
&quot;useGoogleDefaultEncryption&quot;: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } # Use Google default encryption.
&quot;encryptionConfig&quot;: { # Encryption configuration for a new database being created from another source. The source could be a Backup or a DatabaseSnapshot. # Optional. Encryption configuration for the restored database. If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.
&quot;customerManagedEncryption&quot;: { # The configuration options for using CMEK (Customer Managed Encryption Key) encryption. # Use Customer Managed Encryption Keys (CMEK) for encryption.
&quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as the database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
},
&quot;googleDefaultEncryption&quot;: { # The configuration options for using Google default encryption. # Use Google default encryption.
},
&quot;useSourceEncryption&quot;: { # The configuration options for using the same encryption method as the source. # The database will use the same encryption configuration as the source.
},
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ <h3>Method Details</h3>
An object of the form:

{ # The response for Firestore.Listen.
&quot;documentChange&quot;: { # A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. For PipelineQueryTargets, `document` will be in the new pipeline format, For a Listen stream with both QueryTargets and PipelineQueryTargets present, if a document matches both types of queries, then a separate DocumentChange messages will be sent out one for each set. # A Document has changed.
&quot;documentChange&quot;: { # A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. # A Document has changed.
&quot;document&quot;: { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # The new state of the Document. If `mask` is set, contains only fields that were updated or added.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query.
&quot;fields&quot;: { # The document&#x27;s fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. For example, the structured field `&quot;foo&quot; : { map_value: { &quot;x&amp;y&quot; : { string_value: &quot;hello&quot; }}}` would be represented by the field path `` foo.`x&amp;y` ``. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. A quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&amp;y` `` represents `x&amp;y` and `` `bak\`tik` `` represents `` bak`tik ``.
Expand Down
66 changes: 50 additions & 16 deletions googleapiclient/discovery_cache/documents/firestore.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@
}
}
},
"revision": "20240713",
"revision": "20240804",
"rootUrl": "https://firestore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -2066,7 +2066,7 @@
"type": "object"
},
"DocumentChange": {
"description": "A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. For PipelineQueryTargets, `document` will be in the new pipeline format, For a Listen stream with both QueryTargets and PipelineQueryTargets present, if a document matches both types of queries, then a separate DocumentChange messages will be sent out one for each set.",
"description": "A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.",
"id": "DocumentChange",
"properties": {
"document": {
Expand Down Expand Up @@ -2401,9 +2401,9 @@
],
"enumDescriptions": [
"Should not be set.",
"Measures the EUCLIDEAN distance between the vectors. See [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn more",
"Compares vectors based on the angle between them, which allows you to measure similarity that isn't based on the vectors magnitude. We recommend using DOT_PRODUCT with unit normalized vectors instead of COSINE distance, which is mathematically equivalent with better performance. See [Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn more.",
"Similar to cosine but is affected by the magnitude of the vectors. See [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more."
"Measures the EUCLIDEAN distance between the vectors. See [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn more. The resulting distance decreases the more similar two vectors are.",
"COSINE distance compares vectors based on the angle between them, which allows you to measure similarity that isn't based on the vectors magnitude. We recommend using DOT_PRODUCT with unit normalized vectors instead of COSINE distance, which is mathematically equivalent with better performance. See [Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn more about COSINE similarity and COSINE distance. The resulting COSINE distance decreases the more similar two vectors are.",
"Similar to cosine but is affected by the magnitude of the vectors. See [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. The resulting distance increases the more similar two vectors are."
],
"type": "string"
},
Expand Down Expand Up @@ -2630,6 +2630,17 @@
"properties": {},
"type": "object"
},
"GoogleFirestoreAdminV1CustomerManagedEncryptionOptions": {
"description": "The configuration options for using CMEK (Customer Managed Encryption Key) encryption.",
"id": "GoogleFirestoreAdminV1CustomerManagedEncryptionOptions",
"properties": {
"kmsKeyName": {
"description": "Required. Only keys in the same location as the database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.",
"type": "string"
}
},
"type": "object"
},
"GoogleFirestoreAdminV1DailyRecurrence": {
"description": "Represents a recurring schedule that runs every day. The time zone is UTC.",
"id": "GoogleFirestoreAdminV1DailyRecurrence",
Expand Down Expand Up @@ -2782,6 +2793,25 @@
"properties": {},
"type": "object"
},
"GoogleFirestoreAdminV1EncryptionConfig": {
"description": "Encryption configuration for a new database being created from another source. The source could be a Backup or a DatabaseSnapshot.",
"id": "GoogleFirestoreAdminV1EncryptionConfig",
"properties": {
"customerManagedEncryption": {
"$ref": "GoogleFirestoreAdminV1CustomerManagedEncryptionOptions",
"description": "Use Customer Managed Encryption Keys (CMEK) for encryption."
},
"googleDefaultEncryption": {
"$ref": "GoogleFirestoreAdminV1GoogleDefaultEncryptionOptions",
"description": "Use Google default encryption."
},
"useSourceEncryption": {
"$ref": "GoogleFirestoreAdminV1SourceEncryptionOptions",
"description": "The database will use the same encryption configuration as the source."
}
},
"type": "object"
},
"GoogleFirestoreAdminV1ExportDocumentsMetadata": {
"description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.ExportDocuments.",
"id": "GoogleFirestoreAdminV1ExportDocumentsMetadata",
Expand Down Expand Up @@ -2984,6 +3014,12 @@
"properties": {},
"type": "object"
},
"GoogleFirestoreAdminV1GoogleDefaultEncryptionOptions": {
"description": "The configuration options for using Google default encryption.",
"id": "GoogleFirestoreAdminV1GoogleDefaultEncryptionOptions",
"properties": {},
"type": "object"
},
"GoogleFirestoreAdminV1ImportDocumentsMetadata": {
"description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.ImportDocuments.",
"id": "GoogleFirestoreAdminV1ImportDocumentsMetadata",
Expand Down Expand Up @@ -3463,21 +3499,19 @@
"description": "Required. The ID to use for the database, which will become the final component of the database's resource name. This database id must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. \"(default)\" database id is also valid.",
"type": "string"
},
"kmsKeyName": {
"description": "Use Customer Managed Encryption Keys (CMEK) for encryption. Only keys in the same location as the restored database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.",
"type": "string"
},
"useBackupEncryption": {
"$ref": "Empty",
"description": "The restored database will use the same encryption configuration as the backup. This is the default option when no `encryption_config` is specified."
},
"useGoogleDefaultEncryption": {
"$ref": "Empty",
"description": "Use Google default encryption."
"encryptionConfig": {
"$ref": "GoogleFirestoreAdminV1EncryptionConfig",
"description": "Optional. Encryption configuration for the restored database. If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption."
}
},
"type": "object"
},
"GoogleFirestoreAdminV1SourceEncryptionOptions": {
"description": "The configuration options for using the same encryption method as the source.",
"id": "GoogleFirestoreAdminV1SourceEncryptionOptions",
"properties": {},
"type": "object"
},
"GoogleFirestoreAdminV1Stats": {
"description": "Backup specific statistics.",
"id": "GoogleFirestoreAdminV1Stats",
Expand Down
10 changes: 5 additions & 5 deletions googleapiclient/discovery_cache/documents/firestore.v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@
}
}
},
"revision": "20240713",
"revision": "20240804",
"rootUrl": "https://firestore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -1310,7 +1310,7 @@
"type": "object"
},
"DocumentChange": {
"description": "A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. For PipelineQueryTargets, `document` will be in the new pipeline format, For a Listen stream with both QueryTargets and PipelineQueryTargets present, if a document matches both types of queries, then a separate DocumentChange messages will be sent out one for each set.",
"description": "A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.",
"id": "DocumentChange",
"properties": {
"document": {
Expand Down Expand Up @@ -1645,9 +1645,9 @@
],
"enumDescriptions": [
"Should not be set.",
"Measures the EUCLIDEAN distance between the vectors. See [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn more",
"Compares vectors based on the angle between them, which allows you to measure similarity that isn't based on the vectors magnitude. We recommend using DOT_PRODUCT with unit normalized vectors instead of COSINE distance, which is mathematically equivalent with better performance. See [Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn more.",
"Similar to cosine but is affected by the magnitude of the vectors. See [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more."
"Measures the EUCLIDEAN distance between the vectors. See [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn more. The resulting distance decreases the more similar two vectors are.",
"COSINE distance compares vectors based on the angle between them, which allows you to measure similarity that isn't based on the vectors magnitude. We recommend using DOT_PRODUCT with unit normalized vectors instead of COSINE distance, which is mathematically equivalent with better performance. See [Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn more about COSINE similarity and COSINE distance. The resulting COSINE distance decreases the more similar two vectors are.",
"Similar to cosine but is affected by the magnitude of the vectors. See [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. The resulting distance increases the more similar two vectors are."
],
"type": "string"
},
Expand Down

0 comments on commit 941d833

Please sign in to comment.