Skip to content

Commit

Permalink
fix: better parameter naming in path template helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Jan 29, 2020
1 parent 2ec0489 commit aac02f4
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 17 deletions.
28 changes: 14 additions & 14 deletions dev/src/v1/firestore_admin_client.ts
Expand Up @@ -1263,15 +1263,15 @@ export class FirestoreAdminClient {
// --------------------

/**
* Return a fully-qualified collectiongroup resource name string.
* 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({
return this._pathTemplates.collectionGroupPathTemplate.render({
project,
database,
collection,
Expand All @@ -1281,39 +1281,39 @@ export class FirestoreAdminClient {
/**
* Parse the project from CollectionGroup resource.
*
* @param {string} collectiongroupName
* @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
matchProjectFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).project;
}

/**
* Parse the database from CollectionGroup resource.
*
* @param {string} collectiongroupName
* @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
matchDatabaseFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).database;
}

/**
* Parse the collection from CollectionGroup resource.
*
* @param {string} collectiongroupName
* @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
matchCollectionFromCollectionGroupName(collectionGroupName: string) {
return this._pathTemplates.collectionGroupPathTemplate.match(
collectionGroupName
).collection;
}

Expand Down
299 changes: 296 additions & 3 deletions dev/synth.metadata
@@ -1,12 +1,12 @@
{
"updateTime": "2020-01-15T12:19:38.399076Z",
"updateTime": "2020-01-29T12:21:39.064044Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "d99df0d67057a233c711187e0689baa4f8e6333d",
"internalRef": "289709813"
"sha": "cf3b61102ed5f36b827bc82ec39be09525f018c8",
"internalRef": "292034635"
}
},
{
Expand Down Expand Up @@ -45,5 +45,298 @@
"generator": "gapic-generator-typescript"
}
}
],
"newFiles": [
{
"path": "conformance/.eslintrc.yml"
},
{
"path": "conformance/runner.ts"
},
{
"path": "conformance/test-definition.proto"
},
{
"path": "conformance/test-suite.binproto"
},
{
"path": "protos/firestore_admin_v1_proto_api.d.ts"
},
{
"path": "protos/firestore_admin_v1_proto_api.js"
},
{
"path": "protos/firestore_v1_proto_api.d.ts"
},
{
"path": "protos/firestore_v1_proto_api.js"
},
{
"path": "protos/firestore_v1beta1_proto_api.d.ts"
},
{
"path": "protos/firestore_v1beta1_proto_api.js"
},
{
"path": "protos/google/api/annotations.proto"
},
{
"path": "protos/google/api/client.proto"
},
{
"path": "protos/google/api/field_behavior.proto"
},
{
"path": "protos/google/api/http.proto"
},
{
"path": "protos/google/api/resource.proto"
},
{
"path": "protos/google/firestore/admin/v1/field.proto"
},
{
"path": "protos/google/firestore/admin/v1/firestore_admin.proto"
},
{
"path": "protos/google/firestore/admin/v1/index.proto"
},
{
"path": "protos/google/firestore/admin/v1/location.proto"
},
{
"path": "protos/google/firestore/admin/v1/operation.proto"
},
{
"path": "protos/google/firestore/v1/common.proto"
},
{
"path": "protos/google/firestore/v1/document.proto"
},
{
"path": "protos/google/firestore/v1/firestore.proto"
},
{
"path": "protos/google/firestore/v1/query.proto"
},
{
"path": "protos/google/firestore/v1/write.proto"
},
{
"path": "protos/google/firestore/v1beta1/common.proto"
},
{
"path": "protos/google/firestore/v1beta1/document.proto"
},
{
"path": "protos/google/firestore/v1beta1/firestore.proto"
},
{
"path": "protos/google/firestore/v1beta1/query.proto"
},
{
"path": "protos/google/firestore/v1beta1/write.proto"
},
{
"path": "protos/google/longrunning/operations.proto"
},
{
"path": "protos/google/protobuf/any.proto"
},
{
"path": "protos/google/protobuf/empty.proto"
},
{
"path": "protos/google/protobuf/field_mask.proto"
},
{
"path": "protos/google/protobuf/struct.proto"
},
{
"path": "protos/google/protobuf/timestamp.proto"
},
{
"path": "protos/google/protobuf/wrappers.proto"
},
{
"path": "protos/google/rpc/status.proto"
},
{
"path": "protos/google/type/latlng.proto"
},
{
"path": "protos/protos.json"
},
{
"path": "protos/update.sh"
},
{
"path": "src/backoff.ts"
},
{
"path": "src/convert.ts"
},
{
"path": "src/document-change.ts"
},
{
"path": "src/document.ts"
},
{
"path": "src/external-modules.d.ts"
},
{
"path": "src/field-value.ts"
},
{
"path": "src/geo-point.ts"
},
{
"path": "src/index.ts"
},
{
"path": "src/logger.ts"
},
{
"path": "src/order.ts"
},
{
"path": "src/path.ts"
},
{
"path": "src/pool.ts"
},
{
"path": "src/reference.ts"
},
{
"path": "src/serializer.ts"
},
{
"path": "src/timestamp.ts"
},
{
"path": "src/transaction.ts"
},
{
"path": "src/types.ts"
},
{
"path": "src/util.ts"
},
{
"path": "src/v1/firestore_admin_client.ts"
},
{
"path": "src/v1/firestore_admin_client_config.json"
},
{
"path": "src/v1/firestore_admin_proto_list.json"
},
{
"path": "src/v1/firestore_client.ts"
},
{
"path": "src/v1/firestore_client_config.json"
},
{
"path": "src/v1/firestore_proto_list.json"
},
{
"path": "src/v1/index.ts"
},
{
"path": "src/v1beta1/firestore_client.ts"
},
{
"path": "src/v1beta1/firestore_client_config.json"
},
{
"path": "src/v1beta1/firestore_proto_list.json"
},
{
"path": "src/v1beta1/index.ts"
},
{
"path": "src/validate.ts"
},
{
"path": "src/watch.ts"
},
{
"path": "src/write-batch.ts"
},
{
"path": "synth.metadata"
},
{
"path": "system-test/.eslintrc.yml"
},
{
"path": "system-test/.gitignore"
},
{
"path": "system-test/firestore.ts"
},
{
"path": "test/backoff.ts"
},
{
"path": "test/collection.ts"
},
{
"path": "test/document.ts"
},
{
"path": "test/field-value.ts"
},
{
"path": "test/gapic-firestore-v1.ts"
},
{
"path": "test/gapic-firestore-v1beta1.ts"
},
{
"path": "test/gapic-firestore_admin-v1.ts"
},
{
"path": "test/index.ts"
},
{
"path": "test/mocha.opts"
},
{
"path": "test/order.ts"
},
{
"path": "test/path.ts"
},
{
"path": "test/pool.ts"
},
{
"path": "test/query.ts"
},
{
"path": "test/timestamp.ts"
},
{
"path": "test/transaction.ts"
},
{
"path": "test/typescript.ts"
},
{
"path": "test/util.ts"
},
{
"path": "test/util/helpers.ts"
},
{
"path": "test/watch.ts"
},
{
"path": "test/write-batch.ts"
}
]
}

0 comments on commit aac02f4

Please sign in to comment.