Skip to content

Commit

Permalink
[CHANGE ME] Re-generated to pick up changes in the API or client libr…
Browse files Browse the repository at this point in the history
…ary generator.
  • Loading branch information
yoshi-automation committed Feb 6, 2020
1 parent ad1c459 commit fa221d8
Show file tree
Hide file tree
Showing 11 changed files with 1,391 additions and 1,617 deletions.
14 changes: 14 additions & 0 deletions dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
5 changes: 5 additions & 0 deletions dev/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
2,488 changes: 1,244 additions & 1,244 deletions dev/protos/protos.json

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions dev/src/v1/firestore_admin_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ export class FirestoreAdminClient {
// identifiers to uniquely identify resources within the API.
// Create useful helper objects for these.
this._pathTemplates = {
collectionGroupPathTemplate: new gaxModule.PathTemplate(
'projects/{project}/databases/{database}/collectionGroups/{collection}'
),
indexPathTemplate: new gaxModule.PathTemplate(
'projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}'
),
fieldPathTemplate: new gaxModule.PathTemplate(
'projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}'
),
collectionGroupPathTemplate: new gaxModule.PathTemplate(
'projects/{project}/databases/{database}/collectionGroups/{collection}'
),
databasePathTemplate: new gaxModule.PathTemplate(
'projects/{project}/databases/{database}'
),
Expand Down Expand Up @@ -764,7 +764,7 @@ export class FirestoreAdminClient {
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
field_name: request.field!.name || '',
'field.name': request.field!.name || '',
});
return this._innerApiCalls.updateField(request, options, callback);
}
Expand Down Expand Up @@ -1262,61 +1262,6 @@ export class FirestoreAdminClient {
// -- Path templates --
// --------------------

/**
* Return a fully-qualified collectionGroup resource name string.
*
* @param {string} project
* @param {string} database
* @param {string} collection
* @returns {string} Resource name string.
*/
collectionGroupPath(project: string, database: string, collection: string) {
return this._pathTemplates.collectionGroupPathTemplate.render({
project,
database,
collection,
});
}

/**
* Parse the project from CollectionGroup resource.
*
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the project.
*/
matchProjectFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).project;
}

/**
* Parse the database from CollectionGroup resource.
*
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the database.
*/
matchDatabaseFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).database;
}

/**
* Parse the collection from CollectionGroup resource.
*
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the collection.
*/
matchCollectionFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).collection;
}

/**
* Return a fully-qualified index resource name string.
*
Expand Down Expand Up @@ -1451,6 +1396,61 @@ export class FirestoreAdminClient {
return this._pathTemplates.fieldPathTemplate.match(fieldName).field;
}

/**
* Return a fully-qualified collectionGroup resource name string.
*
* @param {string} project
* @param {string} database
* @param {string} collection
* @returns {string} Resource name string.
*/
collectionGroupPath(project: string, database: string, collection: string) {
return this._pathTemplates.collectionGroupPathTemplate.render({
project,
database,
collection,
});
}

/**
* Parse the project from CollectionGroup resource.
*
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the project.
*/
matchProjectFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).project;
}

/**
* Parse the database from CollectionGroup resource.
*
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the database.
*/
matchDatabaseFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).database;
}

/**
* Parse the collection from CollectionGroup resource.
*
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the collection.
*/
matchCollectionFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).collection;
}

/**
* Return a fully-qualified database resource name string.
*
Expand Down
2 changes: 1 addition & 1 deletion dev/src/v1/firestore_admin_proto_list.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
"../../protos/google/firestore/admin/v1/index.proto",
"../../protos/google/firestore/admin/v1/field.proto",
"../../protos/google/firestore/admin/v1/firestore_admin.proto",
"../../protos/google/firestore/admin/v1/index.proto",
"../../protos/google/firestore/admin/v1/location.proto",
"../../protos/google/firestore/admin/v1/operation.proto"
]
4 changes: 2 additions & 2 deletions dev/src/v1/firestore_proto_list.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
"../../protos/google/firestore/v1/common.proto",
"../../protos/google/firestore/v1/document.proto",
"../../protos/google/firestore/v1/write.proto",
"../../protos/google/firestore/v1/firestore.proto",
"../../protos/google/firestore/v1/query.proto",
"../../protos/google/firestore/v1/firestore.proto"
"../../protos/google/firestore/v1/write.proto"
]
4 changes: 2 additions & 2 deletions dev/src/v1beta1/firestore_proto_list.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
"../../protos/google/firestore/v1beta1/common.proto",
"../../protos/google/firestore/v1beta1/document.proto",
"../../protos/google/firestore/v1beta1/write.proto",
"../../protos/google/firestore/v1beta1/firestore.proto",
"../../protos/google/firestore/v1beta1/query.proto",
"../../protos/google/firestore/v1beta1/firestore.proto"
"../../protos/google/firestore/v1beta1/write.proto"
]
Loading

0 comments on commit fa221d8

Please sign in to comment.