diff --git a/packages/google-cloud-datacatalog/.repo-metadata.json b/packages/google-cloud-datacatalog/.repo-metadata.json index f8b2a9ac922..58ba628a709 100644 --- a/packages/google-cloud-datacatalog/.repo-metadata.json +++ b/packages/google-cloud-datacatalog/.repo-metadata.json @@ -1,10 +1,10 @@ { "name": "datacatalog", - "name_pretty": "Google Cloud Data Catalog", + "name_pretty": "Data Catalog", "product_documentation": "https://cloud.google.com/data-catalog/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/datacatalog/latest/", + "client_documentation": "https://googleapis.dev/nodejs/datacatalog/latest", "issue_tracker": "", - "release_level": "alpha", + "release_level": "beta", "language": "nodejs", "repo": "googleapis/nodejs-datacatalog", "distribution_name": "@google-cloud/datacatalog", diff --git a/packages/google-cloud-datacatalog/README.md b/packages/google-cloud-datacatalog/README.md index 571cb92b2c7..dfcb2096a04 100644 --- a/packages/google-cloud-datacatalog/README.md +++ b/packages/google-cloud-datacatalog/README.md @@ -2,9 +2,9 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Data Catalog: Node.js Client](https://github.com/googleapis/nodejs-datacatalog) +# [Data Catalog: Node.js Client](https://github.com/googleapis/nodejs-datacatalog) -[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/datacatalog.svg)](https://www.npmjs.org/package/@google-cloud/datacatalog) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-datacatalog/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-datacatalog) @@ -14,8 +14,8 @@ Google Cloud Data Catalog API client for Node.js -* [Google Cloud Data Catalog Node.js Client API Reference][client-docs] -* [Google Cloud Data Catalog Documentation][product-docs] +* [Data Catalog Node.js Client API Reference][client-docs] +* [Data Catalog Documentation][product-docs] * [github.com/googleapis/nodejs-datacatalog](https://github.com/googleapis/nodejs-datacatalog) Read more about the client libraries for Cloud APIs, including the older @@ -41,7 +41,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. -1. [Enable the Google Cloud Data Catalog API][enable_api]. +1. [Enable the Data Catalog API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. @@ -55,7 +55,7 @@ npm install @google-cloud/datacatalog -The [Google Cloud Data Catalog Node.js Client API Reference][client-docs] documentation +The [Data Catalog Node.js Client API Reference][client-docs] documentation also contains samples. ## Versioning @@ -64,10 +64,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. -This library is considered to be in **alpha**. This means it is still a -work-in-progress and under active development. Any release is subject to -backwards-incompatible changes at any time. @@ -85,8 +86,8 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-datacatalog/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/datacatalog/latest/ -[product-docs]: https://cloud.google.com/datacatalog +[client-docs]: https://googleapis.dev/nodejs/datacatalog/latest +[product-docs]: https://cloud.google.com/data-catalog/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing diff --git a/packages/google-cloud-datacatalog/package.json b/packages/google-cloud-datacatalog/package.json index c05e898cde2..b53d5c8b5dc 100644 --- a/packages/google-cloud-datacatalog/package.json +++ b/packages/google-cloud-datacatalog/package.json @@ -25,35 +25,33 @@ "Google Cloud Data Catalog API" ], "dependencies": { - "google-gax": "^0.25.3", - "lodash.merge": "^4.6.0" + "google-gax": "^1.1.2" }, "devDependencies": { - "codecov": "^3.2.0", - "eslint": "^5.14.1", - "eslint-config-prettier": "^4.0.0", - "eslint-plugin-node": "^8.0.0", - "eslint-plugin-prettier": "^3.0.0", - "jsdoc": "^3.5.5", - "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", - "linkinator": "^1.1.6", - "mocha": "^5.2.0", - "power-assert": "^1.6.1", - "through2": "^2.0.3" + "c8": "^5.0.1", + "chai": "^4.2.0", + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-plugin-node": "^9.0.1", + "eslint-plugin-prettier": "^3.0.1", + "jsdoc": "^3.6.2", + "jsdoc-baseline": "^0.1.0", + "linkinator": "^1.4.0", + "mocha": "^6.1.4", + "prettier": "^1.17.0" }, "scripts": { "docs": "jsdoc -c .jsdoc.js", - "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "eslint '**/*.js'", - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "system-test": "mocha system-test --timeout 600000", - "test": "nyc mocha", + "fix": "eslint . --fix", + "lint": "eslint .", + "test": "c8 mocha test/*.js", "predocs-test": "npm run docs", - "docs-test": "linkinator docs -r --skip www.googleapis.com", - "fix": "eslint --fix '**/*.js'" + "docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/datacatalog|googleapis.dev/nodejs/datacatalog/latest|cloud.google.com/data-catalog/docs/how-to/search-reference'", + "samples-test": "c8 mocha samples/test/*.js", + "system-test": "c8 mocha --timeout=5000 system-test/*.js" }, "license": "Apache-2.0", "engines": { - "node": ">=6.0.0" + "node": ">=8.10.0" } } diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto index 2080abaf460..e89e7ad6267 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto @@ -48,8 +48,13 @@ service DataCatalog { // the complete resource, only the resource identifier and high level // fields. Clients can subsequentally call Get methods. // + // Note that searches do not have full recall. There may be results that match + // your query but are not returned, even in subsequent pages of results. These + // missing results may vary across repeated calls to search. Do not rely on + // this method if you need to guarantee full recall. + // // See [Data Catalog Search - // Syntax](/data-catalog/docs/how-to/search-reference) + // Syntax](/data-catalog/docs/how-to/search-reference) for more information. rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { option (google.api.http) = { post: "/v1beta1/catalog:search" @@ -294,8 +299,7 @@ message SearchCatalogRequest { //
  • last_access_timestamp [asc|desc], defaults to descending if not // specified,
  • //
  • last_modified_timestamp [asc|desc], defaults to descending if not - // specified,
  • - //
  • title [asc|desc], defaults to ascending if not specified.
  • + // specified. // string order_by = 5; } @@ -384,6 +388,8 @@ message Entry { // [UpdateEntryRequest][google.cloud.datacatalog.v1beta1.UpdateEntryRequest]. // The Data Catalog resource name of the entry in URL format. For example, // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}". + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. string name = 1; // Output only. The full name of the cloud resource the entry belongs to. See: @@ -433,7 +439,9 @@ message Entry { // [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. message CreateTagTemplateRequest { // Required. The name of the project and the location this template is in. - // Example: "projects/{project_id}/locations/{location}". + // Example: "projects/{project_id}/locations/{location}". Note that this + // TagTemplate and its child resources may not actually be stored in the + // location in this name. string parent = 1; // Required. The id of the tag template to create. @@ -487,6 +495,8 @@ message CreateTagRequest { // The name of the resource to attach this tag to. Tags can be attached to // Entries. (example: // "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}"). + // Note that this Tag and its child resources may not actually be stored in + // the location in this name. string parent = 1; // Required. The tag to create. @@ -518,6 +528,8 @@ message DeleteTagRequest { message CreateTagTemplateFieldRequest { // Required. The name of the project this template is in. Example: // "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}". + // Note that this TagTemplateField may not actually be stored in the location + // in this name. string parent = 1; // Required. The id of the tag template field to create. diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/tags.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/tags.proto index 882a635771d..f01843c206e 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/tags.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/tags.proto @@ -25,13 +25,14 @@ option java_multiple_files = true; option java_package = "com.google.cloud.datacatalog"; // Tags are used to attach custom metadata to Data Catalog resources. Tags -// conform to the specifications within their Tag Template. +// conform to the specifications within their tag template. message Tag { // Required when used in // [UpdateTagRequest][google.cloud.datacatalog.v1beta1.UpdateTagRequest]. The // resource name of the tag in URL format. For example, // projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}", - // where tag_id is a system-generated identifier. + // where tag_id is a system-generated identifier. Note that this Tag may not + // actually be stored in the location in this name. string name = 1; // Required. The resource name of the tag template that this tag uses. For @@ -94,21 +95,16 @@ message TagField { } } -// Tag Templates provide the basic format of multiple fields which can be -// attached to Data Catalog resources as Tags. -// -// Tag Templates can be used as a data glossary as tag templates define the -// list of acceptable fields that can be applied within a Tag. When a Tag is -// applied to a resource, the Tag Template defines the mapping of accepted field -// names & types that can be used within the Tag. -// -// A Tag Template also allows you to make Tags using that template visible only -// to a certain group of users. +// Tag templates defines the schema of the tags used to attach to Data Catalog +// resources. It defines the mapping of accepted field names and types that can +// be used within the tag. The tag template also controls the access to the tag. message TagTemplate { // Required when used in // [UpdateTagTemplateRequest][google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest]. // The resource name of the tag template in URL format. For example, // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}. + // Note that this TagTemplate and its child resources may not actually be + // stored in the location in this name. string name = 1; // Optional. The display name for this template. Default value is an empty @@ -116,17 +112,17 @@ message TagTemplate { string display_name = 2; // Required. Map of tag template field ids to the settings for the field. - // This map is an exhaustive list of allowed fields. This map must contain at - // least one field and at most 100 fields. + // This map is an exhaustive list of the allowed fields. This map must contain + // at least one field and at most 500 fields. // - // The keys to this map are tag template field IDs. Field IDs can - // contain letters (both uppercase and lowercase), numbers (0-9), and - // underscores (_). Field IDs must be at least 1 character long and at most - // 64 characters long. Field IDs must start with a letter or number. + // The keys to this map are tag template field IDs. Field IDs can contain + // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). + // Field IDs must be at least 1 character long and at most 64 characters long. + // Field IDs must start with a letter or underscore. map fields = 3; } -// The template for an individual field within a TagTemplate. +// The template for an individual field within a tag template. message TagTemplateField { // Optional. The display name for this field. Default value is an empty // string. diff --git a/packages/google-cloud-datacatalog/samples/.eslintrc.yml b/packages/google-cloud-datacatalog/samples/.eslintrc.yml new file mode 100644 index 00000000000..674e33fb9fa --- /dev/null +++ b/packages/google-cloud-datacatalog/samples/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +rules: + no-console: off + node/no-missing-require: off + node/no-extraneous-require: off diff --git a/packages/google-cloud-datacatalog/src/index.js b/packages/google-cloud-datacatalog/src/index.js index dc549a47677..9720019f1be 100644 --- a/packages/google-cloud-datacatalog/src/index.js +++ b/packages/google-cloud-datacatalog/src/index.js @@ -15,6 +15,19 @@ /** * @namespace google */ +/** + * @namespace google.iam.v1 + */ +/** + * @namespace google.protobuf + */ +/** + * @namespace google.iam.v1 + */ +/** + * @namespace google.type + */ + /** * @namespace google.cloud */ diff --git a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js index d3a5581992a..dca3fa979db 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js @@ -60,9 +60,7 @@ class DataCatalogClient { this._descriptors = {}; const servicePath = - opts.servicePath || - opts.apiEndpoint || - this.constructor.servicePath; + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; // Ensure that options include the service address and port. opts = Object.assign( @@ -96,9 +94,7 @@ class DataCatalogClient { // Load the applicable protos. const protos = gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), - [ - 'google/cloud/datacatalog/v1beta1/datacatalog.proto' - ] + ['google/cloud/datacatalog/v1beta1/datacatalog.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -131,11 +127,7 @@ class DataCatalogClient { 'nextPageToken', 'results' ), - listTags: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'tags' - ), + listTags: new gax.PageDescriptor('pageToken', 'nextPageToken', 'tags'), }; // Put together the default options sent with requests. @@ -227,9 +219,7 @@ class DataCatalogClient { * in this service. */ static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; + return ['https://www.googleapis.com/auth/cloud-platform']; } /** @@ -254,8 +244,13 @@ class DataCatalogClient { * the complete resource, only the resource identifier and high level * fields. Clients can subsequentally call Get methods. * + * Note that searches do not have full recall. There may be results that match + * your query but are not returned, even in subsequent pages of results. These + * missing results may vary across repeated calls to search. Do not rely on + * this method if you need to guarantee full recall. + * * See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information. * * @param {Object} request * The request object that will be sent. @@ -290,8 +285,7 @@ class DataCatalogClient { *
  • last_access_timestamp [asc|desc], defaults to descending if not * specified,
  • *
  • last_modified_timestamp [asc|desc], defaults to descending if not - * specified,
  • - *
  • title [asc|desc], defaults to ascending if not specified.
  • + * specified. * * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -430,8 +424,7 @@ class DataCatalogClient { *
  • last_access_timestamp [asc|desc], defaults to descending if not * specified,
  • *
  • last_modified_timestamp [asc|desc], defaults to descending if not - * specified,
  • - *
  • title [asc|desc], defaults to ascending if not specified.
  • + * specified. * * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -468,7 +461,7 @@ class DataCatalogClient { request, options ); - }; + } /** * Updates an existing entry. @@ -531,10 +524,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'entry.name': request.entry.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'entry.name': request.entry.name, + }); return this._innerApiCalls.updateEntry(request, options, callback); } @@ -584,10 +578,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getEntry(request, options, callback); } @@ -666,7 +661,9 @@ class DataCatalogClient { * The request object that will be sent. * @param {string} request.parent * Required. The name of the project and the location this template is in. - * Example: "projects/{project_id}/locations/{location}". + * Example: "projects/{project_id}/locations/{location}". Note that this + * TagTemplate and its child resources may not actually be stored in the + * location in this name. * @param {string} request.tagTemplateId * Required. The id of the tag template to create. * @param {Object} request.tagTemplate @@ -717,10 +714,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'parent': request.parent - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createTagTemplate(request, options, callback); } @@ -770,10 +768,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getTagTemplate(request, options, callback); } @@ -836,10 +835,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'tag_template.name': request.tagTemplate.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'tag_template.name': request.tagTemplate.name, + }); return this._innerApiCalls.updateTagTemplate(request, options, callback); } @@ -890,10 +890,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteTagTemplate(request, options, callback); } @@ -906,6 +907,8 @@ class DataCatalogClient { * @param {string} request.parent * Required. The name of the project this template is in. Example: * "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}". + * Note that this TagTemplateField may not actually be stored in the location + * in this name. * @param {string} request.tagTemplateFieldId * Required. The id of the tag template field to create. * Field ids can contain letters (both uppercase and lowercase), numbers @@ -960,12 +963,17 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'parent': request.parent - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); - return this._innerApiCalls.createTagTemplateField(request, options, callback); + return this._innerApiCalls.createTagTemplateField( + request, + options, + callback + ); } /** @@ -1037,12 +1045,17 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); - return this._innerApiCalls.updateTagTemplateField(request, options, callback); + return this._innerApiCalls.updateTagTemplateField( + request, + options, + callback + ); } /** @@ -1098,12 +1111,17 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); - return this._innerApiCalls.renameTagTemplateField(request, options, callback); + return this._innerApiCalls.renameTagTemplateField( + request, + options, + callback + ); } /** @@ -1152,12 +1170,17 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); - return this._innerApiCalls.deleteTagTemplateField(request, options, callback); + return this._innerApiCalls.deleteTagTemplateField( + request, + options, + callback + ); } /** @@ -1170,6 +1193,8 @@ class DataCatalogClient { * The name of the resource to attach this tag to. Tags can be attached to * Entries. (example: * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}"). + * Note that this Tag and its child resources may not actually be stored in + * the location in this name. * @param {Object} request.tag * Required. The tag to create. * @@ -1216,10 +1241,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'parent': request.parent - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createTag(request, options, callback); } @@ -1276,10 +1302,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'tag.name': request.tag.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'tag.name': request.tag.name, + }); return this._innerApiCalls.updateTag(request, options, callback); } @@ -1321,10 +1348,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'name': request.name - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteTag(request, options, callback); } @@ -1422,10 +1450,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'parent': request.parent - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listTags(request, options, callback); } @@ -1484,7 +1513,7 @@ class DataCatalogClient { request, options ); - }; + } /** * Sets the access control policy for a resource. Replaces any existing @@ -1502,8 +1531,7 @@ class DataCatalogClient { * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy is being specified. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * @param {Object} request.policy * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a @@ -1553,10 +1581,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'resource': request.resource - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + resource: request.resource, + }); return this._innerApiCalls.setIamPolicy(request, options, callback); } @@ -1579,8 +1608,7 @@ class DataCatalogClient { * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. @@ -1618,10 +1646,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'resource': request.resource - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + resource: request.resource, + }); return this._innerApiCalls.getIamPolicy(request, options, callback); } @@ -1644,8 +1673,7 @@ class DataCatalogClient { * The request object that will be sent. * @param {string} request.resource * REQUIRED: The resource for which the policy detail is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * @param {string[]} request.permissions * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more @@ -1693,10 +1721,11 @@ class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'resource': request.resource - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + resource: request.resource, + }); return this._innerApiCalls.testIamPermissions(request, options, callback); } @@ -1799,9 +1828,7 @@ class DataCatalogClient { * @returns {String} - A string representing the project. */ matchProjectFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate - .match(entryName) - .project; + return this._pathTemplates.entryPathTemplate.match(entryName).project; } /** @@ -1812,9 +1839,7 @@ class DataCatalogClient { * @returns {String} - A string representing the location. */ matchLocationFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate - .match(entryName) - .location; + return this._pathTemplates.entryPathTemplate.match(entryName).location; } /** @@ -1825,9 +1850,7 @@ class DataCatalogClient { * @returns {String} - A string representing the entry_group. */ matchEntryGroupFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate - .match(entryName) - .entry_group; + return this._pathTemplates.entryPathTemplate.match(entryName).entry_group; } /** @@ -1838,9 +1861,7 @@ class DataCatalogClient { * @returns {String} - A string representing the entry. */ matchEntryFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate - .match(entryName) - .entry; + return this._pathTemplates.entryPathTemplate.match(entryName).entry; } /** @@ -1851,9 +1872,7 @@ class DataCatalogClient { * @returns {String} - A string representing the project. */ matchProjectFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate - .match(fieldName) - .project; + return this._pathTemplates.fieldPathTemplate.match(fieldName).project; } /** @@ -1864,9 +1883,7 @@ class DataCatalogClient { * @returns {String} - A string representing the location. */ matchLocationFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate - .match(fieldName) - .location; + return this._pathTemplates.fieldPathTemplate.match(fieldName).location; } /** @@ -1877,9 +1894,7 @@ class DataCatalogClient { * @returns {String} - A string representing the tag_template. */ matchTagTemplateFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate - .match(fieldName) - .tag_template; + return this._pathTemplates.fieldPathTemplate.match(fieldName).tag_template; } /** @@ -1890,9 +1905,7 @@ class DataCatalogClient { * @returns {String} - A string representing the field. */ matchFieldFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate - .match(fieldName) - .field; + return this._pathTemplates.fieldPathTemplate.match(fieldName).field; } /** @@ -1903,9 +1916,7 @@ class DataCatalogClient { * @returns {String} - A string representing the project. */ matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate - .match(locationName) - .project; + return this._pathTemplates.locationPathTemplate.match(locationName).project; } /** @@ -1916,8 +1927,7 @@ class DataCatalogClient { * @returns {String} - A string representing the location. */ matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate - .match(locationName) + return this._pathTemplates.locationPathTemplate.match(locationName) .location; } @@ -1929,9 +1939,7 @@ class DataCatalogClient { * @returns {String} - A string representing the project. */ matchProjectFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate - .match(tagName) - .project; + return this._pathTemplates.tagPathTemplate.match(tagName).project; } /** @@ -1942,9 +1950,7 @@ class DataCatalogClient { * @returns {String} - A string representing the location. */ matchLocationFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate - .match(tagName) - .location; + return this._pathTemplates.tagPathTemplate.match(tagName).location; } /** @@ -1955,9 +1961,7 @@ class DataCatalogClient { * @returns {String} - A string representing the entry_group. */ matchEntryGroupFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate - .match(tagName) - .entry_group; + return this._pathTemplates.tagPathTemplate.match(tagName).entry_group; } /** @@ -1968,9 +1972,7 @@ class DataCatalogClient { * @returns {String} - A string representing the entry. */ matchEntryFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate - .match(tagName) - .entry; + return this._pathTemplates.tagPathTemplate.match(tagName).entry; } /** @@ -1981,9 +1983,7 @@ class DataCatalogClient { * @returns {String} - A string representing the tag. */ matchTagFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate - .match(tagName) - .tag; + return this._pathTemplates.tagPathTemplate.match(tagName).tag; } /** @@ -1994,8 +1994,7 @@ class DataCatalogClient { * @returns {String} - A string representing the project. */ matchProjectFromTagTemplateName(tagTemplateName) { - return this._pathTemplates.tagTemplatePathTemplate - .match(tagTemplateName) + return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) .project; } @@ -2007,8 +2006,7 @@ class DataCatalogClient { * @returns {String} - A string representing the location. */ matchLocationFromTagTemplateName(tagTemplateName) { - return this._pathTemplates.tagTemplatePathTemplate - .match(tagTemplateName) + return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) .location; } @@ -2020,11 +2018,9 @@ class DataCatalogClient { * @returns {String} - A string representing the tag_template. */ matchTagTemplateFromTagTemplateName(tagTemplateName) { - return this._pathTemplates.tagTemplatePathTemplate - .match(tagTemplateName) + return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) .tag_template; } } - module.exports = DataCatalogClient; diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_datacatalog.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_datacatalog.js index 1344c6e643d..b4894815e70 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_datacatalog.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_datacatalog.js @@ -58,8 +58,7 @@ *
  • last_access_timestamp [asc|desc], defaults to descending if not * specified,
  • *
  • last_modified_timestamp [asc|desc], defaults to descending if not - * specified,
  • - *
  • title [asc|desc], defaults to ascending if not specified.
  • + * specified. * * * @typedef SearchCatalogRequest @@ -221,6 +220,8 @@ const LookupEntryRequest = { * UpdateEntryRequest. * The Data Catalog resource name of the entry in URL format. For example, * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}". + * Note that this Entry and its child resources may not actually be stored in + * the location in this name. * * @property {string} linkedResource * Output only. The full name of the cloud resource the entry belongs to. See: @@ -285,7 +286,9 @@ const Entry = { * * @property {string} parent * Required. The name of the project and the location this template is in. - * Example: "projects/{project_id}/locations/{location}". + * Example: "projects/{project_id}/locations/{location}". Note that this + * TagTemplate and its child resources may not actually be stored in the + * location in this name. * * @property {string} tagTemplateId * Required. The id of the tag template to create. @@ -377,6 +380,8 @@ const DeleteTagTemplateRequest = { * The name of the resource to attach this tag to. Tags can be attached to * Entries. (example: * "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}"). + * Note that this Tag and its child resources may not actually be stored in + * the location in this name. * * @property {Object} tag * Required. The tag to create. @@ -438,6 +443,8 @@ const DeleteTagRequest = { * @property {string} parent * Required. The name of the project this template is in. Example: * "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}". + * Note that this TagTemplateField may not actually be stored in the location + * in this name. * * @property {string} tagTemplateFieldId * Required. The id of the tag template field to create. diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_gcs_fileset_spec.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_gcs_fileset_spec.js index b8f3d8f3dac..0e9ef4e429e 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_gcs_fileset_spec.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_gcs_fileset_spec.js @@ -37,7 +37,6 @@ * * @typedef GcsFilesetSpec * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.GcsFilesetSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto} */ const GcsFilesetSpec = { // This is for documentation. Actual contents will be loaded by gRPC. @@ -59,7 +58,8 @@ const GcsFilesetSpec = { * * @typedef GcsFileSpec * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.GcsFileSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto} + + */ const GcsFileSpec = { // This is for documentation. Actual contents will be loaded by gRPC. diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_tags.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_tags.js index f76a09d9357..fb522a9f3bb 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_tags.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_tags.js @@ -17,14 +17,15 @@ /** * Tags are used to attach custom metadata to Data Catalog resources. Tags - * conform to the specifications within their Tag Template. + * conform to the specifications within their tag template. * * @property {string} name * Required when used in * UpdateTagRequest. The * resource name of the tag in URL format. For example, * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}", - * where tag_id is a system-generated identifier. + * where tag_id is a system-generated identifier. Note that this Tag may not + * actually be stored in the location in this name. * * @property {string} template * Required. The resource name of the tag template that this tag uses. For @@ -105,22 +106,17 @@ const TagField = { }; /** - * Tag Templates provide the basic format of multiple fields which can be - * attached to Data Catalog resources as Tags. - * - * Tag Templates can be used as a data glossary as tag templates define the - * list of acceptable fields that can be applied within a Tag. When a Tag is - * applied to a resource, the Tag Template defines the mapping of accepted field - * names & types that can be used within the Tag. - * - * A Tag Template also allows you to make Tags using that template visible only - * to a certain group of users. + * Tag templates defines the schema of the tags used to attach to Data Catalog + * resources. It defines the mapping of accepted field names and types that can + * be used within the tag. The tag template also controls the access to the tag. * * @property {string} name * Required when used in * UpdateTagTemplateRequest. * The resource name of the tag template in URL format. For example, * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}. + * Note that this TagTemplate and its child resources may not actually be + * stored in the location in this name. * * @property {string} displayName * Optional. The display name for this template. Default value is an empty @@ -128,13 +124,13 @@ const TagField = { * * @property {Object.} fields * Required. Map of tag template field ids to the settings for the field. - * This map is an exhaustive list of allowed fields. This map must contain at - * least one field and at most 100 fields. + * This map is an exhaustive list of the allowed fields. This map must contain + * at least one field and at most 500 fields. * - * The keys to this map are tag template field IDs. Field IDs can - * contain letters (both uppercase and lowercase), numbers (0-9), and - * underscores (_). Field IDs must be at least 1 character long and at most - * 64 characters long. Field IDs must start with a letter or number. + * The keys to this map are tag template field IDs. Field IDs can contain + * letters (both uppercase and lowercase), numbers (0-9) and underscores (_). + * Field IDs must be at least 1 character long and at most 64 characters long. + * Field IDs must start with a letter or underscore. * * @typedef TagTemplate * @memberof google.cloud.datacatalog.v1beta1 @@ -145,7 +141,7 @@ const TagTemplate = { }; /** - * The template for an individual field within a TagTemplate. + * The template for an individual field within a tag template. * * @property {string} displayName * Optional. The display name for this field. Default value is an empty diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_iam_policy.js index 12b7ac5df09..d675b1b0d54 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_iam_policy.js @@ -20,8 +20,7 @@ * * @property {string} resource * REQUIRED: The resource for which the policy is being specified. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * * @property {Object} policy * REQUIRED: The complete policy to be applied to the `resource`. The size of @@ -44,8 +43,7 @@ const SetIamPolicyRequest = { * * @property {string} resource * REQUIRED: The resource for which the policy is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * * @typedef GetIamPolicyRequest * @memberof google.iam.v1 @@ -60,8 +58,7 @@ const GetIamPolicyRequest = { * * @property {string} resource * REQUIRED: The resource for which the policy detail is being requested. - * `resource` is usually specified as a path. For example, a Project - * resource is specified as `projects/{project}`. + * See the operation documentation for the appropriate value for this field. * * @property {string[]} permissions * The set of permissions to check for the `resource`. Permissions with diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_policy.js index b81800abfca..e58c2122510 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_policy.js @@ -20,12 +20,12 @@ * specify access control policies for Cloud Platform resources. * * - * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + * A `Policy` consists of a list of `bindings`. A `binding` binds a list of * `members` to a `role`, where the members can be user accounts, Google groups, * Google domains, and service accounts. A `role` is a named list of permissions * defined by IAM. * - * **Example** + * **JSON Example** * * { * "bindings": [ @@ -35,7 +35,7 @@ * "user:mike@example.com", * "group:admins@example.com", * "domain:google.com", - * "serviceAccount:my-other-app@appspot.gserviceaccount.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" * ] * }, * { @@ -45,15 +45,28 @@ * ] * } * + * **YAML Example** + * + * bindings: + * - members: + * - user:mike@example.com + * - group:admins@example.com + * - domain:google.com + * - serviceAccount:my-other-app@appspot.gserviceaccount.com + * role: roles/owner + * - members: + * - user:sean@example.com + * role: roles/viewer + * + * * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam). + * [IAM developer's guide](https://cloud.google.com/iam/docs). * * @property {number} version - * Version of the `Policy`. The default version is 0. + * Deprecated. * * @property {Object[]} bindings * Associates a list of `members` to a `role`. - * Multiple `bindings` must not be specified for the same `role`. * `bindings` with no members will result in an error. * * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} @@ -84,7 +97,6 @@ const Policy = { * @property {string} role * Role that is assigned to `members`. * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * Required * * @property {string[]} members * Specifies the identities requesting access for a Cloud Platform resource. @@ -97,7 +109,7 @@ const Policy = { * who is authenticated with a Google account or a service account. * * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@gmail.com` or `joe@example.com`. + * account. For example, `alice@gmail.com` . * * * * `serviceAccount:{emailid}`: An email address that represents a service @@ -106,9 +118,18 @@ const Policy = { * * `group:{emailid}`: An email address that represents a Google group. * For example, `admins@example.com`. * - * * `domain:{domain}`: A Google Apps domain name that represents all the + * + * * `domain:{domain}`: The G Suite domain (primary) that represents all the * users of that domain. For example, `google.com` or `example.com`. * + * @property {Object} condition + * The condition that is associated with this binding. + * NOTE: An unsatisfied condition will not allow user access via current + * binding. Different bindings, including their conditions, are examined + * independently. + * + * This object should have the same structure as [Expr]{@link google.type.Expr} + * * @typedef Binding * @memberof google.iam.v1 * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/type/doc_expr.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/type/doc_expr.js new file mode 100644 index 00000000000..421a7ee9e6a --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/type/doc_expr.js @@ -0,0 +1,51 @@ +// Copyright 2019 Google LLC +// +// 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 +// +// https://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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * Represents an expression text. Example: + * + * title: "User account presence" + * description: "Determines whether the request has a user account" + * expression: "size(request.user) > 0" + * + * @property {string} expression + * Textual representation of an expression in + * Common Expression Language syntax. + * + * The application context of the containing message determines which + * well-known feature set of CEL is supported. + * + * @property {string} title + * An optional title for the expression, i.e. a short string describing + * its purpose. This can be used e.g. in UIs which allow to enter the + * expression. + * + * @property {string} description + * An optional description of the expression. This is a longer text which + * describes the expression, e.g. when hovered over it in a UI. + * + * @property {string} location + * An optional string indicating the location of the expression for error + * reporting, e.g. a file name and a position in the file. + * + * @typedef Expr + * @memberof google.type + * @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto} + */ +const Expr = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/synth.metadata b/packages/google-cloud-datacatalog/synth.metadata index 73e4e944809..2b92e9b9aad 100644 --- a/packages/google-cloud-datacatalog/synth.metadata +++ b/packages/google-cloud-datacatalog/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-19T11:10:00.217449Z", + "updateTime": "2019-06-20T19:36:39.059187Z", "sources": [ { "generator": { "name": "artman", - "version": "0.28.0", - "dockerImage": "googleapis/artman@sha256:6ced5a36b08b82a328c69844e629300d58c14067f25cadab47f52542bdef7daf" + "version": "0.29.0", + "dockerImage": "googleapis/artman@sha256:b79c8c20ee51e5302686c9d1294672d59290df1489be93749ef17d0172cc508d" } }, { "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "4299d819fab0c8c7fc5829b988d55083409d6a8b", - "internalRef": "253898467" + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "45e125f9e30dc5d45b52752b3ab78dd4f6084f2d", + "internalRef": "254026509" } }, { @@ -27,7 +27,7 @@ "destinations": [ { "client": { - "source": "googleapis-private", + "source": "googleapis", "apiName": "datacatalog", "apiVersion": "v1beta1", "language": "nodejs", diff --git a/packages/google-cloud-datacatalog/synth.py b/packages/google-cloud-datacatalog/synth.py index a4d5fd9fd2f..577c1901db0 100644 --- a/packages/google-cloud-datacatalog/synth.py +++ b/packages/google-cloud-datacatalog/synth.py @@ -25,14 +25,43 @@ gapic = gcp.GAPICGenerator() versions = ['v1beta1'] for version in versions: - library = gapic.node_library('datacatalog', version, private=True) - s.copy(library, excludes=['README.md', 'src/index.js', 'package.json']) + library = gapic.node_library('datacatalog', version, private=False) + s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() templates = common_templates.node_library() s.copy(templates) +# cleanup some hiccups in jsdoc comments. +s.replace("src/index.js", +r"""\/\*\* + \* @namespace google + \*/""", +r""" +/** + * @namespace google + */ +/** + * @namespace google.iam.v1 + */ +/** + * @namespace google.protobuf + */ +/** + * @namespace google.iam.v1 + */ +/** + * @namespace google.type + */ +""") + +s.replace("src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_gcs_fileset_spec.js", +r"""\* @see \[google.cloud.datacatalog.v1beta1.GcsFileSpec definition in proto format\]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto} +""", +r""" +""") + # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) diff --git a/packages/google-cloud-datacatalog/system-test/.eslintrc.yml b/packages/google-cloud-datacatalog/system-test/.eslintrc.yml new file mode 100644 index 00000000000..becdbd1640b --- /dev/null +++ b/packages/google-cloud-datacatalog/system-test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + no-console: off \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/test/.eslintrc.yml b/packages/google-cloud-datacatalog/test/.eslintrc.yml new file mode 100644 index 00000000000..e28757c0a59 --- /dev/null +++ b/packages/google-cloud-datacatalog/test/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +env: + mocha: true \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/test/gapic-v1beta1.js b/packages/google-cloud-datacatalog/test/gapic-v1beta1.js index 4e68993569f..d059c47e7de 100644 --- a/packages/google-cloud-datacatalog/test/gapic-v1beta1.js +++ b/packages/google-cloud-datacatalog/test/gapic-v1beta1.js @@ -69,7 +69,11 @@ describe('DataCatalogClient', () => { }; // Mock Grpc layer - client._innerApiCalls.searchCatalog = (actualRequest, options, callback) => { + client._innerApiCalls.searchCatalog = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.results); }; @@ -185,7 +189,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + const formattedName = client.entryPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); const request = { name: formattedName, }; @@ -222,7 +231,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + const formattedName = client.entryPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); const request = { name: formattedName, }; @@ -381,7 +395,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedName = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const request = { name: formattedName, }; @@ -414,7 +432,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedName = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const request = { name: formattedName, }; @@ -505,7 +527,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedName = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const force = false; const request = { name: formattedName, @@ -528,7 +554,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedName = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const force = false; const request = { name: formattedName, @@ -558,7 +588,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedParent = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedParent = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const tagTemplateFieldId = 'tagTemplateFieldId-92144832'; const tagTemplateField = {}; const request = { @@ -593,7 +627,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedParent = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedParent = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const tagTemplateFieldId = 'tagTemplateFieldId-92144832'; const tagTemplateField = {}; const request = { @@ -626,7 +664,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + const formattedName = client.fieldPath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); const tagTemplateField = {}; const request = { name: formattedName, @@ -659,7 +702,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + const formattedName = client.fieldPath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); const tagTemplateField = {}; const request = { name: formattedName, @@ -690,7 +738,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + const formattedName = client.fieldPath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); const newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; const request = { name: formattedName, @@ -723,7 +776,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + const formattedName = client.fieldPath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); const newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; const request = { name: formattedName, @@ -754,7 +812,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + const formattedName = client.fieldPath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); const force = false; const request = { name: formattedName, @@ -762,7 +825,9 @@ describe('DataCatalogClient', () => { }; // Mock Grpc layer - client._innerApiCalls.deleteTagTemplateField = mockSimpleGrpcMethod(request); + client._innerApiCalls.deleteTagTemplateField = mockSimpleGrpcMethod( + request + ); client.deleteTagTemplateField(request, err => { assert.ifError(err); @@ -777,7 +842,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); + const formattedName = client.fieldPath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]', + '[FIELD]' + ); const force = false; const request = { name: formattedName, @@ -807,7 +877,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + const formattedParent = client.entryPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); const tag = {}; const request = { parent: formattedParent, @@ -846,7 +921,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + const formattedParent = client.entryPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); const tag = {}; const request = { parent: formattedParent, @@ -943,7 +1023,13 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.tagPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]', '[TAG]'); + const formattedName = client.tagPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]', + '[TAG]' + ); const request = { name: formattedName, }; @@ -964,7 +1050,13 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedName = client.tagPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]', '[TAG]'); + const formattedName = client.tagPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]', + '[TAG]' + ); const request = { name: formattedName, }; @@ -992,7 +1084,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + const formattedParent = client.entryPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); const request = { parent: formattedParent, }; @@ -1026,7 +1123,12 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); + const formattedParent = client.entryPath( + '[PROJECT]', + '[LOCATION]', + '[ENTRY_GROUP]', + '[ENTRY]' + ); const request = { parent: formattedParent, }; @@ -1055,7 +1157,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedResource = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const policy = {}; const request = { resource: formattedResource, @@ -1090,7 +1196,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedResource = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const policy = {}; const request = { resource: formattedResource, @@ -1121,7 +1231,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedResource = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const request = { resource: formattedResource, }; @@ -1154,7 +1268,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedResource = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const request = { resource: formattedResource, }; @@ -1183,7 +1301,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedResource = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const permissions = []; const request = { resource: formattedResource, @@ -1213,7 +1335,11 @@ describe('DataCatalogClient', () => { }); // Mock request - const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); + const formattedResource = client.tagTemplatePath( + '[PROJECT]', + '[LOCATION]', + '[TAG_TEMPLATE]' + ); const permissions = []; const request = { resource: formattedResource, @@ -1235,7 +1361,6 @@ describe('DataCatalogClient', () => { }); }); }); - }); function mockSimpleGrpcMethod(expectedRequest, response, error) {