diff --git a/packages/google-cloud-datacatalog/.jsdoc.js b/packages/google-cloud-datacatalog/.jsdoc.js index 45add1225c0..b5cc979a7f1 100644 --- a/packages/google-cloud-datacatalog/.jsdoc.js +++ b/packages/google-cloud-datacatalog/.jsdoc.js @@ -32,7 +32,7 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src' ], includePattern: '\\.js$' }, diff --git a/packages/google-cloud-datacatalog/package.json b/packages/google-cloud-datacatalog/package.json index be7ca3d2468..76884c2ec6c 100644 --- a/packages/google-cloud-datacatalog/package.json +++ b/packages/google-cloud-datacatalog/package.json @@ -4,10 +4,10 @@ "version": "1.3.0", "author": "Google LLC", "description": "Google Cloud Data Catalog API client for Node.js", - "main": "src/index.js", + "main": "build/src/index.js", "files": [ - "protos", - "src", + "build/src", + "build/protos", "AUTHORS", "COPYING" ], @@ -28,28 +28,37 @@ "google-gax": "^1.7.5" }, "devDependencies": { + "@types/mocha": "^5.2.7", + "@types/node": "^10.0.3", "c8": "^6.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.1", + "gts": "^1.1.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.4.0", "mocha": "^6.1.4", - "prettier": "^1.17.0" + "pack-n-play": "^1.0.0-2", + "prettier": "^1.17.0", + "typescript": "~3.7.0" }, "scripts": { "docs": "jsdoc -c .jsdoc.js", - "fix": "eslint . --fix", - "lint": "eslint .", - "test": "c8 mocha test/*.js", + "fix": "gts fix && eslint . --fix", + "lint": "gts check && eslint .", + "test": "c8 mocha build/test/*.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "samples-test": "c8 mocha samples/test/*.js", - "system-test": "c8 mocha --timeout=5000 system-test/*.js" + "system-test": "c8 mocha --timeout=5000 build/system-test/*.js", + "compile": "tsc -p . && cp -r protos build/", + "prepare": "npm run compile", + "pretest": "npm run compile", + "posttest": "npm run lint" }, "license": "Apache-2.0", "engines": { diff --git a/packages/google-cloud-datacatalog/prettier.config.js b/packages/google-cloud-datacatalog/prettier.config.js new file mode 100644 index 00000000000..a425d3f7618 --- /dev/null +++ b/packages/google-cloud-datacatalog/prettier.config.js @@ -0,0 +1,4 @@ +module.exports = { + singleQuote: true, + trailingComma: 'es5', +}; 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 8b67be1a0d2..b725b20f9c6 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 @@ -35,14 +35,13 @@ import "google/protobuf/field_mask.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // Data Catalog API service allows clients to discover, understand, and manage // their data. service DataCatalog { option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Searches Data Catalog for multiple resources like entries, tags that // match a query. @@ -95,8 +94,7 @@ service DataCatalog { // deleted. The user should enable the Data Catalog API in the project // identified by the `name` parameter (see [Data Catalog Resource Project] // (/data-catalog/docs/concepts/resource-project) for more information). - rpc DeleteEntryGroup(DeleteEntryGroupRequest) - returns (google.protobuf.Empty) { + rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" }; @@ -169,8 +167,7 @@ service DataCatalog { post: "/v1beta1/{parent=projects/*/locations/*}/tagTemplates" body: "tag_template" }; - option (google.api.method_signature) = - "parent,tag_template_id,tag_template"; + option (google.api.method_signature) = "parent,tag_template_id,tag_template"; } // Gets a tag template. @@ -200,8 +197,7 @@ service DataCatalog { // The user should enable the Data Catalog API in the project identified by // the `name` parameter (see [Data Catalog Resource Project] // (/data-catalog/docs/concepts/resource-project) for more information). - rpc DeleteTagTemplate(DeleteTagTemplateRequest) - returns (google.protobuf.Empty) { + rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" }; @@ -213,37 +209,32 @@ service DataCatalog { // [Data Catalog Resource // Project](/data-catalog/docs/concepts/resource-project) for more // information). - rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) - returns (TagTemplateField) { + rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields" body: "tag_template_field" }; - option (google.api.method_signature) = - "parent,tag_template_field_id,tag_template_field"; + option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; } // Updates a field in a tag template. This method cannot be used to update the // field type. The user should enable the Data Catalog API in the project // identified by the `name` parameter (see [Data Catalog Resource Project] // (/data-catalog/docs/concepts/resource-project) for more information). - rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) - returns (TagTemplateField) { + rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { patch: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" body: "tag_template_field" }; option (google.api.method_signature) = "name,tag_template_field"; - option (google.api.method_signature) = - "name,tag_template_field,update_mask"; + option (google.api.method_signature) = "name,tag_template_field,update_mask"; } // Renames a field in a tag template. The user should enable the Data Catalog // API in the project identified by the `name` parameter (see [Data Catalog // Resource Project](/data-catalog/docs/concepts/resource-project) for more // information). - rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) - returns (TagTemplateField) { + rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" body: "*" @@ -255,8 +246,7 @@ service DataCatalog { // The user should enable the Data Catalog API in the project identified by // the `name` parameter (see [Data Catalog Resource Project] // (/data-catalog/docs/concepts/resource-project) for more information). - rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) - returns (google.protobuf.Empty) { + rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" }; @@ -319,8 +309,7 @@ service DataCatalog { // templates. // - `datacatalog.entries.setIamPolicy` to set policies on entries. // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" body: "*" @@ -352,8 +341,7 @@ service DataCatalog { // templates. // - `datacatalog.entries.getIamPolicy` to get policies on entries. // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" body: "*" @@ -382,8 +370,7 @@ service DataCatalog { // // A caller is not required to have Google IAM permission to make this // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" body: "*" @@ -429,8 +416,7 @@ message SearchCatalogRequest { // Required. The scope of this search request. Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - // Required. The query string in search query syntax. The query must be - // non-empty. + // Required. The query string in search query syntax. The query must be non-empty. // // Query strings can be simple as "x" or more qualified as: // @@ -448,8 +434,8 @@ message SearchCatalogRequest { int32 page_size = 2; // Optional. Pagination token returned in an earlier - // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], - // which indicates that this is a continuation of a prior + // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which + // indicates that this is a continuation of a prior // [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] // call, and that the system should return the next page of data. If empty, // the first page is returned. @@ -495,6 +481,8 @@ message CreateEntryGroupRequest { ]; // Required. The id of the entry group to create. + // The id must begin with a letter or underscore, contain only English + // letters, numbers and underscores, and be at most 64 characters. string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; // The entry group to create. Defaults to an empty entry group. @@ -630,7 +618,8 @@ message LookupEntryRequest { // // * `cloud_pubsub.project_id.topic_id` // * ``pubsub.project_id.`topic.id.with.dots` `` - // * `bigquery.project_id.dataset_id.table_id` + // * `bigquery.table.project_id.dataset_id.table_id` + // * `bigquery.dataset.project_id.dataset_id` // * `datacatalog.project_id.location_id.entry_group_id.entry_id` // // `*_id`s shoud satisfy the standard SQL rules for identifiers. @@ -661,8 +650,8 @@ message Entry { // Note that this Entry and its child resources may not actually be stored in // the location in this name. string name = 1 [(google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - }]; + type: "datacatalog.googleapis.com/EntryGroup" + }]; // Output only. The resource this metadata entry refers to. // @@ -710,8 +699,7 @@ message Entry { // Output only. Timestamps about the underlying Google Cloud Platform // resource, not about this Data Catalog Entry. - SystemTimestamps source_system_timestamps = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; + SystemTimestamps source_system_timestamps = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // EntryGroup Metadata. @@ -740,10 +728,8 @@ message EntryGroup { // string. string description = 3; - // Output only. Timestamps about this EntryGroup. Default value is empty - // timestamps. - SystemTimestamps data_catalog_timestamps = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. + SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for @@ -842,8 +828,8 @@ message DeleteTagTemplateRequest { // Request message for // [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. message CreateTagRequest { - // Required. The name of the resource to attach this tag to. Tags can be - // attached to Entries. Example: + // Required. 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} // @@ -851,7 +837,9 @@ message CreateTagRequest { // the location in this name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Tag" } + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Tag" + } ]; // Required. The tag to create. @@ -907,8 +895,7 @@ message CreateTagTemplateFieldRequest { string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template field to create. - TagTemplateField tag_template_field = 3 - [(google.api.field_behavior) = REQUIRED]; + TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for @@ -925,8 +912,7 @@ message UpdateTagTemplateFieldRequest { ]; // Required. The template to update. - TagTemplateField tag_template_field = 2 - [(google.api.field_behavior) = REQUIRED]; + TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; // The field mask specifies the parts of the template to be updated. // Allowed fields: @@ -956,8 +942,7 @@ message RenameTagTemplateFieldRequest { } ]; - // Required. The new ID of this tag template field. For example, - // `my_new_field`. + // Required. The new ID of this tag template field. For example, `my_new_field`. string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto index e7397d05436..5fb5164d875 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto @@ -23,15 +23,20 @@ import "google/cloud/datacatalog/v1beta1/timestamps.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // Describes a Cloud Storage fileset entry. message GcsFilesetSpec { - // Required. Patterns to identify a set of files in Google Cloud Storage. + // Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud + // Storage documentation](storage/docs/gsutil/addlhelp/WildcardNames) for + // more information. Note that bucket wildcards are currently not supported. // // Examples of valid file_patterns: // - // * `gs://bucket_name/*`: matches all files in `bucket_name` + // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` + // directory. + // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + // spanning all subdirectories. // * `gs://bucket_name/file*`: matches files prefixed by `file` in // `bucket_name` // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match @@ -39,20 +44,18 @@ message GcsFilesetSpec { // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. Sample files contained in this fileset, not all files - // contained in this fileset are represented here. - repeated GcsFileSpec sample_gcs_file_specs = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Sample files contained in this fileset, not all files contained in this + // fileset are represented here. + repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Specifications of a single file in GCS. +// Specifications of a single file in Cloud Storage. message GcsFileSpec { // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. string file_path = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. Timestamps about the GCS file. - SystemTimestamps gcs_timestamps = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamps about the Cloud Storage file. + SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The size of the file, in bytes. int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto new file mode 100644 index 00000000000..f40fd6e256f --- /dev/null +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto @@ -0,0 +1,420 @@ +// 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1beta1/timestamps.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTagManagerProto"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; + +// The policy tag manager API service allows clients to manage their taxonomies +// and policy tags. +service PolicyTagManager { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a taxonomy in the specified project. + rpc CreateTaxonomy(CreateTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" + body: "taxonomy" + }; + option (google.api.method_signature) = "parent,taxonomy"; + } + + // Deletes a taxonomy. This operation will also delete all + // policy tags in this taxonomy along with their associated policies. + rpc DeleteTaxonomy(DeleteTaxonomyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a taxonomy. + rpc UpdateTaxonomy(UpdateTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + patch: "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}" + body: "taxonomy" + }; + option (google.api.method_signature) = "taxonomy"; + } + + // Lists all taxonomies in a project in a particular location that the caller + // has permission to view. + rpc ListTaxonomies(ListTaxonomiesRequest) returns (ListTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a taxonomy. + rpc GetTaxonomy(GetTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a policy tag in the specified taxonomy. + rpc CreatePolicyTag(CreatePolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" + body: "policy_tag" + }; + option (google.api.method_signature) = "parent,policy_tag"; + } + + // Deletes a policy tag. Also deletes all of its descendant policy tags. + rpc DeletePolicyTag(DeletePolicyTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a policy tag. + rpc UpdatePolicyTag(UpdatePolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + patch: "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}" + body: "policy_tag" + }; + option (google.api.method_signature) = "policy_tag"; + } + + // Lists all policy tags in a taxonomy. + rpc ListPolicyTags(ListPolicyTagsRequest) returns (ListPolicyTagsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a policy tag. + rpc GetPolicyTag(GetPolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the IAM policy for a taxonomy or a policy tag. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy" + body: "*" + } + }; + } + + // Sets the IAM policy for a taxonomy or a policy tag. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy" + body: "*" + } + }; + } + + // Returns the permissions that a caller has on the specified taxonomy or + // policy tag. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// A taxonomy is a collection of policy tags that classify data along a common +// axis. For instance a data *sensitivity* taxonomy could contain policy tags +// denoting PII such as age, zipcode, and SSN. A data *origin* taxonomy could +// contain policy tags to distinguish user data, employee data, partner data, +// public data. +message Taxonomy { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Taxonomy" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}" + }; + + // Defines policy types where policy tag can be used for. + enum PolicyType { + // Unspecified policy type. + POLICY_TYPE_UNSPECIFIED = 0; + + // Fine grained access control policy, which enables access control on + // tagged resources. + FINE_GRAINED_ACCESS_CONTROL = 1; + } + + // Output only. Resource name of this taxonomy, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User defined name of this taxonomy. It must: contain only unicode letters, + // numbers, underscores, dashes and spaces; not start or end with spaces; and + // be at most 200 bytes long when encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + repeated PolicyType activated_policy_types = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined +// in a hierarchy. For example, consider the following hierachy: +// Geolocation +// | +// ------------------------------------ +// | | | +// LatLong City ZipCode +// PolicyTag "Geolocation" contains three child policy tags: "LatLong", +// "City", and "ZipCode". +message PolicyTag { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/PolicyTag" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" + }; + + // Output only. Resource name of this policy tag, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and + // spaces; not start or end with spaces; and be at most 200 bytes long when + // encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Description of this policy tag. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + string description = 3; + + // Resource name of this policy tag's parent policy tag (e.g. for the + // "LatLong" policy tag in the example above, this field contains the + // resource name of the "Geolocation" policy tag). If empty, it means this + // policy tag is a top level policy tag (e.g. this field is empty for the + // "Geolocation" policy tag in the example above). If not set, defaults to an + // empty string. + string parent_policy_tag = 4; + + // Output only. Resource names of child policy tags of this policy tag. + repeated string child_policy_tags = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. +message CreateTaxonomyRequest { + // Required. Resource name of the project that the taxonomy will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // The taxonomy to be created. + Taxonomy taxonomy = 2; +} + +// Request message for +// [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. +message DeleteTaxonomyRequest { + // Required. Resource name of the taxonomy to be deleted. All policy tags in + // this taxonomy will also be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Request message for +// [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. +message UpdateTaxonomyRequest { + // The taxonomy to update. Only description, display_name, and activated + // policy types can be updated. + Taxonomy taxonomy = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. +message ListTaxonomiesRequest { + // Required. Resource name of the project to list the taxonomies of. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. If + // not set, defaults to an empty string. + string page_token = 3; +} + +// Response message for +// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. +message ListTaxonomiesResponse { + // Taxonomies that the project contains. + repeated Taxonomy taxonomies = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for +// [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. +message GetTaxonomyRequest { + // Required. Resource name of the requested taxonomy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Request message for +// [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. +message CreatePolicyTagRequest { + // Required. Resource name of the taxonomy that the policy tag will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // The policy tag to be created. + PolicyTag policy_tag = 2; +} + +// Request message for +// [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. +message DeletePolicyTagRequest { + // Required. Resource name of the policy tag to be deleted. All of its descendant + // policy tags will also be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; +} + +// Request message for +// [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. +message UpdatePolicyTagRequest { + // The policy tag to update. Only the description, display_name, and + // parent_policy_tag fields can be updated. + PolicyTag policy_tag = 1; + + // The update mask applies to the resource. Only display_name, description and + // parent_policy_tag can be updated and thus can be listed in the mask. If + // update_mask is not provided, all allowed fields (i.e. display_name, + // description and parent) will be updated. For more information including the + // `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. +message ListPolicyTagsRequest { + // Required. Resource name of the taxonomy to list the policy tags of. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. If + // not set, defaults to an empty string. + string page_token = 3; +} + +// Response message for +// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. +message ListPolicyTagsResponse { + // The policy tags that are in the requested taxonomy. + repeated PolicyTag policy_tags = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for +// [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. +message GetPolicyTagRequest { + // Required. Resource name of the requested policy tag. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; +} diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto new file mode 100644 index 00000000000..36e59fcfb93 --- /dev/null +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto @@ -0,0 +1,155 @@ +// 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.datacatalog.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1beta1/policytagmanager.proto"; +import "google/iam/v1/policy.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTagManagerSerializationProto"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; + +// Policy tag manager serialization API service allows clients to manipulate +// their taxonomies and policy tags data with serialized format. +service PolicyTagManagerSerialization { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Imports all taxonomies and their policy tags to a project as new + // taxonomies. + // + // This method provides a bulk taxonomy / policy tag creation using nested + // proto structure. + rpc ImportTaxonomies(ImportTaxonomiesRequest) returns (ImportTaxonomiesResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import" + body: "*" + }; + } + + // Exports all taxonomies and their policy tags in a project. + // + // This method generates SerializedTaxonomy protos with nested policy tags + // that can be used as an input for future ImportTaxonomies calls. + rpc ExportTaxonomies(ExportTaxonomiesRequest) returns (ExportTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" + }; + } +} + +// Message capturing a taxonomy and its policy tag hierarchy as a nested proto. +// Used for taxonomy import/export and mutation. +message SerializedTaxonomy { + // Required. Display name of the taxonomy. Max 200 bytes when encoded in UTF-8. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Description of the serialized taxonomy. The length of the + // description is limited to 2000 bytes when encoded in UTF-8. If not set, + // defaults to an empty description. + string description = 2; + + // Top level policy tags associated with the taxonomy if any. + repeated SerializedPolicyTag policy_tags = 3; +} + +// Message representing one policy tag when exported as a nested proto. +message SerializedPolicyTag { + // Required. Display name of the policy tag. Max 200 bytes when encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Description of the serialized policy tag. The length of the + // description is limited to 2000 bytes when encoded in UTF-8. If not set, + // defaults to an empty description. + string description = 3; + + // Children of the policy tag if any. + repeated SerializedPolicyTag child_policy_tags = 4; +} + +// Request message for +// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. +message ImportTaxonomiesRequest { + // Required. Resource name of project that the newly created taxonomies will + // belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Source taxonomies to be imported in a tree structure. + oneof source { + // Inline source used for taxonomies import + InlineSource inline_source = 2; + } +} + +// Inline source used for taxonomies import. +message InlineSource { + // Required. Taxonomies to be imported. + repeated SerializedTaxonomy taxonomies = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. +message ImportTaxonomiesResponse { + // Taxonomies that were imported. + repeated Taxonomy taxonomies = 1; +} + +// Request message for +// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. +message ExportTaxonomiesRequest { + // Required. Resource name of the project that taxonomies to be exported + // will share. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Resource names of the taxonomies to be exported. + repeated string taxonomies = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Taxonomies export destination. + oneof destination { + // Export taxonomies as serialized taxonomies. + bool serialized_taxonomies = 3; + } +} + +// Response message for +// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. +message ExportTaxonomiesResponse { + // List of taxonomies and policy tags in a tree structure. + repeated SerializedTaxonomy taxonomies = 1; +} diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/schema.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/schema.proto index aca588b4503..91e4da9b380 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/schema.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/schema.proto @@ -22,12 +22,12 @@ import "google/api/field_behavior.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). message Schema { - // Required. Schema of columns. A maximum of 10,000 columns and sub-columns - // can be specified. + // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be + // specified. repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -43,12 +43,11 @@ message ColumnSchema { // Optional. Description of the column. Default value is an empty string. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A column's mode indicates whether the values in this column are - // required, nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are - // supported. Default mode is `NULLABLE`. + // Optional. A column's mode indicates whether the values in this column are required, + // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. + // Default mode is `NULLABLE`. string mode = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Schema of sub-columns. A column can have zero or more - // sub-columns. + // Optional. Schema of sub-columns. A column can have zero or more sub-columns. repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/search.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/search.proto index 372c1573c3d..aa4abb06b08 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/search.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/search.proto @@ -23,7 +23,7 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // A result that appears in the response of a search request. Each result // captures details of one entry that matches the search. diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/table_spec.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/table_spec.proto index 4f9fddaaf97..b0bf6cc434b 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/table_spec.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/table_spec.proto @@ -23,13 +23,12 @@ import "google/api/resource.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // Describes a BigQuery table. message BigQueryTableSpec { // Output only. The table source type. - TableSourceType table_source_type = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; + TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. oneof type_spec { @@ -63,9 +62,9 @@ message ViewSpec { // Normal BigQuery table spec. message TableSpec { - // Output only. If the table is a dated shard, i.e., with name pattern - // `[prefix]YYYYMMDD`, `grouped_entry` is the Data Catalog resource name of - // the date sharded grouped entry, for example, + // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, + // `grouped_entry` is the Data Catalog resource name of the date sharded + // grouped entry, for example, // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. // Otherwise, `grouped_entry` is empty. string grouped_entry = 1 [ @@ -80,8 +79,8 @@ message TableSpec { // Context: // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding message BigQueryDateShardedSpec { - // Output only. The Data Catalog resource name of the dataset entry the - // current table belongs to, for example, + // Output only. The Data Catalog resource name of the dataset entry the current table + // belongs to, for example, // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. string dataset = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, @@ -90,8 +89,7 @@ message BigQueryDateShardedSpec { } ]; - // Output only. The table name prefix of the shards. The name of any given - // shard is + // Output only. The table name prefix of the shards. The name of any given shard is // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the // `table_prefix` is `MyTable`. string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 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 c2fc2da4346..8d12e241b9c 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 @@ -24,10 +24,13 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // Tags are used to attach custom metadata to Data Catalog resources. Tags // conform to the specifications within their tag template. +// +// See [Data Catalog IAM](/data-catalog/docs/concepts/iam) for information on +// the permissions needed to create or view tags. message Tag { option (google.api.resource) = { type: "datacatalog.googleapis.com/Tag" @@ -42,8 +45,7 @@ message Tag { // 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. - // Example: + // Required. The resource name of the tag template that this tag uses. Example: // // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} // @@ -68,9 +70,9 @@ message Tag { string column = 4; } - // Required. This maps the ID of a tag field to the value of and additional - // information about that field. Valid field IDs are defined by the tag's - // template. A tag must have at least 1 field and at most 500 fields. + // Required. This maps the ID of a tag field to the value of and additional information + // about that field. Valid field IDs are defined by the tag's template. A tag + // must have at least 1 field and at most 500 fields. map fields = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -134,8 +136,7 @@ message TagTemplate { // 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 - [(google.api.field_behavior) = REQUIRED]; + map fields = 3 [(google.api.field_behavior) = REQUIRED]; } // The template for an individual field within a tag template. @@ -145,8 +146,7 @@ message TagTemplateField { pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" }; - // Output only. The resource name of the tag template field in URL format. - // Example: + // Output only. The resource name of the tag template field in URL format. Example: // // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} // @@ -164,8 +164,7 @@ message TagTemplateField { message FieldType { message EnumType { message EnumValue { - // Required. The display name of the enum value. Must not be an empty - // string. + // Required. The display name of the enum value. Must not be an empty string. string display_name = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/timestamps.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/timestamps.proto index 9a3d640e411..6268b3cfeb7 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/timestamps.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1beta1/timestamps.proto @@ -23,7 +23,7 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog"; +option java_package = "com.google.cloud.datacatalog.v1beta1"; // Timestamps about this resource according to a particular system. message SystemTimestamps { @@ -35,6 +35,5 @@ message SystemTimestamps { // Output only. The expiration time of the resource within the given system. // Currently only apllicable to BigQuery resources. - google.protobuf.Timestamp expire_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-datacatalog/protos/protos.d.ts b/packages/google-cloud-datacatalog/protos/protos.d.ts index 2ed12991bc1..d7700f7e5bc 100644 --- a/packages/google-cloud-datacatalog/protos/protos.d.ts +++ b/packages/google-cloud-datacatalog/protos/protos.d.ts @@ -1,3 +1,18 @@ +// 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 +// +// http://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. + +import * as Long from "long"; import * as $protobuf from "protobufjs"; /** Namespace google. */ export namespace google { @@ -11,4990 +26,7638 @@ export namespace google { /** Namespace v1beta1. */ namespace v1beta1 { - /** Represents a DataCatalog */ - class DataCatalog extends $protobuf.rpc.Service { + /** Properties of a Tag. */ + interface ITag { + + /** Tag name */ + name?: (string|null); + + /** Tag template */ + template?: (string|null); + + /** Tag templateDisplayName */ + templateDisplayName?: (string|null); + + /** Tag column */ + column?: (string|null); + + /** Tag fields */ + fields?: ({ [k: string]: google.cloud.datacatalog.v1beta1.ITagField }|null); + } + + /** Represents a Tag. */ + class Tag implements ITag { /** - * Constructs a new DataCatalog service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new Tag. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.datacatalog.v1beta1.ITag); + + /** Tag name. */ + public name: string; + + /** Tag template. */ + public template: string; + + /** Tag templateDisplayName. */ + public templateDisplayName: string; + + /** Tag column. */ + public column: string; + + /** Tag fields. */ + public fields: { [k: string]: google.cloud.datacatalog.v1beta1.ITagField }; + + /** Tag scope. */ + public scope?: "column"; /** - * Creates new DataCatalog service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new Tag instance using the specified properties. + * @param [properties] Properties to set + * @returns Tag instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataCatalog; + public static create(properties?: google.cloud.datacatalog.v1beta1.ITag): google.cloud.datacatalog.v1beta1.Tag; /** - * Calls SearchCatalog. - * @param request SearchCatalogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchCatalogResponse + * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public searchCatalog(request: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogCallback): void; + public static encode(message: google.cloud.datacatalog.v1beta1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SearchCatalog. - * @param request SearchCatalogRequest message or plain object - * @returns Promise + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public searchCatalog(request: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest): Promise; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup + * Decodes a Tag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createEntryGroup(request: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroupCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Tag; /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @returns Promise + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createEntryGroup(request: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Tag; /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup + * Verifies a Tag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getEntryGroup(request: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroupCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @returns Promise + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tag */ - public getEntryGroup(request: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Tag; /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @param message Tag + * @param [options] Conversion options + * @returns Plain object */ - public deleteEntryGroup(request: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroupCallback): void; + public static toObject(message: google.cloud.datacatalog.v1beta1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @returns Promise + * Converts this Tag to JSON. + * @returns JSON object */ - public deleteEntryGroup(request: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TagField. */ + interface ITagField { + + /** TagField displayName */ + displayName?: (string|null); + + /** TagField doubleValue */ + doubleValue?: (number|null); + + /** TagField stringValue */ + stringValue?: (string|null); + + /** TagField boolValue */ + boolValue?: (boolean|null); + + /** TagField timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** TagField enumValue */ + enumValue?: (google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null); + } + + /** Represents a TagField. */ + class TagField implements ITagField { /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry + * Constructs a new TagField. + * @param [properties] Properties to set */ - public createEntry(request: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryCallback): void; + constructor(properties?: google.cloud.datacatalog.v1beta1.ITagField); + + /** TagField displayName. */ + public displayName: string; + + /** TagField doubleValue. */ + public doubleValue: number; + + /** TagField stringValue. */ + public stringValue: string; + + /** TagField boolValue. */ + public boolValue: boolean; + + /** TagField timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** TagField enumValue. */ + public enumValue?: (google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null); + + /** TagField kind. */ + public kind?: ("doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"); /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @returns Promise + * Creates a new TagField instance using the specified properties. + * @param [properties] Properties to set + * @returns TagField instance */ - public createEntry(request: google.cloud.datacatalog.v1beta1.ICreateEntryRequest): Promise; + public static create(properties?: google.cloud.datacatalog.v1beta1.ITagField): google.cloud.datacatalog.v1beta1.TagField; /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry + * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. + * @param message TagField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEntry(request: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryCallback): void; + public static encode(message: google.cloud.datacatalog.v1beta1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @returns Promise + * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. + * @param message TagField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEntry(request: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest): Promise; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a TagField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEntry(request: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagField; /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @returns Promise + * Decodes a TagField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEntry(request: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagField; /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry + * Verifies a TagField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getEntry(request: google.cloud.datacatalog.v1beta1.IGetEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @returns Promise + * Creates a TagField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagField */ - public getEntry(request: google.cloud.datacatalog.v1beta1.IGetEntryRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagField; /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry + * Creates a plain object from a TagField message. Also converts values to other types if specified. + * @param message TagField + * @param [options] Conversion options + * @returns Plain object */ - public lookupEntry(request: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntryCallback): void; + public static toObject(message: google.cloud.datacatalog.v1beta1.TagField, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @returns Promise + * Converts this TagField to JSON. + * @returns JSON object */ - public lookupEntry(request: google.cloud.datacatalog.v1beta1.ILookupEntryRequest): Promise; + public toJSON(): { [k: string]: any }; + } - /** - * Calls CreateTagTemplate. - * @param request CreateTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public createTagTemplate(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateCallback): void; + namespace TagField { - /** - * Calls CreateTagTemplate. - * @param request CreateTagTemplateRequest message or plain object - * @returns Promise - */ - public createTagTemplate(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest): Promise; + /** Properties of an EnumValue. */ + interface IEnumValue { - /** - * Calls GetTagTemplate. - * @param request GetTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public getTagTemplate(request: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplateCallback): void; + /** EnumValue displayName */ + displayName?: (string|null); + } - /** - * Calls GetTagTemplate. - * @param request GetTagTemplateRequest message or plain object - * @returns Promise - */ - public getTagTemplate(request: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest): Promise; + /** Represents an EnumValue. */ + class EnumValue implements IEnumValue { - /** - * Calls UpdateTagTemplate. - * @param request UpdateTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public updateTagTemplate(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateCallback): void; + /** + * Constructs a new EnumValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.TagField.IEnumValue); - /** - * Calls UpdateTagTemplate. - * @param request UpdateTagTemplateRequest message or plain object - * @returns Promise - */ - public updateTagTemplate(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest): Promise; + /** EnumValue displayName. */ + public displayName: string; - /** - * Calls DeleteTagTemplate. - * @param request DeleteTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTagTemplate(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateCallback): void; + /** + * Creates a new EnumValue instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValue instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.TagField.IEnumValue): google.cloud.datacatalog.v1beta1.TagField.EnumValue; - /** - * Calls DeleteTagTemplate. - * @param request DeleteTagTemplateRequest message or plain object - * @returns Promise - */ - public deleteTagTemplate(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest): Promise; + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. + * @param message EnumValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls CreateTagTemplateField. - * @param request CreateTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public createTagTemplateField(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateFieldCallback): void; + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. + * @param message EnumValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls CreateTagTemplateField. - * @param request CreateTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public createTagTemplateField(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest): Promise; + /** + * Decodes an EnumValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagField.EnumValue; + + /** + * Decodes an EnumValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagField.EnumValue; + + /** + * Verifies an EnumValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagField.EnumValue; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @param message EnumValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.TagField.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TagTemplate. */ + interface ITagTemplate { + + /** TagTemplate name */ + name?: (string|null); + + /** TagTemplate displayName */ + displayName?: (string|null); + + /** TagTemplate fields */ + fields?: ({ [k: string]: google.cloud.datacatalog.v1beta1.ITagTemplateField }|null); + } + + /** Represents a TagTemplate. */ + class TagTemplate implements ITagTemplate { /** - * Calls UpdateTagTemplateField. - * @param request UpdateTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField + * Constructs a new TagTemplate. + * @param [properties] Properties to set */ - public updateTagTemplateField(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateFieldCallback): void; + constructor(properties?: google.cloud.datacatalog.v1beta1.ITagTemplate); + + /** TagTemplate name. */ + public name: string; + + /** TagTemplate displayName. */ + public displayName: string; + + /** TagTemplate fields. */ + public fields: { [k: string]: google.cloud.datacatalog.v1beta1.ITagTemplateField }; /** - * Calls UpdateTagTemplateField. - * @param request UpdateTagTemplateFieldRequest message or plain object - * @returns Promise + * Creates a new TagTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns TagTemplate instance */ - public updateTagTemplateField(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest): Promise; + public static create(properties?: google.cloud.datacatalog.v1beta1.ITagTemplate): google.cloud.datacatalog.v1beta1.TagTemplate; /** - * Calls RenameTagTemplateField. - * @param request RenameTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField + * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. + * @param message TagTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public renameTagTemplateField(request: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldCallback): void; + public static encode(message: google.cloud.datacatalog.v1beta1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls RenameTagTemplateField. - * @param request RenameTagTemplateFieldRequest message or plain object - * @returns Promise + * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. + * @param message TagTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public renameTagTemplateField(request: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest): Promise; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteTagTemplateField. - * @param request DeleteTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a TagTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteTagTemplateField(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateFieldCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagTemplate; /** - * Calls DeleteTagTemplateField. - * @param request DeleteTagTemplateFieldRequest message or plain object - * @returns Promise + * Decodes a TagTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteTagTemplateField(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagTemplate; /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag + * Verifies a TagTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createTag(request: google.cloud.datacatalog.v1beta1.ICreateTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @returns Promise + * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagTemplate */ - public createTag(request: google.cloud.datacatalog.v1beta1.ICreateTagRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagTemplate; /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag + * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. + * @param message TagTemplate + * @param [options] Conversion options + * @returns Plain object */ - public updateTag(request: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagCallback): void; + public static toObject(message: google.cloud.datacatalog.v1beta1.TagTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @returns Promise + * Converts this TagTemplate to JSON. + * @returns JSON object */ - public updateTag(request: google.cloud.datacatalog.v1beta1.IUpdateTagRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TagTemplateField. */ + interface ITagTemplateField { + + /** TagTemplateField name */ + name?: (string|null); + + /** TagTemplateField displayName */ + displayName?: (string|null); + + /** TagTemplateField type */ + type?: (google.cloud.datacatalog.v1beta1.IFieldType|null); + } + + /** Represents a TagTemplateField. */ + class TagTemplateField implements ITagTemplateField { /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Constructs a new TagTemplateField. + * @param [properties] Properties to set */ - public deleteTag(request: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagCallback): void; + constructor(properties?: google.cloud.datacatalog.v1beta1.ITagTemplateField); + + /** TagTemplateField name. */ + public name: string; + + /** TagTemplateField displayName. */ + public displayName: string; + + /** TagTemplateField type. */ + public type?: (google.cloud.datacatalog.v1beta1.IFieldType|null); /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @returns Promise + * Creates a new TagTemplateField instance using the specified properties. + * @param [properties] Properties to set + * @returns TagTemplateField instance */ - public deleteTag(request: google.cloud.datacatalog.v1beta1.IDeleteTagRequest): Promise; + public static create(properties?: google.cloud.datacatalog.v1beta1.ITagTemplateField): google.cloud.datacatalog.v1beta1.TagTemplateField; /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTagsResponse + * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. + * @param message TagTemplateField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listTags(request: google.cloud.datacatalog.v1beta1.IListTagsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.ListTagsCallback): void; + public static encode(message: google.cloud.datacatalog.v1beta1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @returns Promise + * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. + * @param message TagTemplateField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listTags(request: google.cloud.datacatalog.v1beta1.IListTagsRequest): Promise; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Decodes a TagTemplateField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagTemplateField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicyCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagTemplateField; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise + * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagTemplateField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagTemplateField; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Verifies a TagTemplateField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicyCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagTemplateField */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagTemplateField; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. + * @param message TagTemplateField + * @param [options] Conversion options + * @returns Plain object */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissionsCallback): void; + public static toObject(message: google.cloud.datacatalog.v1beta1.TagTemplateField, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise + * Converts this TagTemplateField to JSON. + * @returns JSON object */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace DataCatalog { + /** Properties of a FieldType. */ + interface IFieldType { - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#searchCatalog}. - * @param error Error, if any - * @param [response] SearchCatalogResponse - */ - type SearchCatalogCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.SearchCatalogResponse) => void; + /** FieldType primitiveType */ + primitiveType?: (google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null); - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type CreateEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; + /** FieldType enumType */ + enumType?: (google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null); + } - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type GetEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; + /** Represents a FieldType. */ + class FieldType implements IFieldType { /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntryGroup}. - * @param error Error, if any - * @param [response] Empty + * Constructs a new FieldType. + * @param [properties] Properties to set */ - type DeleteEntryGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + constructor(properties?: google.cloud.datacatalog.v1beta1.IFieldType); - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type CreateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; + /** FieldType primitiveType. */ + public primitiveType: google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType; - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type UpdateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; + /** FieldType enumType. */ + public enumType?: (google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null); - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntry}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEntryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** FieldType typeDecl. */ + public typeDecl?: ("primitiveType"|"enumType"); /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntry}. - * @param error Error, if any - * @param [response] Entry + * Creates a new FieldType instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldType instance */ - type GetEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; + public static create(properties?: google.cloud.datacatalog.v1beta1.IFieldType): google.cloud.datacatalog.v1beta1.FieldType; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#lookupEntry}. - * @param error Error, if any - * @param [response] Entry + * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. + * @param message FieldType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type LookupEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; + public static encode(message: google.cloud.datacatalog.v1beta1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate + * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. + * @param message FieldType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate + * Decodes a FieldType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate + * Decodes a FieldType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplate}. - * @param error Error, if any - * @param [response] Empty + * Verifies a FieldType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteTagTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField + * Creates a FieldType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldType */ - type CreateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField + * Creates a plain object from a FieldType message. Also converts values to other types if specified. + * @param message FieldType + * @param [options] Conversion options + * @returns Plain object */ - type UpdateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; + public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#renameTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type RenameTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplateField}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagTemplateFieldCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTag}. - * @param error Error, if any - * @param [response] Tag - */ - type CreateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Tag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTag}. - * @param error Error, if any - * @param [response] Tag - */ - type UpdateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Tag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTag}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#listTags}. - * @param error Error, if any - * @param [response] ListTagsResponse - */ - type ListTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListTagsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SearchCatalogRequest. */ - interface ISearchCatalogRequest { - - /** SearchCatalogRequest scope */ - scope?: (google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null); - - /** SearchCatalogRequest query */ - query?: (string|null); - - /** SearchCatalogRequest pageSize */ - pageSize?: (number|null); - - /** SearchCatalogRequest pageToken */ - pageToken?: (string|null); - - /** SearchCatalogRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a SearchCatalogRequest. */ - class SearchCatalogRequest implements ISearchCatalogRequest { - - /** - * Constructs a new SearchCatalogRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest); - - /** SearchCatalogRequest scope. */ - public scope?: (google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null); - - /** SearchCatalogRequest query. */ - public query: string; - - /** SearchCatalogRequest pageSize. */ - public pageSize: number; - - /** SearchCatalogRequest pageToken. */ - public pageToken: string; - - /** SearchCatalogRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new SearchCatalogRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. - * @param message SearchCatalogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. - * @param message SearchCatalogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Verifies a SearchCatalogRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. - * @param message SearchCatalogRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogRequest to JSON. - * @returns JSON object + * Converts this FieldType to JSON. + * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SearchCatalogRequest { - - /** Properties of a Scope. */ - interface IScope { - - /** Scope includeOrgIds */ - includeOrgIds?: (string[]|null); + namespace FieldType { - /** Scope includeProjectIds */ - includeProjectIds?: (string[]|null); + /** Properties of an EnumType. */ + interface IEnumType { - /** Scope includeGcpPublicDatasets */ - includeGcpPublicDatasets?: (boolean|null); + /** EnumType allowedValues */ + allowedValues?: (google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue[]|null); } - /** Represents a Scope. */ - class Scope implements IScope { + /** Represents an EnumType. */ + class EnumType implements IEnumType { /** - * Constructs a new Scope. + * Constructs a new EnumType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope); - - /** Scope includeOrgIds. */ - public includeOrgIds: string[]; - - /** Scope includeProjectIds. */ - public includeProjectIds: string[]; + constructor(properties?: google.cloud.datacatalog.v1beta1.FieldType.IEnumType); - /** Scope includeGcpPublicDatasets. */ - public includeGcpPublicDatasets: boolean; + /** EnumType allowedValues. */ + public allowedValues: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue[]; /** - * Creates a new Scope instance using the specified properties. + * Creates a new EnumType instance using the specified properties. * @param [properties] Properties to set - * @returns Scope instance + * @returns EnumType instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + public static create(properties?: google.cloud.datacatalog.v1beta1.FieldType.IEnumType): google.cloud.datacatalog.v1beta1.FieldType.EnumType; /** - * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @param message Scope message or plain object to encode + * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. + * @param message EnumType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @param message Scope message or plain object to encode + * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. + * @param message EnumType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Scope message from the specified reader or buffer. + * Decodes an EnumType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Scope + * @returns EnumType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType.EnumType; /** - * Decodes a Scope message from the specified reader or buffer, length delimited. + * Decodes an EnumType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Scope + * @returns EnumType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType.EnumType; /** - * Verifies a Scope message. + * Verifies an EnumType message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Scope message from a plain object. Also converts values to their respective internal types. + * Creates an EnumType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Scope + * @returns EnumType */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType.EnumType; /** - * Creates a plain object from a Scope message. Also converts values to other types if specified. - * @param message Scope + * Creates a plain object from an EnumType message. Also converts values to other types if specified. + * @param message EnumType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Scope to JSON. + * Converts this EnumType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of a SearchCatalogResponse. */ - interface ISearchCatalogResponse { + namespace EnumType { - /** SearchCatalogResponse results */ - results?: (google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]|null); + /** Properties of an EnumValue. */ + interface IEnumValue { - /** SearchCatalogResponse nextPageToken */ - nextPageToken?: (string|null); + /** EnumValue displayName */ + displayName?: (string|null); + } + + /** Represents an EnumValue. */ + class EnumValue implements IEnumValue { + + /** + * Constructs a new EnumValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue); + + /** EnumValue displayName. */ + public displayName: string; + + /** + * Creates a new EnumValue instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValue instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. + * @param message EnumValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. + * @param message EnumValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + + /** + * Decodes an EnumValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + + /** + * Verifies an EnumValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @param message EnumValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** PrimitiveType enum. */ + enum PrimitiveType { + PRIMITIVE_TYPE_UNSPECIFIED = 0, + DOUBLE = 1, + STRING = 2, + BOOL = 3, + TIMESTAMP = 4 + } } - /** Represents a SearchCatalogResponse. */ - class SearchCatalogResponse implements ISearchCatalogResponse { + /** Properties of a SystemTimestamps. */ + interface ISystemTimestamps { + + /** SystemTimestamps createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** SystemTimestamps updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** SystemTimestamps expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SystemTimestamps. */ + class SystemTimestamps implements ISystemTimestamps { /** - * Constructs a new SearchCatalogResponse. + * Constructs a new SystemTimestamps. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse); + constructor(properties?: google.cloud.datacatalog.v1beta1.ISystemTimestamps); - /** SearchCatalogResponse results. */ - public results: google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]; + /** SystemTimestamps createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** SearchCatalogResponse nextPageToken. */ - public nextPageToken: string; + /** SystemTimestamps updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** SystemTimestamps expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SearchCatalogResponse instance using the specified properties. + * Creates a new SystemTimestamps instance using the specified properties. * @param [properties] Properties to set - * @returns SearchCatalogResponse instance + * @returns SystemTimestamps instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; + public static create(properties?: google.cloud.datacatalog.v1beta1.ISystemTimestamps): google.cloud.datacatalog.v1beta1.SystemTimestamps; /** - * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. - * @param message SearchCatalogResponse message or plain object to encode + * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. + * @param message SystemTimestamps message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. - * @param message SearchCatalogResponse message or plain object to encode + * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. + * @param message SystemTimestamps message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer. + * Decodes a SystemTimestamps message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchCatalogResponse + * @returns SystemTimestamps * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SystemTimestamps; /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. + * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchCatalogResponse + * @returns SystemTimestamps * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SystemTimestamps; /** - * Verifies a SearchCatalogResponse message. + * Verifies a SystemTimestamps message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchCatalogResponse + * @returns SystemTimestamps */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SystemTimestamps; /** - * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. - * @param message SearchCatalogResponse + * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. + * @param message SystemTimestamps * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.SystemTimestamps, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchCatalogResponse to JSON. + * Converts this SystemTimestamps to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateEntryGroupRequest. */ - interface ICreateEntryGroupRequest { - - /** CreateEntryGroupRequest parent */ - parent?: (string|null); + /** Properties of a GcsFilesetSpec. */ + interface IGcsFilesetSpec { - /** CreateEntryGroupRequest entryGroupId */ - entryGroupId?: (string|null); + /** GcsFilesetSpec filePatterns */ + filePatterns?: (string[]|null); - /** CreateEntryGroupRequest entryGroup */ - entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); + /** GcsFilesetSpec sampleGcsFileSpecs */ + sampleGcsFileSpecs?: (google.cloud.datacatalog.v1beta1.IGcsFileSpec[]|null); } - /** Represents a CreateEntryGroupRequest. */ - class CreateEntryGroupRequest implements ICreateEntryGroupRequest { + /** Represents a GcsFilesetSpec. */ + class GcsFilesetSpec implements IGcsFilesetSpec { /** - * Constructs a new CreateEntryGroupRequest. + * Constructs a new GcsFilesetSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest); - - /** CreateEntryGroupRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec); - /** CreateEntryGroupRequest entryGroupId. */ - public entryGroupId: string; + /** GcsFilesetSpec filePatterns. */ + public filePatterns: string[]; - /** CreateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); + /** GcsFilesetSpec sampleGcsFileSpecs. */ + public sampleGcsFileSpecs: google.cloud.datacatalog.v1beta1.IGcsFileSpec[]; /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. + * Creates a new GcsFilesetSpec instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntryGroupRequest instance + * @returns GcsFilesetSpec instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @param message CreateEntryGroupRequest message or plain object to encode + * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. + * @param message GcsFilesetSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @param message CreateEntryGroupRequest message or plain object to encode + * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. + * @param message GcsFilesetSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. + * Decodes a GcsFilesetSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEntryGroupRequest + * @returns GcsFilesetSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntryGroupRequest + * @returns GcsFilesetSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; /** - * Verifies a CreateEntryGroupRequest message. + * Verifies a GcsFilesetSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntryGroupRequest + * @returns GcsFilesetSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. - * @param message CreateEntryGroupRequest + * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. + * @param message GcsFilesetSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.GcsFilesetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntryGroupRequest to JSON. + * Converts this GcsFilesetSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEntryGroupRequest. */ - interface IGetEntryGroupRequest { + /** Properties of a GcsFileSpec. */ + interface IGcsFileSpec { - /** GetEntryGroupRequest name */ - name?: (string|null); + /** GcsFileSpec filePath */ + filePath?: (string|null); - /** GetEntryGroupRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); + /** GcsFileSpec gcsTimestamps */ + gcsTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + + /** GcsFileSpec sizeBytes */ + sizeBytes?: (number|Long|null); } - /** Represents a GetEntryGroupRequest. */ - class GetEntryGroupRequest implements IGetEntryGroupRequest { + /** Represents a GcsFileSpec. */ + class GcsFileSpec implements IGcsFileSpec { /** - * Constructs a new GetEntryGroupRequest. + * Constructs a new GcsFileSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IGcsFileSpec); - /** GetEntryGroupRequest name. */ - public name: string; + /** GcsFileSpec filePath. */ + public filePath: string; - /** GetEntryGroupRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); + /** GcsFileSpec gcsTimestamps. */ + public gcsTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + + /** GcsFileSpec sizeBytes. */ + public sizeBytes: (number|Long); /** - * Creates a new GetEntryGroupRequest instance using the specified properties. + * Creates a new GcsFileSpec instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntryGroupRequest instance + * @returns GcsFileSpec instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IGcsFileSpec): google.cloud.datacatalog.v1beta1.GcsFileSpec; /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. - * @param message GetEntryGroupRequest message or plain object to encode + * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. + * @param message GcsFileSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. - * @param message GetEntryGroupRequest message or plain object to encode + * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. + * @param message GcsFileSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer. + * Decodes a GcsFileSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntryGroupRequest + * @returns GcsFileSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GcsFileSpec; /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntryGroupRequest + * @returns GcsFileSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GcsFileSpec; /** - * Verifies a GetEntryGroupRequest message. + * Verifies a GcsFileSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntryGroupRequest + * @returns GcsFileSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GcsFileSpec; /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. - * @param message GetEntryGroupRequest + * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. + * @param message GcsFileSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.GcsFileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntryGroupRequest to JSON. + * Converts this GcsFileSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteEntryGroupRequest. */ - interface IDeleteEntryGroupRequest { + /** Properties of a Schema. */ + interface ISchema { - /** DeleteEntryGroupRequest name */ - name?: (string|null); + /** Schema columns */ + columns?: (google.cloud.datacatalog.v1beta1.IColumnSchema[]|null); } - /** Represents a DeleteEntryGroupRequest. */ - class DeleteEntryGroupRequest implements IDeleteEntryGroupRequest { + /** Represents a Schema. */ + class Schema implements ISchema { /** - * Constructs a new DeleteEntryGroupRequest. + * Constructs a new Schema. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ISchema); - /** DeleteEntryGroupRequest name. */ - public name: string; + /** Schema columns. */ + public columns: google.cloud.datacatalog.v1beta1.IColumnSchema[]; /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. + * Creates a new Schema instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEntryGroupRequest instance + * @returns Schema instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ISchema): google.cloud.datacatalog.v1beta1.Schema; /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. - * @param message DeleteEntryGroupRequest message or plain object to encode + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. - * @param message DeleteEntryGroupRequest message or plain object to encode + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. + * Decodes a Schema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEntryGroupRequest + * @returns Schema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Schema; /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a Schema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEntryGroupRequest + * @returns Schema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Schema; /** - * Verifies a DeleteEntryGroupRequest message. + * Verifies a Schema message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Schema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEntryGroupRequest + * @returns Schema */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Schema; /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. - * @param message DeleteEntryGroupRequest + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEntryGroupRequest to JSON. + * Converts this Schema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateEntryRequest. */ - interface ICreateEntryRequest { + /** Properties of a ColumnSchema. */ + interface IColumnSchema { - /** CreateEntryRequest parent */ - parent?: (string|null); + /** ColumnSchema column */ + column?: (string|null); - /** CreateEntryRequest entryId */ - entryId?: (string|null); + /** ColumnSchema type */ + type?: (string|null); - /** CreateEntryRequest entry */ - entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); + /** ColumnSchema description */ + description?: (string|null); + + /** ColumnSchema mode */ + mode?: (string|null); + + /** ColumnSchema subcolumns */ + subcolumns?: (google.cloud.datacatalog.v1beta1.IColumnSchema[]|null); } - /** Represents a CreateEntryRequest. */ - class CreateEntryRequest implements ICreateEntryRequest { + /** Represents a ColumnSchema. */ + class ColumnSchema implements IColumnSchema { /** - * Constructs a new CreateEntryRequest. + * Constructs a new ColumnSchema. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IColumnSchema); - /** CreateEntryRequest parent. */ - public parent: string; + /** ColumnSchema column. */ + public column: string; - /** CreateEntryRequest entryId. */ - public entryId: string; + /** ColumnSchema type. */ + public type: string; - /** CreateEntryRequest entry. */ - public entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); + /** ColumnSchema description. */ + public description: string; + + /** ColumnSchema mode. */ + public mode: string; + + /** ColumnSchema subcolumns. */ + public subcolumns: google.cloud.datacatalog.v1beta1.IColumnSchema[]; /** - * Creates a new CreateEntryRequest instance using the specified properties. + * Creates a new ColumnSchema instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntryRequest instance + * @returns ColumnSchema instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryRequest): google.cloud.datacatalog.v1beta1.CreateEntryRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IColumnSchema): google.cloud.datacatalog.v1beta1.ColumnSchema; /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. - * @param message CreateEntryRequest message or plain object to encode + * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. + * @param message ColumnSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. - * @param message CreateEntryRequest message or plain object to encode + * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. + * @param message ColumnSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntryRequest message from the specified reader or buffer. + * Decodes a ColumnSchema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEntryRequest + * @returns ColumnSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateEntryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ColumnSchema; /** - * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntryRequest + * @returns ColumnSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateEntryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ColumnSchema; /** - * Verifies a CreateEntryRequest message. + * Verifies a ColumnSchema message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntryRequest + * @returns ColumnSchema */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateEntryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ColumnSchema; /** - * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. - * @param message CreateEntryRequest + * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. + * @param message ColumnSchema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.ColumnSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntryRequest to JSON. + * Converts this ColumnSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateEntryRequest. */ - interface IUpdateEntryRequest { - - /** UpdateEntryRequest entry */ - entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); + /** Properties of a SearchCatalogResult. */ + interface ISearchCatalogResult { - /** UpdateEntryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** SearchCatalogResult searchResultType */ + searchResultType?: (google.cloud.datacatalog.v1beta1.SearchResultType|null); - /** Represents an UpdateEntryRequest. */ - class UpdateEntryRequest implements IUpdateEntryRequest { + /** SearchCatalogResult searchResultSubtype */ + searchResultSubtype?: (string|null); + + /** SearchCatalogResult relativeResourceName */ + relativeResourceName?: (string|null); + + /** SearchCatalogResult linkedResource */ + linkedResource?: (string|null); + } + + /** Represents a SearchCatalogResult. */ + class SearchCatalogResult implements ISearchCatalogResult { /** - * Constructs a new UpdateEntryRequest. + * Constructs a new SearchCatalogResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResult); - /** UpdateEntryRequest entry. */ - public entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); + /** SearchCatalogResult searchResultType. */ + public searchResultType: google.cloud.datacatalog.v1beta1.SearchResultType; - /** UpdateEntryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SearchCatalogResult searchResultSubtype. */ + public searchResultSubtype: string; + + /** SearchCatalogResult relativeResourceName. */ + public relativeResourceName: string; + + /** SearchCatalogResult linkedResource. */ + public linkedResource: string; /** - * Creates a new UpdateEntryRequest instance using the specified properties. + * Creates a new SearchCatalogResult instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEntryRequest instance + * @returns SearchCatalogResult instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResult): google.cloud.datacatalog.v1beta1.SearchCatalogResult; /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. - * @param message UpdateEntryRequest message or plain object to encode + * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. + * @param message SearchCatalogResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. - * @param message UpdateEntryRequest message or plain object to encode + * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. + * @param message SearchCatalogResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer. + * Decodes a SearchCatalogResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEntryRequest + * @returns SearchCatalogResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogResult; /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEntryRequest + * @returns SearchCatalogResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogResult; /** - * Verifies an UpdateEntryRequest message. + * Verifies a SearchCatalogResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEntryRequest + * @returns SearchCatalogResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogResult; /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. - * @param message UpdateEntryRequest + * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. + * @param message SearchCatalogResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEntryRequest to JSON. + * Converts this SearchCatalogResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteEntryRequest. */ - interface IDeleteEntryRequest { + /** SearchResultType enum. */ + enum SearchResultType { + SEARCH_RESULT_TYPE_UNSPECIFIED = 0, + ENTRY = 1, + TAG_TEMPLATE = 2, + ENTRY_GROUP = 3 + } - /** DeleteEntryRequest name */ - name?: (string|null); + /** Properties of a BigQueryTableSpec. */ + interface IBigQueryTableSpec { + + /** BigQueryTableSpec tableSourceType */ + tableSourceType?: (google.cloud.datacatalog.v1beta1.TableSourceType|null); + + /** BigQueryTableSpec viewSpec */ + viewSpec?: (google.cloud.datacatalog.v1beta1.IViewSpec|null); + + /** BigQueryTableSpec tableSpec */ + tableSpec?: (google.cloud.datacatalog.v1beta1.ITableSpec|null); } - /** Represents a DeleteEntryRequest. */ - class DeleteEntryRequest implements IDeleteEntryRequest { + /** Represents a BigQueryTableSpec. */ + class BigQueryTableSpec implements IBigQueryTableSpec { /** - * Constructs a new DeleteEntryRequest. + * Constructs a new BigQueryTableSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec); - /** DeleteEntryRequest name. */ - public name: string; + /** BigQueryTableSpec tableSourceType. */ + public tableSourceType: google.cloud.datacatalog.v1beta1.TableSourceType; + + /** BigQueryTableSpec viewSpec. */ + public viewSpec?: (google.cloud.datacatalog.v1beta1.IViewSpec|null); + + /** BigQueryTableSpec tableSpec. */ + public tableSpec?: (google.cloud.datacatalog.v1beta1.ITableSpec|null); + + /** BigQueryTableSpec typeSpec. */ + public typeSpec?: ("viewSpec"|"tableSpec"); /** - * Creates a new DeleteEntryRequest instance using the specified properties. + * Creates a new BigQueryTableSpec instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEntryRequest instance + * @returns BigQueryTableSpec instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. - * @param message DeleteEntryRequest message or plain object to encode + * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. + * @param message BigQueryTableSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. - * @param message DeleteEntryRequest message or plain object to encode + * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. + * @param message BigQueryTableSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer. + * Decodes a BigQueryTableSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEntryRequest + * @returns BigQueryTableSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEntryRequest + * @returns BigQueryTableSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; /** - * Verifies a DeleteEntryRequest message. + * Verifies a BigQueryTableSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEntryRequest + * @returns BigQueryTableSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; /** - * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. - * @param message DeleteEntryRequest + * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. + * @param message BigQueryTableSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.BigQueryTableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEntryRequest to JSON. + * Converts this BigQueryTableSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEntryRequest. */ - interface IGetEntryRequest { + /** TableSourceType enum. */ + enum TableSourceType { + TABLE_SOURCE_TYPE_UNSPECIFIED = 0, + BIGQUERY_VIEW = 2, + BIGQUERY_TABLE = 5 + } - /** GetEntryRequest name */ - name?: (string|null); + /** Properties of a ViewSpec. */ + interface IViewSpec { + + /** ViewSpec viewQuery */ + viewQuery?: (string|null); } - /** Represents a GetEntryRequest. */ - class GetEntryRequest implements IGetEntryRequest { + /** Represents a ViewSpec. */ + class ViewSpec implements IViewSpec { /** - * Constructs a new GetEntryRequest. + * Constructs a new ViewSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetEntryRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IViewSpec); - /** GetEntryRequest name. */ - public name: string; + /** ViewSpec viewQuery. */ + public viewQuery: string; /** - * Creates a new GetEntryRequest instance using the specified properties. + * Creates a new ViewSpec instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntryRequest instance + * @returns ViewSpec instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetEntryRequest): google.cloud.datacatalog.v1beta1.GetEntryRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IViewSpec): google.cloud.datacatalog.v1beta1.ViewSpec; /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. - * @param message GetEntryRequest message or plain object to encode + * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. + * @param message ViewSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. - * @param message GetEntryRequest message or plain object to encode + * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. + * @param message ViewSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntryRequest message from the specified reader or buffer. + * Decodes a ViewSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntryRequest + * @returns ViewSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetEntryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ViewSpec; /** - * Decodes a GetEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a ViewSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntryRequest + * @returns ViewSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetEntryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ViewSpec; /** - * Verifies a GetEntryRequest message. + * Verifies a ViewSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntryRequest + * @returns ViewSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetEntryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ViewSpec; /** - * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. - * @param message GetEntryRequest + * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. + * @param message ViewSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.ViewSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntryRequest to JSON. + * Converts this ViewSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LookupEntryRequest. */ - interface ILookupEntryRequest { - - /** LookupEntryRequest linkedResource */ - linkedResource?: (string|null); + /** Properties of a TableSpec. */ + interface ITableSpec { - /** LookupEntryRequest sqlResource */ - sqlResource?: (string|null); + /** TableSpec groupedEntry */ + groupedEntry?: (string|null); } - /** Represents a LookupEntryRequest. */ - class LookupEntryRequest implements ILookupEntryRequest { + /** Represents a TableSpec. */ + class TableSpec implements ITableSpec { /** - * Constructs a new LookupEntryRequest. + * Constructs a new TableSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ILookupEntryRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ITableSpec); - /** LookupEntryRequest linkedResource. */ - public linkedResource: string; - - /** LookupEntryRequest sqlResource. */ - public sqlResource: string; - - /** LookupEntryRequest targetName. */ - public targetName?: ("linkedResource"|"sqlResource"); + /** TableSpec groupedEntry. */ + public groupedEntry: string; /** - * Creates a new LookupEntryRequest instance using the specified properties. + * Creates a new TableSpec instance using the specified properties. * @param [properties] Properties to set - * @returns LookupEntryRequest instance + * @returns TableSpec instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ILookupEntryRequest): google.cloud.datacatalog.v1beta1.LookupEntryRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ITableSpec): google.cloud.datacatalog.v1beta1.TableSpec; /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. - * @param message LookupEntryRequest message or plain object to encode + * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. + * @param message TableSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. - * @param message LookupEntryRequest message or plain object to encode + * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. + * @param message TableSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LookupEntryRequest message from the specified reader or buffer. + * Decodes a TableSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LookupEntryRequest + * @returns TableSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.LookupEntryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TableSpec; /** - * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a TableSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LookupEntryRequest + * @returns TableSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.LookupEntryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TableSpec; /** - * Verifies a LookupEntryRequest message. + * Verifies a TableSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LookupEntryRequest + * @returns TableSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.LookupEntryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TableSpec; /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. - * @param message LookupEntryRequest + * Creates a plain object from a TableSpec message. Also converts values to other types if specified. + * @param message TableSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.LookupEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.TableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LookupEntryRequest to JSON. + * Converts this TableSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Entry. */ - interface IEntry { - - /** Entry name */ - name?: (string|null); - - /** Entry linkedResource */ - linkedResource?: (string|null); - - /** Entry type */ - type?: (google.cloud.datacatalog.v1beta1.EntryType|null); - - /** Entry gcsFilesetSpec */ - gcsFilesetSpec?: (google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null); - - /** Entry bigqueryTableSpec */ - bigqueryTableSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null); - - /** Entry bigqueryDateShardedSpec */ - bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null); - - /** Entry displayName */ - displayName?: (string|null); + /** Properties of a BigQueryDateShardedSpec. */ + interface IBigQueryDateShardedSpec { - /** Entry description */ - description?: (string|null); + /** BigQueryDateShardedSpec dataset */ + dataset?: (string|null); - /** Entry schema */ - schema?: (google.cloud.datacatalog.v1beta1.ISchema|null); + /** BigQueryDateShardedSpec tablePrefix */ + tablePrefix?: (string|null); - /** Entry sourceSystemTimestamps */ - sourceSystemTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + /** BigQueryDateShardedSpec shardCount */ + shardCount?: (number|Long|null); } - /** Represents an Entry. */ - class Entry implements IEntry { + /** Represents a BigQueryDateShardedSpec. */ + class BigQueryDateShardedSpec implements IBigQueryDateShardedSpec { /** - * Constructs a new Entry. + * Constructs a new BigQueryDateShardedSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IEntry); - - /** Entry name. */ - public name: string; - - /** Entry linkedResource. */ - public linkedResource: string; - - /** Entry type. */ - public type: google.cloud.datacatalog.v1beta1.EntryType; - - /** Entry gcsFilesetSpec. */ - public gcsFilesetSpec?: (google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null); - - /** Entry bigqueryTableSpec. */ - public bigqueryTableSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null); - - /** Entry bigqueryDateShardedSpec. */ - public bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null); - - /** Entry displayName. */ - public displayName: string; - - /** Entry description. */ - public description: string; - - /** Entry schema. */ - public schema?: (google.cloud.datacatalog.v1beta1.ISchema|null); + constructor(properties?: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec); - /** Entry sourceSystemTimestamps. */ - public sourceSystemTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + /** BigQueryDateShardedSpec dataset. */ + public dataset: string; - /** Entry entryType. */ - public entryType?: "type"; + /** BigQueryDateShardedSpec tablePrefix. */ + public tablePrefix: string; - /** Entry typeSpec. */ - public typeSpec?: ("gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"); + /** BigQueryDateShardedSpec shardCount. */ + public shardCount: (number|Long); /** - * Creates a new Entry instance using the specified properties. + * Creates a new BigQueryDateShardedSpec instance using the specified properties. * @param [properties] Properties to set - * @returns Entry instance + * @returns BigQueryDateShardedSpec instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IEntry): google.cloud.datacatalog.v1beta1.Entry; + public static create(properties?: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode + * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. + * @param message BigQueryDateShardedSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode + * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. + * @param message BigQueryDateShardedSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Entry message from the specified reader or buffer. + * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Entry + * @returns BigQueryDateShardedSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Entry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; /** - * Decodes an Entry message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Entry + * @returns BigQueryDateShardedSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Entry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; /** - * Verifies an Entry message. + * Verifies a BigQueryDateShardedSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Entry + * @returns BigQueryDateShardedSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Entry; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry + * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. + * @param message BigQueryDateShardedSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Entry to JSON. + * Converts this BigQueryDateShardedSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EntryGroup. */ - interface IEntryGroup { - - /** EntryGroup name */ - name?: (string|null); - - /** EntryGroup displayName */ - displayName?: (string|null); - - /** EntryGroup description */ - description?: (string|null); - - /** EntryGroup dataCatalogTimestamps */ - dataCatalogTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - } - - /** Represents an EntryGroup. */ - class EntryGroup implements IEntryGroup { + /** Represents a DataCatalog */ + class DataCatalog extends $protobuf.rpc.Service { /** - * Constructs a new EntryGroup. - * @param [properties] Properties to set + * Constructs a new DataCatalog service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IEntryGroup); - - /** EntryGroup name. */ - public name: string; - - /** EntryGroup displayName. */ - public displayName: string; - - /** EntryGroup description. */ - public description: string; - - /** EntryGroup dataCatalogTimestamps. */ - public dataCatalogTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new EntryGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns EntryGroup instance + * Creates new DataCatalog service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IEntryGroup): google.cloud.datacatalog.v1beta1.EntryGroup; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataCatalog; /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. - * @param message EntryGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SearchCatalog. + * @param request SearchCatalogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchCatalogResponse */ - public static encode(message: google.cloud.datacatalog.v1beta1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public searchCatalog(request: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogCallback): void; /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. - * @param message EntryGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SearchCatalog. + * @param request SearchCatalogRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public searchCatalog(request: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest): Promise; /** - * Decodes an EntryGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateEntryGroup. + * @param request CreateEntryGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntryGroup */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.EntryGroup; + public createEntryGroup(request: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroupCallback): void; /** - * Decodes an EntryGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateEntryGroup. + * @param request CreateEntryGroupRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.EntryGroup; + public createEntryGroup(request: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest): Promise; /** - * Verifies an EntryGroup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetEntryGroup. + * @param request GetEntryGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntryGroup */ - public static verify(message: { [k: string]: any }): (string|null); + public getEntryGroup(request: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroupCallback): void; /** - * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntryGroup + * Calls GetEntryGroup. + * @param request GetEntryGroupRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.EntryGroup; + public getEntryGroup(request: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest): Promise; /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. - * @param message EntryGroup - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteEntryGroup. + * @param request DeleteEntryGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static toObject(message: google.cloud.datacatalog.v1beta1.EntryGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteEntryGroup(request: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroupCallback): void; /** - * Converts this EntryGroup to JSON. - * @returns JSON object + * Calls DeleteEntryGroup. + * @param request DeleteEntryGroupRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateTagTemplateRequest. */ - interface ICreateTagTemplateRequest { - - /** CreateTagTemplateRequest parent */ - parent?: (string|null); - - /** CreateTagTemplateRequest tagTemplateId */ - tagTemplateId?: (string|null); - - /** CreateTagTemplateRequest tagTemplate */ - tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - } - - /** Represents a CreateTagTemplateRequest. */ - class CreateTagTemplateRequest implements ICreateTagTemplateRequest { + public deleteEntryGroup(request: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest): Promise; /** - * Constructs a new CreateTagTemplateRequest. - * @param [properties] Properties to set + * Calls CreateEntry. + * @param request CreateEntryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entry */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest); - - /** CreateTagTemplateRequest parent. */ - public parent: string; - - /** CreateTagTemplateRequest tagTemplateId. */ - public tagTemplateId: string; - - /** CreateTagTemplateRequest tagTemplate. */ - public tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); + public createEntry(request: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryCallback): void; /** - * Creates a new CreateTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagTemplateRequest instance + * Calls CreateEntry. + * @param request CreateEntryRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; + public createEntry(request: google.cloud.datacatalog.v1beta1.ICreateEntryRequest): Promise; /** - * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. - * @param message CreateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateEntry. + * @param request UpdateEntryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entry */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateEntry(request: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryCallback): void; /** - * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. - * @param message CreateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateEntry. + * @param request UpdateEntryRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateEntry(request: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest): Promise; /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteEntry. + * @param request DeleteEntryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; + public deleteEntry(request: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryCallback): void; /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteEntry. + * @param request DeleteEntryRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; + public deleteEntry(request: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest): Promise; /** - * Verifies a CreateTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetEntry. + * @param request GetEntryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entry */ - public static verify(message: { [k: string]: any }): (string|null); + public getEntry(request: google.cloud.datacatalog.v1beta1.IGetEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryCallback): void; /** - * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagTemplateRequest + * Calls GetEntry. + * @param request GetEntryRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; + public getEntry(request: google.cloud.datacatalog.v1beta1.IGetEntryRequest): Promise; /** - * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. - * @param message CreateTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object + * Calls LookupEntry. + * @param request LookupEntryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entry */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public lookupEntry(request: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntryCallback): void; /** - * Converts this CreateTagTemplateRequest to JSON. - * @returns JSON object + * Calls LookupEntry. + * @param request LookupEntryRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTagTemplateRequest. */ - interface IGetTagTemplateRequest { - - /** GetTagTemplateRequest name */ - name?: (string|null); - } - - /** Represents a GetTagTemplateRequest. */ - class GetTagTemplateRequest implements IGetTagTemplateRequest { + public lookupEntry(request: google.cloud.datacatalog.v1beta1.ILookupEntryRequest): Promise; /** - * Constructs a new GetTagTemplateRequest. - * @param [properties] Properties to set + * Calls CreateTagTemplate. + * @param request CreateTagTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagTemplate */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest); - - /** GetTagTemplateRequest name. */ - public name: string; + public createTagTemplate(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateCallback): void; /** - * Creates a new GetTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTagTemplateRequest instance + * Calls CreateTagTemplate. + * @param request CreateTagTemplateRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; + public createTagTemplate(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest): Promise; /** - * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. - * @param message GetTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetTagTemplate. + * @param request GetTagTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagTemplate */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getTagTemplate(request: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplateCallback): void; /** - * Encodes the specified GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. - * @param message GetTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetTagTemplate. + * @param request GetTagTemplateRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getTagTemplate(request: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest): Promise; /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateTagTemplate. + * @param request UpdateTagTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagTemplate */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; + public updateTagTemplate(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateCallback): void; /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateTagTemplate. + * @param request UpdateTagTemplateRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; + public updateTagTemplate(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest): Promise; /** - * Verifies a GetTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteTagTemplate. + * @param request DeleteTagTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteTagTemplate(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateCallback): void; /** - * Creates a GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTagTemplateRequest + * Calls DeleteTagTemplate. + * @param request DeleteTagTemplateRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; + public deleteTagTemplate(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest): Promise; /** - * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. - * @param message GetTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CreateTagTemplateField. + * @param request CreateTagTemplateFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagTemplateField */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createTagTemplateField(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateFieldCallback): void; /** - * Converts this GetTagTemplateRequest to JSON. - * @returns JSON object + * Calls CreateTagTemplateField. + * @param request CreateTagTemplateFieldRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** EntryType enum. */ - enum EntryType { - ENTRY_TYPE_UNSPECIFIED = 0, - TABLE = 2, - DATA_STREAM = 3, - FILESET = 4 - } - - /** Properties of an UpdateTagTemplateRequest. */ - interface IUpdateTagTemplateRequest { - - /** UpdateTagTemplateRequest tagTemplate */ - tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - - /** UpdateTagTemplateRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagTemplateRequest. */ - class UpdateTagTemplateRequest implements IUpdateTagTemplateRequest { + public createTagTemplateField(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest): Promise; /** - * Constructs a new UpdateTagTemplateRequest. - * @param [properties] Properties to set + * Calls UpdateTagTemplateField. + * @param request UpdateTagTemplateFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagTemplateField */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest); - - /** UpdateTagTemplateRequest tagTemplate. */ - public tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - - /** UpdateTagTemplateRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + public updateTagTemplateField(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateFieldCallback): void; /** - * Creates a new UpdateTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagTemplateRequest instance + * Calls UpdateTagTemplateField. + * @param request UpdateTagTemplateFieldRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; + public updateTagTemplateField(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest): Promise; /** - * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. - * @param message UpdateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls RenameTagTemplateField. + * @param request RenameTagTemplateFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagTemplateField */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public renameTagTemplateField(request: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldCallback): void; /** - * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. - * @param message UpdateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls RenameTagTemplateField. + * @param request RenameTagTemplateFieldRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public renameTagTemplateField(request: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest): Promise; /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteTagTemplateField. + * @param request DeleteTagTemplateFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; + public deleteTagTemplateField(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateFieldCallback): void; /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteTagTemplateField. + * @param request DeleteTagTemplateFieldRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; + public deleteTagTemplateField(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest): Promise; /** - * Verifies an UpdateTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag */ - public static verify(message: { [k: string]: any }): (string|null); + public createTag(request: google.cloud.datacatalog.v1beta1.ICreateTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagCallback): void; /** - * Creates an UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagTemplateRequest + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; + public createTag(request: google.cloud.datacatalog.v1beta1.ICreateTagRequest): Promise; /** - * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. - * @param message UpdateTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateTag(request: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagCallback): void; /** - * Converts this UpdateTagTemplateRequest to JSON. - * @returns JSON object + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteTagTemplateRequest. */ - interface IDeleteTagTemplateRequest { - - /** DeleteTagTemplateRequest name */ - name?: (string|null); - - /** DeleteTagTemplateRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteTagTemplateRequest. */ - class DeleteTagTemplateRequest implements IDeleteTagTemplateRequest { + public updateTag(request: google.cloud.datacatalog.v1beta1.IUpdateTagRequest): Promise; /** - * Constructs a new DeleteTagTemplateRequest. - * @param [properties] Properties to set + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest); - - /** DeleteTagTemplateRequest name. */ - public name: string; - - /** DeleteTagTemplateRequest force. */ - public force: boolean; + public deleteTag(request: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagCallback): void; /** - * Creates a new DeleteTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagTemplateRequest instance + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; + public deleteTag(request: google.cloud.datacatalog.v1beta1.IDeleteTagRequest): Promise; /** - * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. - * @param message DeleteTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTagsResponse */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listTags(request: google.cloud.datacatalog.v1beta1.IListTagsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.ListTagsCallback): void; /** - * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. - * @param message DeleteTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listTags(request: google.cloud.datacatalog.v1beta1.IListTagsRequest): Promise; /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicyCallback): void; /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; /** - * Verifies a DeleteTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static verify(message: { [k: string]: any }): (string|null); + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicyCallback): void; /** - * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagTemplateRequest + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; /** - * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. - * @param message DeleteTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissionsCallback): void; /** - * Converts this DeleteTagTemplateRequest to JSON. - * @returns JSON object + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; } - /** Properties of a CreateTagRequest. */ - interface ICreateTagRequest { - - /** CreateTagRequest parent */ - parent?: (string|null); + namespace DataCatalog { - /** CreateTagRequest tag */ - tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - } + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#searchCatalog}. + * @param error Error, if any + * @param [response] SearchCatalogResponse + */ + type SearchCatalogCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.SearchCatalogResponse) => void; - /** Represents a CreateTagRequest. */ - class CreateTagRequest implements ICreateTagRequest { + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntryGroup}. + * @param error Error, if any + * @param [response] EntryGroup + */ + type CreateEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; /** - * Constructs a new CreateTagRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntryGroup}. + * @param error Error, if any + * @param [response] EntryGroup */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagRequest); + type GetEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; - /** CreateTagRequest parent. */ - public parent: string; + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntryGroup}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEntryGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** CreateTagRequest tag. */ - public tag?: (google.cloud.datacatalog.v1beta1.ITag|null); + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntry}. + * @param error Error, if any + * @param [response] Entry + */ + type CreateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; /** - * Creates a new CreateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagRequest instance + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateEntry}. + * @param error Error, if any + * @param [response] Entry */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagRequest): google.cloud.datacatalog.v1beta1.CreateTagRequest; + type UpdateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntry}. + * @param error Error, if any + * @param [response] Empty */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteEntryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntry}. + * @param error Error, if any + * @param [response] Entry */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type GetEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#lookupEntry}. + * @param error Error, if any + * @param [response] Entry */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagRequest; + type LookupEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplate}. + * @param error Error, if any + * @param [response] TagTemplate */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagRequest; + type CreateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; /** - * Verifies a CreateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getTagTemplate}. + * @param error Error, if any + * @param [response] TagTemplate */ - public static verify(message: { [k: string]: any }): (string|null); + type GetTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagRequest + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplate}. + * @param error Error, if any + * @param [response] TagTemplate */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagRequest; + type UpdateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @param message CreateTagRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplate}. + * @param error Error, if any + * @param [response] Empty */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DeleteTagTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Converts this CreateTagRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplateField}. + * @param error Error, if any + * @param [response] TagTemplateField */ - public toJSON(): { [k: string]: any }; + type CreateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplateField}. + * @param error Error, if any + * @param [response] TagTemplateField + */ + type UpdateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#renameTagTemplateField}. + * @param error Error, if any + * @param [response] TagTemplateField + */ + type RenameTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplateField}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTagTemplateFieldCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTag}. + * @param error Error, if any + * @param [response] Tag + */ + type CreateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Tag) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTag}. + * @param error Error, if any + * @param [response] Tag + */ + type UpdateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Tag) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTag}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#listTags}. + * @param error Error, if any + * @param [response] ListTagsResponse + */ + type ListTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListTagsResponse) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; } - /** Properties of an UpdateTagRequest. */ - interface IUpdateTagRequest { + /** Properties of a SearchCatalogRequest. */ + interface ISearchCatalogRequest { - /** UpdateTagRequest tag */ - tag?: (google.cloud.datacatalog.v1beta1.ITag|null); + /** SearchCatalogRequest scope */ + scope?: (google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null); - /** UpdateTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** SearchCatalogRequest query */ + query?: (string|null); + + /** SearchCatalogRequest pageSize */ + pageSize?: (number|null); + + /** SearchCatalogRequest pageToken */ + pageToken?: (string|null); + + /** SearchCatalogRequest orderBy */ + orderBy?: (string|null); } - /** Represents an UpdateTagRequest. */ - class UpdateTagRequest implements IUpdateTagRequest { + /** Represents a SearchCatalogRequest. */ + class SearchCatalogRequest implements ISearchCatalogRequest { /** - * Constructs a new UpdateTagRequest. + * Constructs a new SearchCatalogRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest); - /** UpdateTagRequest tag. */ - public tag?: (google.cloud.datacatalog.v1beta1.ITag|null); + /** SearchCatalogRequest scope. */ + public scope?: (google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null); - /** UpdateTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SearchCatalogRequest query. */ + public query: string; + + /** SearchCatalogRequest pageSize. */ + public pageSize: number; + + /** SearchCatalogRequest pageToken. */ + public pageToken: string; + + /** SearchCatalogRequest orderBy. */ + public orderBy: string; /** - * Creates a new UpdateTagRequest instance using the specified properties. + * Creates a new SearchCatalogRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTagRequest instance + * @returns SearchCatalogRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagRequest): google.cloud.datacatalog.v1beta1.UpdateTagRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode + * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. + * @param message SearchCatalogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode + * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. + * @param message SearchCatalogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. + * Decodes a SearchCatalogRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTagRequest + * @returns SearchCatalogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTagRequest + * @returns SearchCatalogRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; /** - * Verifies an UpdateTagRequest message. + * Verifies a SearchCatalogRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTagRequest + * @returns SearchCatalogRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @param message UpdateTagRequest + * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. + * @param message SearchCatalogRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTagRequest to JSON. + * Converts this SearchCatalogRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTagRequest. */ - interface IDeleteTagRequest { + namespace SearchCatalogRequest { - /** DeleteTagRequest name */ - name?: (string|null); + /** Properties of a Scope. */ + interface IScope { + + /** Scope includeOrgIds */ + includeOrgIds?: (string[]|null); + + /** Scope includeProjectIds */ + includeProjectIds?: (string[]|null); + + /** Scope includeGcpPublicDatasets */ + includeGcpPublicDatasets?: (boolean|null); + } + + /** Represents a Scope. */ + class Scope implements IScope { + + /** + * Constructs a new Scope. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope); + + /** Scope includeOrgIds. */ + public includeOrgIds: string[]; + + /** Scope includeProjectIds. */ + public includeProjectIds: string[]; + + /** Scope includeGcpPublicDatasets. */ + public includeGcpPublicDatasets: boolean; + + /** + * Creates a new Scope instance using the specified properties. + * @param [properties] Properties to set + * @returns Scope instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + + /** + * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. + * @param message Scope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. + * @param message Scope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scope message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + + /** + * Decodes a Scope message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + + /** + * Verifies a Scope message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scope message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scope + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; + + /** + * Creates a plain object from a Scope message. Also converts values to other types if specified. + * @param message Scope + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scope to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a DeleteTagRequest. */ - class DeleteTagRequest implements IDeleteTagRequest { + /** Properties of a SearchCatalogResponse. */ + interface ISearchCatalogResponse { + + /** SearchCatalogResponse results */ + results?: (google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]|null); + + /** SearchCatalogResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchCatalogResponse. */ + class SearchCatalogResponse implements ISearchCatalogResponse { /** - * Constructs a new DeleteTagRequest. + * Constructs a new SearchCatalogResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse); - /** DeleteTagRequest name. */ - public name: string; + /** SearchCatalogResponse results. */ + public results: google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]; + + /** SearchCatalogResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteTagRequest instance using the specified properties. + * Creates a new SearchCatalogResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTagRequest instance + * @returns SearchCatalogResponse instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagRequest): google.cloud.datacatalog.v1beta1.DeleteTagRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode + * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. + * @param message SearchCatalogResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode + * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. + * @param message SearchCatalogResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. + * Decodes a SearchCatalogResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTagRequest + * @returns SearchCatalogResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTagRequest + * @returns SearchCatalogResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; /** - * Verifies a DeleteTagRequest message. + * Verifies a SearchCatalogResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTagRequest + * @returns SearchCatalogResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @param message DeleteTagRequest + * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. + * @param message SearchCatalogResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTagRequest to JSON. + * Converts this SearchCatalogResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTagTemplateFieldRequest. */ - interface ICreateTagTemplateFieldRequest { + /** Properties of a CreateEntryGroupRequest. */ + interface ICreateEntryGroupRequest { - /** CreateTagTemplateFieldRequest parent */ + /** CreateEntryGroupRequest parent */ parent?: (string|null); - /** CreateTagTemplateFieldRequest tagTemplateFieldId */ - tagTemplateFieldId?: (string|null); + /** CreateEntryGroupRequest entryGroupId */ + entryGroupId?: (string|null); - /** CreateTagTemplateFieldRequest tagTemplateField */ - tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); + /** CreateEntryGroupRequest entryGroup */ + entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); } - /** Represents a CreateTagTemplateFieldRequest. */ - class CreateTagTemplateFieldRequest implements ICreateTagTemplateFieldRequest { + /** Represents a CreateEntryGroupRequest. */ + class CreateEntryGroupRequest implements ICreateEntryGroupRequest { /** - * Constructs a new CreateTagTemplateFieldRequest. + * Constructs a new CreateEntryGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest); - /** CreateTagTemplateFieldRequest parent. */ + /** CreateEntryGroupRequest parent. */ public parent: string; - /** CreateTagTemplateFieldRequest tagTemplateFieldId. */ - public tagTemplateFieldId: string; + /** CreateEntryGroupRequest entryGroupId. */ + public entryGroupId: string; - /** CreateTagTemplateFieldRequest tagTemplateField. */ - public tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); + /** CreateEntryGroupRequest entryGroup. */ + public entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); /** - * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. + * Creates a new CreateEntryGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTagTemplateFieldRequest instance + * @returns CreateEntryGroupRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; /** - * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @param message CreateTagTemplateFieldRequest message or plain object to encode + * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. + * @param message CreateEntryGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @param message CreateTagTemplateFieldRequest message or plain object to encode + * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. + * @param message CreateEntryGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. + * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTagTemplateFieldRequest + * @returns CreateEntryGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTagTemplateFieldRequest + * @returns CreateEntryGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; /** - * Verifies a CreateTagTemplateFieldRequest message. + * Verifies a CreateEntryGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTagTemplateFieldRequest + * @returns CreateEntryGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; /** - * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message CreateTagTemplateFieldRequest + * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. + * @param message CreateEntryGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTagTemplateFieldRequest to JSON. + * Converts this CreateEntryGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateTagTemplateFieldRequest. */ - interface IUpdateTagTemplateFieldRequest { + /** Properties of a GetEntryGroupRequest. */ + interface IGetEntryGroupRequest { - /** UpdateTagTemplateFieldRequest name */ + /** GetEntryGroupRequest name */ name?: (string|null); - /** UpdateTagTemplateFieldRequest tagTemplateField */ - tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - - /** UpdateTagTemplateFieldRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GetEntryGroupRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UpdateTagTemplateFieldRequest. */ - class UpdateTagTemplateFieldRequest implements IUpdateTagTemplateFieldRequest { + /** Represents a GetEntryGroupRequest. */ + class GetEntryGroupRequest implements IGetEntryGroupRequest { /** - * Constructs a new UpdateTagTemplateFieldRequest. + * Constructs a new GetEntryGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest); - /** UpdateTagTemplateFieldRequest name. */ + /** GetEntryGroupRequest name. */ public name: string; - /** UpdateTagTemplateFieldRequest tagTemplateField. */ - public tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - - /** UpdateTagTemplateFieldRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GetEntryGroupRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. + * Creates a new GetEntryGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTagTemplateFieldRequest instance + * @returns GetEntryGroupRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; /** - * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @param message UpdateTagTemplateFieldRequest message or plain object to encode + * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. + * @param message GetEntryGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @param message UpdateTagTemplateFieldRequest message or plain object to encode + * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. + * @param message GetEntryGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. + * Decodes a GetEntryGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTagTemplateFieldRequest + * @returns GetEntryGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTagTemplateFieldRequest + * @returns GetEntryGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; /** - * Verifies an UpdateTagTemplateFieldRequest message. + * Verifies a GetEntryGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTagTemplateFieldRequest + * @returns GetEntryGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; /** - * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message UpdateTagTemplateFieldRequest + * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. + * @param message GetEntryGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.GetEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTagTemplateFieldRequest to JSON. + * Converts this GetEntryGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RenameTagTemplateFieldRequest. */ - interface IRenameTagTemplateFieldRequest { + /** Properties of a DeleteEntryGroupRequest. */ + interface IDeleteEntryGroupRequest { - /** RenameTagTemplateFieldRequest name */ + /** DeleteEntryGroupRequest name */ name?: (string|null); - - /** RenameTagTemplateFieldRequest newTagTemplateFieldId */ - newTagTemplateFieldId?: (string|null); } - /** Represents a RenameTagTemplateFieldRequest. */ - class RenameTagTemplateFieldRequest implements IRenameTagTemplateFieldRequest { + /** Represents a DeleteEntryGroupRequest. */ + class DeleteEntryGroupRequest implements IDeleteEntryGroupRequest { /** - * Constructs a new RenameTagTemplateFieldRequest. + * Constructs a new DeleteEntryGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest); - /** RenameTagTemplateFieldRequest name. */ + /** DeleteEntryGroupRequest name. */ public name: string; - /** RenameTagTemplateFieldRequest newTagTemplateFieldId. */ - public newTagTemplateFieldId: string; - /** - * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. + * Creates a new DeleteEntryGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RenameTagTemplateFieldRequest instance + * @returns DeleteEntryGroupRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; /** - * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldRequest message or plain object to encode + * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. + * @param message DeleteEntryGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldRequest message or plain object to encode + * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. + * @param message DeleteEntryGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. + * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RenameTagTemplateFieldRequest + * @returns DeleteEntryGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RenameTagTemplateFieldRequest + * @returns DeleteEntryGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; /** - * Verifies a RenameTagTemplateFieldRequest message. + * Verifies a DeleteEntryGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RenameTagTemplateFieldRequest + * @returns DeleteEntryGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; /** - * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message RenameTagTemplateFieldRequest + * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. + * @param message DeleteEntryGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RenameTagTemplateFieldRequest to JSON. + * Converts this DeleteEntryGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTagTemplateFieldRequest. */ - interface IDeleteTagTemplateFieldRequest { + /** Properties of a CreateEntryRequest. */ + interface ICreateEntryRequest { - /** DeleteTagTemplateFieldRequest name */ - name?: (string|null); + /** CreateEntryRequest parent */ + parent?: (string|null); - /** DeleteTagTemplateFieldRequest force */ - force?: (boolean|null); + /** CreateEntryRequest entryId */ + entryId?: (string|null); + + /** CreateEntryRequest entry */ + entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); } - /** Represents a DeleteTagTemplateFieldRequest. */ - class DeleteTagTemplateFieldRequest implements IDeleteTagTemplateFieldRequest { + /** Represents a CreateEntryRequest. */ + class CreateEntryRequest implements ICreateEntryRequest { /** - * Constructs a new DeleteTagTemplateFieldRequest. + * Constructs a new CreateEntryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryRequest); - /** DeleteTagTemplateFieldRequest name. */ - public name: string; + /** CreateEntryRequest parent. */ + public parent: string; - /** DeleteTagTemplateFieldRequest force. */ - public force: boolean; + /** CreateEntryRequest entryId. */ + public entryId: string; + + /** CreateEntryRequest entry. */ + public entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); /** - * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. + * Creates a new CreateEntryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTagTemplateFieldRequest instance + * @returns CreateEntryRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryRequest): google.cloud.datacatalog.v1beta1.CreateEntryRequest; /** - * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @param message DeleteTagTemplateFieldRequest message or plain object to encode + * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. + * @param message CreateEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @param message DeleteTagTemplateFieldRequest message or plain object to encode + * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. + * @param message CreateEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. + * Decodes a CreateEntryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTagTemplateFieldRequest + * @returns CreateEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateEntryRequest; /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTagTemplateFieldRequest + * @returns CreateEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateEntryRequest; /** - * Verifies a DeleteTagTemplateFieldRequest message. + * Verifies a CreateEntryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTagTemplateFieldRequest + * @returns CreateEntryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateEntryRequest; /** - * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message DeleteTagTemplateFieldRequest + * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. + * @param message CreateEntryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.CreateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTagTemplateFieldRequest to JSON. + * Converts this CreateEntryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTagsRequest. */ - interface IListTagsRequest { - - /** ListTagsRequest parent */ - parent?: (string|null); + /** Properties of an UpdateEntryRequest. */ + interface IUpdateEntryRequest { - /** ListTagsRequest pageSize */ - pageSize?: (number|null); + /** UpdateEntryRequest entry */ + entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); - /** ListTagsRequest pageToken */ - pageToken?: (string|null); + /** UpdateEntryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListTagsRequest. */ - class ListTagsRequest implements IListTagsRequest { + /** Represents an UpdateEntryRequest. */ + class UpdateEntryRequest implements IUpdateEntryRequest { /** - * Constructs a new ListTagsRequest. + * Constructs a new UpdateEntryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListTagsRequest); + constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest); - /** ListTagsRequest parent. */ - public parent: string; + /** UpdateEntryRequest entry. */ + public entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); - /** ListTagsRequest pageSize. */ - public pageSize: number; - - /** ListTagsRequest pageToken. */ - public pageToken: string; + /** UpdateEntryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListTagsRequest instance using the specified properties. + * Creates a new UpdateEntryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTagsRequest instance + * @returns UpdateEntryRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListTagsRequest): google.cloud.datacatalog.v1beta1.ListTagsRequest; + public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode + * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. + * @param message UpdateEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode + * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. + * @param message UpdateEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTagsRequest message from the specified reader or buffer. + * Decodes an UpdateEntryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTagsRequest + * @returns UpdateEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTagsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTagsRequest + * @returns UpdateEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTagsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; /** - * Verifies a ListTagsRequest message. + * Verifies an UpdateEntryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTagsRequest + * @returns UpdateEntryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTagsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @param message ListTagsRequest + * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. + * @param message UpdateEntryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTagsRequest to JSON. + * Converts this UpdateEntryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTagsResponse. */ - interface IListTagsResponse { - - /** ListTagsResponse tags */ - tags?: (google.cloud.datacatalog.v1beta1.ITag[]|null); + /** Properties of a DeleteEntryRequest. */ + interface IDeleteEntryRequest { - /** ListTagsResponse nextPageToken */ - nextPageToken?: (string|null); + /** DeleteEntryRequest name */ + name?: (string|null); } - /** Represents a ListTagsResponse. */ - class ListTagsResponse implements IListTagsResponse { + /** Represents a DeleteEntryRequest. */ + class DeleteEntryRequest implements IDeleteEntryRequest { /** - * Constructs a new ListTagsResponse. + * Constructs a new DeleteEntryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListTagsResponse); - - /** ListTagsResponse tags. */ - public tags: google.cloud.datacatalog.v1beta1.ITag[]; + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest); - /** ListTagsResponse nextPageToken. */ - public nextPageToken: string; + /** DeleteEntryRequest name. */ + public name: string; /** - * Creates a new ListTagsResponse instance using the specified properties. + * Creates a new DeleteEntryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTagsResponse instance + * @returns DeleteEntryRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListTagsResponse): google.cloud.datacatalog.v1beta1.ListTagsResponse; + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode + * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. + * @param message DeleteEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode + * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. + * @param message DeleteEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTagsResponse message from the specified reader or buffer. + * Decodes a DeleteEntryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTagsResponse + * @returns DeleteEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTagsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTagsResponse + * @returns DeleteEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTagsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; /** - * Verifies a ListTagsResponse message. + * Verifies a DeleteEntryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTagsResponse + * @returns DeleteEntryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTagsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @param message ListTagsResponse + * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. + * @param message DeleteEntryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTagsResponse to JSON. + * Converts this DeleteEntryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsFilesetSpec. */ - interface IGcsFilesetSpec { - - /** GcsFilesetSpec filePatterns */ - filePatterns?: (string[]|null); + /** Properties of a GetEntryRequest. */ + interface IGetEntryRequest { - /** GcsFilesetSpec sampleGcsFileSpecs */ - sampleGcsFileSpecs?: (google.cloud.datacatalog.v1beta1.IGcsFileSpec[]|null); + /** GetEntryRequest name */ + name?: (string|null); } - /** Represents a GcsFilesetSpec. */ - class GcsFilesetSpec implements IGcsFilesetSpec { + /** Represents a GetEntryRequest. */ + class GetEntryRequest implements IGetEntryRequest { /** - * Constructs a new GcsFilesetSpec. + * Constructs a new GetEntryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec); - - /** GcsFilesetSpec filePatterns. */ - public filePatterns: string[]; + constructor(properties?: google.cloud.datacatalog.v1beta1.IGetEntryRequest); - /** GcsFilesetSpec sampleGcsFileSpecs. */ - public sampleGcsFileSpecs: google.cloud.datacatalog.v1beta1.IGcsFileSpec[]; + /** GetEntryRequest name. */ + public name: string; /** - * Creates a new GcsFilesetSpec instance using the specified properties. + * Creates a new GetEntryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GcsFilesetSpec instance + * @returns GetEntryRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; + public static create(properties?: google.cloud.datacatalog.v1beta1.IGetEntryRequest): google.cloud.datacatalog.v1beta1.GetEntryRequest; /** - * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. - * @param message GcsFilesetSpec message or plain object to encode + * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. + * @param message GetEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. - * @param message GcsFilesetSpec message or plain object to encode + * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. + * @param message GetEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer. + * Decodes a GetEntryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsFilesetSpec + * @returns GetEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetEntryRequest; /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. + * Decodes a GetEntryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsFilesetSpec + * @returns GetEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetEntryRequest; /** - * Verifies a GcsFilesetSpec message. + * Verifies a GetEntryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsFilesetSpec + * @returns GetEntryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetEntryRequest; /** - * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. - * @param message GcsFilesetSpec + * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. + * @param message GetEntryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GcsFilesetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.GetEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsFilesetSpec to JSON. + * Converts this GetEntryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsFileSpec. */ - interface IGcsFileSpec { - - /** GcsFileSpec filePath */ - filePath?: (string|null); + /** Properties of a LookupEntryRequest. */ + interface ILookupEntryRequest { - /** GcsFileSpec gcsTimestamps */ - gcsTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + /** LookupEntryRequest linkedResource */ + linkedResource?: (string|null); - /** GcsFileSpec sizeBytes */ - sizeBytes?: (number|Long|null); + /** LookupEntryRequest sqlResource */ + sqlResource?: (string|null); } - /** Represents a GcsFileSpec. */ - class GcsFileSpec implements IGcsFileSpec { + /** Represents a LookupEntryRequest. */ + class LookupEntryRequest implements ILookupEntryRequest { /** - * Constructs a new GcsFileSpec. + * Constructs a new LookupEntryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGcsFileSpec); + constructor(properties?: google.cloud.datacatalog.v1beta1.ILookupEntryRequest); - /** GcsFileSpec filePath. */ - public filePath: string; + /** LookupEntryRequest linkedResource. */ + public linkedResource: string; - /** GcsFileSpec gcsTimestamps. */ - public gcsTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + /** LookupEntryRequest sqlResource. */ + public sqlResource: string; - /** GcsFileSpec sizeBytes. */ - public sizeBytes: (number|Long); + /** LookupEntryRequest targetName. */ + public targetName?: ("linkedResource"|"sqlResource"); /** - * Creates a new GcsFileSpec instance using the specified properties. + * Creates a new LookupEntryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GcsFileSpec instance + * @returns LookupEntryRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGcsFileSpec): google.cloud.datacatalog.v1beta1.GcsFileSpec; + public static create(properties?: google.cloud.datacatalog.v1beta1.ILookupEntryRequest): google.cloud.datacatalog.v1beta1.LookupEntryRequest; /** - * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. - * @param message GcsFileSpec message or plain object to encode + * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. + * @param message LookupEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. - * @param message GcsFileSpec message or plain object to encode + * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. + * @param message LookupEntryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsFileSpec message from the specified reader or buffer. + * Decodes a LookupEntryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsFileSpec + * @returns LookupEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GcsFileSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.LookupEntryRequest; /** - * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. + * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsFileSpec + * @returns LookupEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GcsFileSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.LookupEntryRequest; /** - * Verifies a GcsFileSpec message. + * Verifies a LookupEntryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsFileSpec + * @returns LookupEntryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GcsFileSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.LookupEntryRequest; /** - * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. - * @param message GcsFileSpec + * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. + * @param message LookupEntryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GcsFileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.LookupEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsFileSpec to JSON. + * Converts this LookupEntryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SystemTimestamps. */ - interface ISystemTimestamps { + /** Properties of an Entry. */ + interface IEntry { - /** SystemTimestamps createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Entry name */ + name?: (string|null); - /** SystemTimestamps updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Entry linkedResource */ + linkedResource?: (string|null); - /** SystemTimestamps expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** Entry type */ + type?: (google.cloud.datacatalog.v1beta1.EntryType|null); + + /** Entry gcsFilesetSpec */ + gcsFilesetSpec?: (google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null); + + /** Entry bigqueryTableSpec */ + bigqueryTableSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null); + + /** Entry bigqueryDateShardedSpec */ + bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null); + + /** Entry displayName */ + displayName?: (string|null); + + /** Entry description */ + description?: (string|null); + + /** Entry schema */ + schema?: (google.cloud.datacatalog.v1beta1.ISchema|null); + + /** Entry sourceSystemTimestamps */ + sourceSystemTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); } - /** Represents a SystemTimestamps. */ - class SystemTimestamps implements ISystemTimestamps { + /** Represents an Entry. */ + class Entry implements IEntry { /** - * Constructs a new SystemTimestamps. + * Constructs a new Entry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISystemTimestamps); + constructor(properties?: google.cloud.datacatalog.v1beta1.IEntry); - /** SystemTimestamps createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Entry name. */ + public name: string; - /** SystemTimestamps updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Entry linkedResource. */ + public linkedResource: string; - /** SystemTimestamps expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** Entry type. */ + public type: google.cloud.datacatalog.v1beta1.EntryType; + + /** Entry gcsFilesetSpec. */ + public gcsFilesetSpec?: (google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null); + + /** Entry bigqueryTableSpec. */ + public bigqueryTableSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null); + + /** Entry bigqueryDateShardedSpec. */ + public bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null); + + /** Entry displayName. */ + public displayName: string; + + /** Entry description. */ + public description: string; + + /** Entry schema. */ + public schema?: (google.cloud.datacatalog.v1beta1.ISchema|null); + + /** Entry sourceSystemTimestamps. */ + public sourceSystemTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); + + /** Entry entryType. */ + public entryType?: "type"; + + /** Entry typeSpec. */ + public typeSpec?: ("gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"); /** - * Creates a new SystemTimestamps instance using the specified properties. + * Creates a new Entry instance using the specified properties. * @param [properties] Properties to set - * @returns SystemTimestamps instance + * @returns Entry instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISystemTimestamps): google.cloud.datacatalog.v1beta1.SystemTimestamps; + public static create(properties?: google.cloud.datacatalog.v1beta1.IEntry): google.cloud.datacatalog.v1beta1.Entry; /** - * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. - * @param message SystemTimestamps message or plain object to encode + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. - * @param message SystemTimestamps message or plain object to encode + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SystemTimestamps message from the specified reader or buffer. + * Decodes an Entry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SystemTimestamps + * @returns Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SystemTimestamps; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Entry; /** - * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. + * Decodes an Entry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SystemTimestamps + * @returns Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SystemTimestamps; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Entry; /** - * Verifies a SystemTimestamps message. + * Verifies an Entry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. + * Creates an Entry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SystemTimestamps + * @returns Entry */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SystemTimestamps; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Entry; /** - * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. - * @param message SystemTimestamps + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SystemTimestamps, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SystemTimestamps to JSON. + * Converts this Entry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Schema. */ - interface ISchema { + /** Properties of an EntryGroup. */ + interface IEntryGroup { - /** Schema columns */ - columns?: (google.cloud.datacatalog.v1beta1.IColumnSchema[]|null); + /** EntryGroup name */ + name?: (string|null); + + /** EntryGroup displayName */ + displayName?: (string|null); + + /** EntryGroup description */ + description?: (string|null); + + /** EntryGroup dataCatalogTimestamps */ + dataCatalogTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); } - /** Represents a Schema. */ - class Schema implements ISchema { + /** Represents an EntryGroup. */ + class EntryGroup implements IEntryGroup { /** - * Constructs a new Schema. + * Constructs a new EntryGroup. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISchema); + constructor(properties?: google.cloud.datacatalog.v1beta1.IEntryGroup); - /** Schema columns. */ - public columns: google.cloud.datacatalog.v1beta1.IColumnSchema[]; + /** EntryGroup name. */ + public name: string; + + /** EntryGroup displayName. */ + public displayName: string; + + /** EntryGroup description. */ + public description: string; + + /** EntryGroup dataCatalogTimestamps. */ + public dataCatalogTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); /** - * Creates a new Schema instance using the specified properties. + * Creates a new EntryGroup instance using the specified properties. * @param [properties] Properties to set - * @returns Schema instance + * @returns EntryGroup instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISchema): google.cloud.datacatalog.v1beta1.Schema; + public static create(properties?: google.cloud.datacatalog.v1beta1.IEntryGroup): google.cloud.datacatalog.v1beta1.EntryGroup; /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode + * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. + * @param message EntryGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode + * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. + * @param message EntryGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Schema message from the specified reader or buffer. + * Decodes an EntryGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Schema + * @returns EntryGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Schema; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.EntryGroup; /** - * Decodes a Schema message from the specified reader or buffer, length delimited. + * Decodes an EntryGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Schema + * @returns EntryGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Schema; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.EntryGroup; /** - * Verifies a Schema message. + * Verifies an EntryGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Schema + * @returns EntryGroup */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Schema; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.EntryGroup; /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @param message Schema + * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. + * @param message EntryGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.EntryGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Schema to JSON. + * Converts this EntryGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ColumnSchema. */ - interface IColumnSchema { - - /** ColumnSchema column */ - column?: (string|null); - - /** ColumnSchema type */ - type?: (string|null); + /** Properties of a CreateTagTemplateRequest. */ + interface ICreateTagTemplateRequest { - /** ColumnSchema description */ - description?: (string|null); + /** CreateTagTemplateRequest parent */ + parent?: (string|null); - /** ColumnSchema mode */ - mode?: (string|null); + /** CreateTagTemplateRequest tagTemplateId */ + tagTemplateId?: (string|null); - /** ColumnSchema subcolumns */ - subcolumns?: (google.cloud.datacatalog.v1beta1.IColumnSchema[]|null); + /** CreateTagTemplateRequest tagTemplate */ + tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); } - /** Represents a ColumnSchema. */ - class ColumnSchema implements IColumnSchema { - + /** Represents a CreateTagTemplateRequest. */ + class CreateTagTemplateRequest implements ICreateTagTemplateRequest { + /** - * Constructs a new ColumnSchema. + * Constructs a new CreateTagTemplateRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IColumnSchema); - - /** ColumnSchema column. */ - public column: string; - - /** ColumnSchema type. */ - public type: string; + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest); - /** ColumnSchema description. */ - public description: string; + /** CreateTagTemplateRequest parent. */ + public parent: string; - /** ColumnSchema mode. */ - public mode: string; + /** CreateTagTemplateRequest tagTemplateId. */ + public tagTemplateId: string; - /** ColumnSchema subcolumns. */ - public subcolumns: google.cloud.datacatalog.v1beta1.IColumnSchema[]; + /** CreateTagTemplateRequest tagTemplate. */ + public tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); /** - * Creates a new ColumnSchema instance using the specified properties. + * Creates a new CreateTagTemplateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ColumnSchema instance + * @returns CreateTagTemplateRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IColumnSchema): google.cloud.datacatalog.v1beta1.ColumnSchema; + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; /** - * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. - * @param message ColumnSchema message or plain object to encode + * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. + * @param message CreateTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. - * @param message ColumnSchema message or plain object to encode + * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. + * @param message CreateTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ColumnSchema message from the specified reader or buffer. + * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ColumnSchema + * @returns CreateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ColumnSchema; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; /** - * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. + * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ColumnSchema + * @returns CreateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ColumnSchema; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; /** - * Verifies a ColumnSchema message. + * Verifies a CreateTagTemplateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ColumnSchema + * @returns CreateTagTemplateRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ColumnSchema; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; /** - * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. - * @param message ColumnSchema + * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. + * @param message CreateTagTemplateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ColumnSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ColumnSchema to JSON. + * Converts this CreateTagTemplateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SearchCatalogResult. */ - interface ISearchCatalogResult { - - /** SearchCatalogResult searchResultType */ - searchResultType?: (google.cloud.datacatalog.v1beta1.SearchResultType|null); - - /** SearchCatalogResult searchResultSubtype */ - searchResultSubtype?: (string|null); - - /** SearchCatalogResult relativeResourceName */ - relativeResourceName?: (string|null); + /** Properties of a GetTagTemplateRequest. */ + interface IGetTagTemplateRequest { - /** SearchCatalogResult linkedResource */ - linkedResource?: (string|null); + /** GetTagTemplateRequest name */ + name?: (string|null); } - /** Represents a SearchCatalogResult. */ - class SearchCatalogResult implements ISearchCatalogResult { + /** Represents a GetTagTemplateRequest. */ + class GetTagTemplateRequest implements IGetTagTemplateRequest { /** - * Constructs a new SearchCatalogResult. + * Constructs a new GetTagTemplateRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResult); - - /** SearchCatalogResult searchResultType. */ - public searchResultType: google.cloud.datacatalog.v1beta1.SearchResultType; - - /** SearchCatalogResult searchResultSubtype. */ - public searchResultSubtype: string; - - /** SearchCatalogResult relativeResourceName. */ - public relativeResourceName: string; + constructor(properties?: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest); - /** SearchCatalogResult linkedResource. */ - public linkedResource: string; + /** GetTagTemplateRequest name. */ + public name: string; /** - * Creates a new SearchCatalogResult instance using the specified properties. + * Creates a new GetTagTemplateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SearchCatalogResult instance + * @returns GetTagTemplateRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResult): google.cloud.datacatalog.v1beta1.SearchCatalogResult; + public static create(properties?: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; /** - * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. - * @param message SearchCatalogResult message or plain object to encode + * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. + * @param message GetTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. - * @param message SearchCatalogResult message or plain object to encode + * Encodes the specified GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. + * @param message GetTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchCatalogResult message from the specified reader or buffer. + * Decodes a GetTagTemplateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchCatalogResult + * @returns GetTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; /** - * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. + * Decodes a GetTagTemplateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchCatalogResult + * @returns GetTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; /** - * Verifies a SearchCatalogResult message. + * Verifies a GetTagTemplateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. + * Creates a GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchCatalogResult + * @returns GetTagTemplateRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogResult; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; /** - * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. - * @param message SearchCatalogResult + * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. + * @param message GetTagTemplateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.GetTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchCatalogResult to JSON. + * Converts this GetTagTemplateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** SearchResultType enum. */ - enum SearchResultType { - SEARCH_RESULT_TYPE_UNSPECIFIED = 0, - ENTRY = 1, - TAG_TEMPLATE = 2, - ENTRY_GROUP = 3 + /** EntryType enum. */ + enum EntryType { + ENTRY_TYPE_UNSPECIFIED = 0, + TABLE = 2, + DATA_STREAM = 3, + FILESET = 4 } - /** Properties of a BigQueryTableSpec. */ - interface IBigQueryTableSpec { - - /** BigQueryTableSpec tableSourceType */ - tableSourceType?: (google.cloud.datacatalog.v1beta1.TableSourceType|null); + /** Properties of an UpdateTagTemplateRequest. */ + interface IUpdateTagTemplateRequest { - /** BigQueryTableSpec viewSpec */ - viewSpec?: (google.cloud.datacatalog.v1beta1.IViewSpec|null); + /** UpdateTagTemplateRequest tagTemplate */ + tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - /** BigQueryTableSpec tableSpec */ - tableSpec?: (google.cloud.datacatalog.v1beta1.ITableSpec|null); + /** UpdateTagTemplateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a BigQueryTableSpec. */ - class BigQueryTableSpec implements IBigQueryTableSpec { + /** Represents an UpdateTagTemplateRequest. */ + class UpdateTagTemplateRequest implements IUpdateTagTemplateRequest { /** - * Constructs a new BigQueryTableSpec. + * Constructs a new UpdateTagTemplateRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec); - - /** BigQueryTableSpec tableSourceType. */ - public tableSourceType: google.cloud.datacatalog.v1beta1.TableSourceType; - - /** BigQueryTableSpec viewSpec. */ - public viewSpec?: (google.cloud.datacatalog.v1beta1.IViewSpec|null); + constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest); - /** BigQueryTableSpec tableSpec. */ - public tableSpec?: (google.cloud.datacatalog.v1beta1.ITableSpec|null); + /** UpdateTagTemplateRequest tagTemplate. */ + public tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - /** BigQueryTableSpec typeSpec. */ - public typeSpec?: ("viewSpec"|"tableSpec"); + /** UpdateTagTemplateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new BigQueryTableSpec instance using the specified properties. + * Creates a new UpdateTagTemplateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryTableSpec instance + * @returns UpdateTagTemplateRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; + public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; /** - * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. - * @param message BigQueryTableSpec message or plain object to encode + * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. + * @param message UpdateTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. - * @param message BigQueryTableSpec message or plain object to encode + * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. + * @param message UpdateTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer. + * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryTableSpec + * @returns UpdateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryTableSpec + * @returns UpdateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; /** - * Verifies a BigQueryTableSpec message. + * Verifies an UpdateTagTemplateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryTableSpec + * @returns UpdateTagTemplateRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; /** - * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. - * @param message BigQueryTableSpec + * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. + * @param message UpdateTagTemplateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.BigQueryTableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryTableSpec to JSON. + * Converts this UpdateTagTemplateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** TableSourceType enum. */ - enum TableSourceType { - TABLE_SOURCE_TYPE_UNSPECIFIED = 0, - BIGQUERY_VIEW = 2, - BIGQUERY_TABLE = 5 - } + /** Properties of a DeleteTagTemplateRequest. */ + interface IDeleteTagTemplateRequest { - /** Properties of a ViewSpec. */ - interface IViewSpec { + /** DeleteTagTemplateRequest name */ + name?: (string|null); - /** ViewSpec viewQuery */ - viewQuery?: (string|null); + /** DeleteTagTemplateRequest force */ + force?: (boolean|null); } - /** Represents a ViewSpec. */ - class ViewSpec implements IViewSpec { + /** Represents a DeleteTagTemplateRequest. */ + class DeleteTagTemplateRequest implements IDeleteTagTemplateRequest { /** - * Constructs a new ViewSpec. + * Constructs a new DeleteTagTemplateRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IViewSpec); + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest); - /** ViewSpec viewQuery. */ - public viewQuery: string; + /** DeleteTagTemplateRequest name. */ + public name: string; + + /** DeleteTagTemplateRequest force. */ + public force: boolean; /** - * Creates a new ViewSpec instance using the specified properties. + * Creates a new DeleteTagTemplateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ViewSpec instance + * @returns DeleteTagTemplateRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IViewSpec): google.cloud.datacatalog.v1beta1.ViewSpec; + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; /** - * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. - * @param message ViewSpec message or plain object to encode + * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. + * @param message DeleteTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. - * @param message ViewSpec message or plain object to encode + * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. + * @param message DeleteTagTemplateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ViewSpec message from the specified reader or buffer. + * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ViewSpec + * @returns DeleteTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ViewSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; /** - * Decodes a ViewSpec message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ViewSpec + * @returns DeleteTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ViewSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; /** - * Verifies a ViewSpec message. + * Verifies a DeleteTagTemplateRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ViewSpec + * @returns DeleteTagTemplateRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ViewSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; /** - * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. - * @param message ViewSpec + * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. + * @param message DeleteTagTemplateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ViewSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ViewSpec to JSON. + * Converts this DeleteTagTemplateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TableSpec. */ - interface ITableSpec { + /** Properties of a CreateTagRequest. */ + interface ICreateTagRequest { - /** TableSpec groupedEntry */ - groupedEntry?: (string|null); + /** CreateTagRequest parent */ + parent?: (string|null); + + /** CreateTagRequest tag */ + tag?: (google.cloud.datacatalog.v1beta1.ITag|null); } - /** Represents a TableSpec. */ - class TableSpec implements ITableSpec { + /** Represents a CreateTagRequest. */ + class CreateTagRequest implements ICreateTagRequest { /** - * Constructs a new TableSpec. + * Constructs a new CreateTagRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITableSpec); + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagRequest); - /** TableSpec groupedEntry. */ - public groupedEntry: string; + /** CreateTagRequest parent. */ + public parent: string; + + /** CreateTagRequest tag. */ + public tag?: (google.cloud.datacatalog.v1beta1.ITag|null); /** - * Creates a new TableSpec instance using the specified properties. + * Creates a new CreateTagRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TableSpec instance + * @returns CreateTagRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITableSpec): google.cloud.datacatalog.v1beta1.TableSpec; + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagRequest): google.cloud.datacatalog.v1beta1.CreateTagRequest; /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TableSpec message from the specified reader or buffer. + * Decodes a CreateTagRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TableSpec + * @returns CreateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TableSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagRequest; /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TableSpec + * @returns CreateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TableSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagRequest; /** - * Verifies a TableSpec message. + * Verifies a CreateTagRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TableSpec + * @returns CreateTagRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TableSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagRequest; /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. - * @param message TableSpec + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * @param message CreateTagRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TableSpec to JSON. + * Converts this CreateTagRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BigQueryDateShardedSpec. */ - interface IBigQueryDateShardedSpec { - - /** BigQueryDateShardedSpec dataset */ - dataset?: (string|null); + /** Properties of an UpdateTagRequest. */ + interface IUpdateTagRequest { - /** BigQueryDateShardedSpec tablePrefix */ - tablePrefix?: (string|null); + /** UpdateTagRequest tag */ + tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - /** BigQueryDateShardedSpec shardCount */ - shardCount?: (number|Long|null); + /** UpdateTagRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a BigQueryDateShardedSpec. */ - class BigQueryDateShardedSpec implements IBigQueryDateShardedSpec { + /** Represents an UpdateTagRequest. */ + class UpdateTagRequest implements IUpdateTagRequest { /** - * Constructs a new BigQueryDateShardedSpec. + * Constructs a new UpdateTagRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec); - - /** BigQueryDateShardedSpec dataset. */ - public dataset: string; + constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagRequest); - /** BigQueryDateShardedSpec tablePrefix. */ - public tablePrefix: string; + /** UpdateTagRequest tag. */ + public tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - /** BigQueryDateShardedSpec shardCount. */ - public shardCount: (number|Long); + /** UpdateTagRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new BigQueryDateShardedSpec instance using the specified properties. + * Creates a new UpdateTagRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryDateShardedSpec instance + * @returns UpdateTagRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; + public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagRequest): google.cloud.datacatalog.v1beta1.UpdateTagRequest; /** - * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. - * @param message BigQueryDateShardedSpec message or plain object to encode + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. + * @param message UpdateTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. - * @param message BigQueryDateShardedSpec message or plain object to encode + * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. + * @param message UpdateTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. + * Decodes an UpdateTagRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryDateShardedSpec + * @returns UpdateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagRequest; /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryDateShardedSpec + * @returns UpdateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagRequest; /** - * Verifies a BigQueryDateShardedSpec message. + * Verifies an UpdateTagRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryDateShardedSpec + * @returns UpdateTagRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagRequest; /** - * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. - * @param message BigQueryDateShardedSpec + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * @param message UpdateTagRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryDateShardedSpec to JSON. + * Converts this UpdateTagRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Tag. */ - interface ITag { + /** Properties of a DeleteTagRequest. */ + interface IDeleteTagRequest { - /** Tag name */ + /** DeleteTagRequest name */ name?: (string|null); - - /** Tag template */ - template?: (string|null); - - /** Tag templateDisplayName */ - templateDisplayName?: (string|null); - - /** Tag column */ - column?: (string|null); - - /** Tag fields */ - fields?: ({ [k: string]: google.cloud.datacatalog.v1beta1.ITagField }|null); } - /** Represents a Tag. */ - class Tag implements ITag { + /** Represents a DeleteTagRequest. */ + class DeleteTagRequest implements IDeleteTagRequest { /** - * Constructs a new Tag. + * Constructs a new DeleteTagRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITag); + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagRequest); - /** Tag name. */ + /** DeleteTagRequest name. */ public name: string; - /** Tag template. */ - public template: string; - - /** Tag templateDisplayName. */ - public templateDisplayName: string; - - /** Tag column. */ - public column: string; - - /** Tag fields. */ - public fields: { [k: string]: google.cloud.datacatalog.v1beta1.ITagField }; - - /** Tag scope. */ - public scope?: "column"; - /** - * Creates a new Tag instance using the specified properties. + * Creates a new DeleteTagRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Tag instance + * @returns DeleteTagRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITag): google.cloud.datacatalog.v1beta1.Tag; + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagRequest): google.cloud.datacatalog.v1beta1.DeleteTagRequest; /** - * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. + * @param message DeleteTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode + * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. + * @param message DeleteTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Tag message from the specified reader or buffer. + * Decodes a DeleteTagRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Tag + * @returns DeleteTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Tag; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagRequest; /** - * Decodes a Tag message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Tag + * @returns DeleteTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Tag; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagRequest; /** - * Verifies a Tag message. + * Verifies a DeleteTagRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Tag + * @returns DeleteTagRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Tag; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagRequest; /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @param message Tag + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * @param message DeleteTagRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Tag to JSON. + * Converts this DeleteTagRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TagField. */ - interface ITagField { - - /** TagField displayName */ - displayName?: (string|null); - - /** TagField doubleValue */ - doubleValue?: (number|null); - - /** TagField stringValue */ - stringValue?: (string|null); + /** Properties of a CreateTagTemplateFieldRequest. */ + interface ICreateTagTemplateFieldRequest { - /** TagField boolValue */ - boolValue?: (boolean|null); + /** CreateTagTemplateFieldRequest parent */ + parent?: (string|null); - /** TagField timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); + /** CreateTagTemplateFieldRequest tagTemplateFieldId */ + tagTemplateFieldId?: (string|null); - /** TagField enumValue */ - enumValue?: (google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null); + /** CreateTagTemplateFieldRequest tagTemplateField */ + tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); } - /** Represents a TagField. */ - class TagField implements ITagField { + /** Represents a CreateTagTemplateFieldRequest. */ + class CreateTagTemplateFieldRequest implements ICreateTagTemplateFieldRequest { /** - * Constructs a new TagField. + * Constructs a new CreateTagTemplateFieldRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITagField); - - /** TagField displayName. */ - public displayName: string; - - /** TagField doubleValue. */ - public doubleValue: number; - - /** TagField stringValue. */ - public stringValue: string; - - /** TagField boolValue. */ - public boolValue: boolean; + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest); - /** TagField timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); + /** CreateTagTemplateFieldRequest parent. */ + public parent: string; - /** TagField enumValue. */ - public enumValue?: (google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null); + /** CreateTagTemplateFieldRequest tagTemplateFieldId. */ + public tagTemplateFieldId: string; - /** TagField kind. */ - public kind?: ("doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"); + /** CreateTagTemplateFieldRequest tagTemplateField. */ + public tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); /** - * Creates a new TagField instance using the specified properties. + * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TagField instance + * @returns CreateTagTemplateFieldRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITagField): google.cloud.datacatalog.v1beta1.TagField; + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; /** - * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. - * @param message TagField message or plain object to encode + * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. + * @param message CreateTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. - * @param message TagField message or plain object to encode + * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. + * @param message CreateTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TagField message from the specified reader or buffer. + * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TagField + * @returns CreateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagField; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; /** - * Decodes a TagField message from the specified reader or buffer, length delimited. + * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TagField + * @returns CreateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagField; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; /** - * Verifies a TagField message. + * Verifies a CreateTagTemplateFieldRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TagField message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TagField + * @returns CreateTagTemplateFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagField; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; /** - * Creates a plain object from a TagField message. Also converts values to other types if specified. - * @param message TagField + * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. + * @param message CreateTagTemplateFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TagField to JSON. + * Converts this CreateTagTemplateFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace TagField { - - /** Properties of an EnumValue. */ - interface IEnumValue { + /** Properties of an UpdateTagTemplateFieldRequest. */ + interface IUpdateTagTemplateFieldRequest { - /** EnumValue displayName */ - displayName?: (string|null); - } + /** UpdateTagTemplateFieldRequest name */ + name?: (string|null); - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { + /** UpdateTagTemplateFieldRequest tagTemplateField */ + tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.TagField.IEnumValue); + /** UpdateTagTemplateFieldRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** EnumValue displayName. */ - public displayName: string; + /** Represents an UpdateTagTemplateFieldRequest. */ + class UpdateTagTemplateFieldRequest implements IUpdateTagTemplateFieldRequest { - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.TagField.IEnumValue): google.cloud.datacatalog.v1beta1.TagField.EnumValue; + /** + * Constructs a new UpdateTagTemplateFieldRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest); - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateTagTemplateFieldRequest name. */ + public name: string; - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateTagTemplateFieldRequest tagTemplateField. */ + public tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagField.EnumValue; + /** UpdateTagTemplateFieldRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagField.EnumValue; + /** + * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTagTemplateFieldRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; - /** - * Verifies an EnumValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagField.EnumValue; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @param message EnumValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagField.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a TagTemplate. */ - interface ITagTemplate { - - /** TagTemplate name */ - name?: (string|null); - - /** TagTemplate displayName */ - displayName?: (string|null); - - /** TagTemplate fields */ - fields?: ({ [k: string]: google.cloud.datacatalog.v1beta1.ITagTemplateField }|null); - } - - /** Represents a TagTemplate. */ - class TagTemplate implements ITagTemplate { - - /** - * Constructs a new TagTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITagTemplate); - - /** TagTemplate name. */ - public name: string; - - /** TagTemplate displayName. */ - public displayName: string; - - /** TagTemplate fields. */ - public fields: { [k: string]: google.cloud.datacatalog.v1beta1.ITagTemplateField }; - - /** - * Creates a new TagTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns TagTemplate instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITagTemplate): google.cloud.datacatalog.v1beta1.TagTemplate; - - /** - * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. - * @param message TagTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. + * @param message UpdateTagTemplateFieldRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. - * @param message TagTemplate message or plain object to encode + * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. + * @param message UpdateTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TagTemplate message from the specified reader or buffer. + * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TagTemplate + * @returns UpdateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagTemplate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; /** - * Decodes a TagTemplate message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TagTemplate + * @returns UpdateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagTemplate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; /** - * Verifies a TagTemplate message. + * Verifies an UpdateTagTemplateFieldRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TagTemplate + * @returns UpdateTagTemplateFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagTemplate; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; /** - * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. - * @param message TagTemplate + * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. + * @param message UpdateTagTemplateFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TagTemplate to JSON. + * Converts this UpdateTagTemplateFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TagTemplateField. */ - interface ITagTemplateField { + /** Properties of a RenameTagTemplateFieldRequest. */ + interface IRenameTagTemplateFieldRequest { - /** TagTemplateField name */ + /** RenameTagTemplateFieldRequest name */ name?: (string|null); - /** TagTemplateField displayName */ - displayName?: (string|null); - - /** TagTemplateField type */ - type?: (google.cloud.datacatalog.v1beta1.IFieldType|null); + /** RenameTagTemplateFieldRequest newTagTemplateFieldId */ + newTagTemplateFieldId?: (string|null); } - /** Represents a TagTemplateField. */ - class TagTemplateField implements ITagTemplateField { + /** Represents a RenameTagTemplateFieldRequest. */ + class RenameTagTemplateFieldRequest implements IRenameTagTemplateFieldRequest { /** - * Constructs a new TagTemplateField. + * Constructs a new RenameTagTemplateFieldRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITagTemplateField); + constructor(properties?: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest); - /** TagTemplateField name. */ + /** RenameTagTemplateFieldRequest name. */ public name: string; - /** TagTemplateField displayName. */ - public displayName: string; - - /** TagTemplateField type. */ - public type?: (google.cloud.datacatalog.v1beta1.IFieldType|null); + /** RenameTagTemplateFieldRequest newTagTemplateFieldId. */ + public newTagTemplateFieldId: string; /** - * Creates a new TagTemplateField instance using the specified properties. + * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TagTemplateField instance + * @returns RenameTagTemplateFieldRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITagTemplateField): google.cloud.datacatalog.v1beta1.TagTemplateField; + public static create(properties?: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; /** - * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. - * @param message TagTemplateField message or plain object to encode + * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. + * @param message RenameTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. - * @param message TagTemplateField message or plain object to encode + * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. + * @param message RenameTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TagTemplateField message from the specified reader or buffer. + * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TagTemplateField + * @returns RenameTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagTemplateField; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; /** - * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. + * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TagTemplateField + * @returns RenameTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagTemplateField; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; /** - * Verifies a TagTemplateField message. + * Verifies a RenameTagTemplateFieldRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. + * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TagTemplateField + * @returns RenameTagTemplateFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagTemplateField; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; /** - * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. - * @param message TagTemplateField + * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. + * @param message RenameTagTemplateFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagTemplateField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TagTemplateField to JSON. + * Converts this RenameTagTemplateFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldType. */ - interface IFieldType { + /** Properties of a DeleteTagTemplateFieldRequest. */ + interface IDeleteTagTemplateFieldRequest { - /** FieldType primitiveType */ - primitiveType?: (google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null); + /** DeleteTagTemplateFieldRequest name */ + name?: (string|null); - /** FieldType enumType */ - enumType?: (google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null); + /** DeleteTagTemplateFieldRequest force */ + force?: (boolean|null); } - /** Represents a FieldType. */ - class FieldType implements IFieldType { + /** Represents a DeleteTagTemplateFieldRequest. */ + class DeleteTagTemplateFieldRequest implements IDeleteTagTemplateFieldRequest { /** - * Constructs a new FieldType. + * Constructs a new DeleteTagTemplateFieldRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IFieldType); - - /** FieldType primitiveType. */ - public primitiveType: google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType; + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest); - /** FieldType enumType. */ - public enumType?: (google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null); + /** DeleteTagTemplateFieldRequest name. */ + public name: string; - /** FieldType typeDecl. */ - public typeDecl?: ("primitiveType"|"enumType"); + /** DeleteTagTemplateFieldRequest force. */ + public force: boolean; /** - * Creates a new FieldType instance using the specified properties. + * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FieldType instance + * @returns DeleteTagTemplateFieldRequest instance */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IFieldType): google.cloud.datacatalog.v1beta1.FieldType; + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; /** - * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. - * @param message FieldType message or plain object to encode + * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. + * @param message DeleteTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.v1beta1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. - * @param message FieldType message or plain object to encode + * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. + * @param message DeleteTagTemplateFieldRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldType message from the specified reader or buffer. + * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldType + * @returns DeleteTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; /** - * Decodes a FieldType message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldType + * @returns DeleteTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; /** - * Verifies a FieldType message. + * Verifies a DeleteTagTemplateFieldRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldType message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldType + * @returns DeleteTagTemplateFieldRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; /** - * Creates a plain object from a FieldType message. Also converts values to other types if specified. - * @param message FieldType + * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. + * @param message DeleteTagTemplateFieldRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldType to JSON. + * Converts this DeleteTagTemplateFieldRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace FieldType { + /** Properties of a ListTagsRequest. */ + interface IListTagsRequest { - /** Properties of an EnumType. */ - interface IEnumType { - - /** EnumType allowedValues */ - allowedValues?: (google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue[]|null); - } + /** ListTagsRequest parent */ + parent?: (string|null); - /** Represents an EnumType. */ - class EnumType implements IEnumType { + /** ListTagsRequest pageSize */ + pageSize?: (number|null); - /** - * Constructs a new EnumType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.FieldType.IEnumType); + /** ListTagsRequest pageToken */ + pageToken?: (string|null); + } - /** EnumType allowedValues. */ - public allowedValues: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue[]; + /** Represents a ListTagsRequest. */ + class ListTagsRequest implements IListTagsRequest { - /** - * Creates a new EnumType instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumType instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.FieldType.IEnumType): google.cloud.datacatalog.v1beta1.FieldType.EnumType; + /** + * Constructs a new ListTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IListTagsRequest); - /** - * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @param message EnumType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListTagsRequest parent. */ + public parent: string; - /** - * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @param message EnumType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListTagsRequest pageSize. */ + public pageSize: number; - /** - * Decodes an EnumType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType.EnumType; + /** ListTagsRequest pageToken. */ + public pageToken: string; - /** - * Decodes an EnumType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType.EnumType; + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IListTagsRequest): google.cloud.datacatalog.v1beta1.ListTagsRequest; - /** - * Verifies an EnumType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an EnumType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType.EnumType; + /** + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an EnumType message. Also converts values to other types if specified. - * @param message EnumType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTagsRequest; - /** - * Converts this EnumType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTagsRequest; - namespace EnumType { + /** + * Verifies a ListTagsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of an EnumValue. */ - interface IEnumValue { + /** + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTagsRequest; - /** EnumValue displayName */ - displayName?: (string|null); - } + /** + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * @param message ListTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { + /** + * Converts this ListTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue); + /** Properties of a ListTagsResponse. */ + interface IListTagsResponse { - /** EnumValue displayName. */ - public displayName: string; + /** ListTagsResponse tags */ + tags?: (google.cloud.datacatalog.v1beta1.ITag[]|null); - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + /** ListTagsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ListTagsResponse. */ + class ListTagsResponse implements IListTagsResponse { - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ListTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IListTagsResponse); - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + /** ListTagsResponse tags. */ + public tags: google.cloud.datacatalog.v1beta1.ITag[]; - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + /** ListTagsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Verifies an EnumValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IListTagsResponse): google.cloud.datacatalog.v1beta1.ListTagsResponse; - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; + /** + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @param message EnumValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTagsResponse; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTagsResponse; + + /** + * Verifies a ListTagsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTagsResponse; + + /** + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * @param message ListTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a PolicyTagManager */ + class PolicyTagManager extends $protobuf.rpc.Service { + + /** + * Constructs a new PolicyTagManager service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new PolicyTagManager service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PolicyTagManager; + + /** + * Calls CreateTaxonomy. + * @param request CreateTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Taxonomy + */ + public createTaxonomy(request: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomyCallback): void; + + /** + * Calls CreateTaxonomy. + * @param request CreateTaxonomyRequest message or plain object + * @returns Promise + */ + public createTaxonomy(request: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest): Promise; + + /** + * Calls DeleteTaxonomy. + * @param request DeleteTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTaxonomy(request: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomyCallback): void; + + /** + * Calls DeleteTaxonomy. + * @param request DeleteTaxonomyRequest message or plain object + * @returns Promise + */ + public deleteTaxonomy(request: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest): Promise; + + /** + * Calls UpdateTaxonomy. + * @param request UpdateTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Taxonomy + */ + public updateTaxonomy(request: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomyCallback): void; + + /** + * Calls UpdateTaxonomy. + * @param request UpdateTaxonomyRequest message or plain object + * @returns Promise + */ + public updateTaxonomy(request: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest): Promise; + + /** + * Calls ListTaxonomies. + * @param request ListTaxonomiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTaxonomiesResponse + */ + public listTaxonomies(request: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomiesCallback): void; + + /** + * Calls ListTaxonomies. + * @param request ListTaxonomiesRequest message or plain object + * @returns Promise + */ + public listTaxonomies(request: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest): Promise; + + /** + * Calls GetTaxonomy. + * @param request GetTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Taxonomy + */ + public getTaxonomy(request: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomyCallback): void; + + /** + * Calls GetTaxonomy. + * @param request GetTaxonomyRequest message or plain object + * @returns Promise + */ + public getTaxonomy(request: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest): Promise; + + /** + * Calls CreatePolicyTag. + * @param request CreatePolicyTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PolicyTag + */ + public createPolicyTag(request: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTagCallback): void; + + /** + * Calls CreatePolicyTag. + * @param request CreatePolicyTagRequest message or plain object + * @returns Promise + */ + public createPolicyTag(request: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest): Promise; + + /** + * Calls DeletePolicyTag. + * @param request DeletePolicyTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePolicyTag(request: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTagCallback): void; + + /** + * Calls DeletePolicyTag. + * @param request DeletePolicyTagRequest message or plain object + * @returns Promise + */ + public deletePolicyTag(request: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest): Promise; + + /** + * Calls UpdatePolicyTag. + * @param request UpdatePolicyTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PolicyTag + */ + public updatePolicyTag(request: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTagCallback): void; + + /** + * Calls UpdatePolicyTag. + * @param request UpdatePolicyTagRequest message or plain object + * @returns Promise + */ + public updatePolicyTag(request: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest): Promise; + + /** + * Calls ListPolicyTags. + * @param request ListPolicyTagsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPolicyTagsResponse + */ + public listPolicyTags(request: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTagsCallback): void; + + /** + * Calls ListPolicyTags. + * @param request ListPolicyTagsRequest message or plain object + * @returns Promise + */ + public listPolicyTags(request: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest): Promise; + + /** + * Calls GetPolicyTag. + * @param request GetPolicyTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PolicyTag + */ + public getPolicyTag(request: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTagCallback): void; + + /** + * Calls GetPolicyTag. + * @param request GetPolicyTagRequest message or plain object + * @returns Promise + */ + public getPolicyTag(request: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace PolicyTagManager { + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#createTaxonomy}. + * @param error Error, if any + * @param [response] Taxonomy + */ + type CreateTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Taxonomy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#deleteTaxonomy}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTaxonomyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#updateTaxonomy}. + * @param error Error, if any + * @param [response] Taxonomy + */ + type UpdateTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Taxonomy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#listTaxonomies}. + * @param error Error, if any + * @param [response] ListTaxonomiesResponse + */ + type ListTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#getTaxonomy}. + * @param error Error, if any + * @param [response] Taxonomy + */ + type GetTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Taxonomy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#createPolicyTag}. + * @param error Error, if any + * @param [response] PolicyTag + */ + type CreatePolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.PolicyTag) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#deletePolicyTag}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePolicyTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#updatePolicyTag}. + * @param error Error, if any + * @param [response] PolicyTag + */ + type UpdatePolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.PolicyTag) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#listPolicyTags}. + * @param error Error, if any + * @param [response] ListPolicyTagsResponse + */ + type ListPolicyTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#getPolicyTag}. + * @param error Error, if any + * @param [response] PolicyTag + */ + type GetPolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.PolicyTag) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a Taxonomy. */ + interface ITaxonomy { + + /** Taxonomy name */ + name?: (string|null); + + /** Taxonomy displayName */ + displayName?: (string|null); + + /** Taxonomy description */ + description?: (string|null); + + /** Taxonomy activatedPolicyTypes */ + activatedPolicyTypes?: (google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]|null); + } + + /** Represents a Taxonomy. */ + class Taxonomy implements ITaxonomy { + + /** + * Constructs a new Taxonomy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.ITaxonomy); + + /** Taxonomy name. */ + public name: string; + + /** Taxonomy displayName. */ + public displayName: string; + + /** Taxonomy description. */ + public description: string; + + /** Taxonomy activatedPolicyTypes. */ + public activatedPolicyTypes: google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]; + + /** + * Creates a new Taxonomy instance using the specified properties. + * @param [properties] Properties to set + * @returns Taxonomy instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.ITaxonomy): google.cloud.datacatalog.v1beta1.Taxonomy; + + /** + * Encodes the specified Taxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. + * @param message Taxonomy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.ITaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Taxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. + * @param message Taxonomy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Taxonomy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Taxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Taxonomy; + + /** + * Decodes a Taxonomy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Taxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Taxonomy; + + /** + * Verifies a Taxonomy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Taxonomy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Taxonomy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Taxonomy; + + /** + * Creates a plain object from a Taxonomy message. Also converts values to other types if specified. + * @param message Taxonomy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.Taxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Taxonomy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Taxonomy { + + /** PolicyType enum. */ + enum PolicyType { + POLICY_TYPE_UNSPECIFIED = 0, + FINE_GRAINED_ACCESS_CONTROL = 1 + } + } + + /** Properties of a PolicyTag. */ + interface IPolicyTag { + + /** PolicyTag name */ + name?: (string|null); + + /** PolicyTag displayName */ + displayName?: (string|null); + + /** PolicyTag description */ + description?: (string|null); + + /** PolicyTag parentPolicyTag */ + parentPolicyTag?: (string|null); + + /** PolicyTag childPolicyTags */ + childPolicyTags?: (string[]|null); + } + + /** Represents a PolicyTag. */ + class PolicyTag implements IPolicyTag { + + /** + * Constructs a new PolicyTag. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IPolicyTag); + + /** PolicyTag name. */ + public name: string; + + /** PolicyTag displayName. */ + public displayName: string; + + /** PolicyTag description. */ + public description: string; + + /** PolicyTag parentPolicyTag. */ + public parentPolicyTag: string; + + /** PolicyTag childPolicyTags. */ + public childPolicyTags: string[]; + + /** + * Creates a new PolicyTag instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyTag instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IPolicyTag): google.cloud.datacatalog.v1beta1.PolicyTag; + + /** + * Encodes the specified PolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. + * @param message PolicyTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. + * @param message PolicyTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.PolicyTag; + + /** + * Decodes a PolicyTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.PolicyTag; + + /** + * Verifies a PolicyTag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyTag + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.PolicyTag; + + /** + * Creates a plain object from a PolicyTag message. Also converts values to other types if specified. + * @param message PolicyTag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.PolicyTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyTag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTaxonomyRequest. */ + interface ICreateTaxonomyRequest { + + /** CreateTaxonomyRequest parent */ + parent?: (string|null); + + /** CreateTaxonomyRequest taxonomy */ + taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); + } + + /** Represents a CreateTaxonomyRequest. */ + class CreateTaxonomyRequest implements ICreateTaxonomyRequest { + + /** + * Constructs a new CreateTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest); + + /** CreateTaxonomyRequest parent. */ + public parent: string; + + /** CreateTaxonomyRequest taxonomy. */ + public taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); + + /** + * Creates a new CreateTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaxonomyRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; + + /** + * Encodes the specified CreateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. + * @param message CreateTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. + * @param message CreateTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; + + /** + * Decodes a CreateTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; + + /** + * Verifies a CreateTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; + + /** + * Creates a plain object from a CreateTaxonomyRequest message. Also converts values to other types if specified. + * @param message CreateTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTaxonomyRequest. */ + interface IDeleteTaxonomyRequest { + + /** DeleteTaxonomyRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTaxonomyRequest. */ + class DeleteTaxonomyRequest implements IDeleteTaxonomyRequest { + + /** + * Constructs a new DeleteTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest); + + /** DeleteTaxonomyRequest name. */ + public name: string; + + /** + * Creates a new DeleteTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTaxonomyRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; + + /** + * Encodes the specified DeleteTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. + * @param message DeleteTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. + * @param message DeleteTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; + + /** + * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; + + /** + * Verifies a DeleteTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; + + /** + * Creates a plain object from a DeleteTaxonomyRequest message. Also converts values to other types if specified. + * @param message DeleteTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateTaxonomyRequest. */ + interface IUpdateTaxonomyRequest { + + /** UpdateTaxonomyRequest taxonomy */ + taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); + + /** UpdateTaxonomyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateTaxonomyRequest. */ + class UpdateTaxonomyRequest implements IUpdateTaxonomyRequest { + + /** + * Constructs a new UpdateTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest); + + /** UpdateTaxonomyRequest taxonomy. */ + public taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); + + /** UpdateTaxonomyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTaxonomyRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; + + /** + * Encodes the specified UpdateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. + * @param message UpdateTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. + * @param message UpdateTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; + + /** + * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; + + /** + * Verifies an UpdateTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; + + /** + * Creates a plain object from an UpdateTaxonomyRequest message. Also converts values to other types if specified. + * @param message UpdateTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTaxonomiesRequest. */ + interface IListTaxonomiesRequest { + + /** ListTaxonomiesRequest parent */ + parent?: (string|null); + + /** ListTaxonomiesRequest pageSize */ + pageSize?: (number|null); + + /** ListTaxonomiesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTaxonomiesRequest. */ + class ListTaxonomiesRequest implements IListTaxonomiesRequest { + + /** + * Constructs a new ListTaxonomiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest); + + /** ListTaxonomiesRequest parent. */ + public parent: string; + + /** ListTaxonomiesRequest pageSize. */ + public pageSize: number; + + /** ListTaxonomiesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTaxonomiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTaxonomiesRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; + + /** + * Encodes the specified ListTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. + * @param message ListTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. + * @param message ListTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTaxonomiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; + + /** + * Decodes a ListTaxonomiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; + + /** + * Verifies a ListTaxonomiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTaxonomiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; + + /** + * Creates a plain object from a ListTaxonomiesRequest message. Also converts values to other types if specified. + * @param message ListTaxonomiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTaxonomiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTaxonomiesResponse. */ + interface IListTaxonomiesResponse { + + /** ListTaxonomiesResponse taxonomies */ + taxonomies?: (google.cloud.datacatalog.v1beta1.ITaxonomy[]|null); + + /** ListTaxonomiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTaxonomiesResponse. */ + class ListTaxonomiesResponse implements IListTaxonomiesResponse { + + /** + * Constructs a new ListTaxonomiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse); + + /** ListTaxonomiesResponse taxonomies. */ + public taxonomies: google.cloud.datacatalog.v1beta1.ITaxonomy[]; + + /** ListTaxonomiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTaxonomiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTaxonomiesResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; + + /** + * Encodes the specified ListTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. + * @param message ListTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. + * @param message ListTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTaxonomiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; + + /** + * Decodes a ListTaxonomiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; + + /** + * Verifies a ListTaxonomiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTaxonomiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; + + /** + * Creates a plain object from a ListTaxonomiesResponse message. Also converts values to other types if specified. + * @param message ListTaxonomiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTaxonomiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTaxonomyRequest. */ + interface IGetTaxonomyRequest { + + /** GetTaxonomyRequest name */ + name?: (string|null); + } + + /** Represents a GetTaxonomyRequest. */ + class GetTaxonomyRequest implements IGetTaxonomyRequest { + + /** + * Constructs a new GetTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest); + + /** GetTaxonomyRequest name. */ + public name: string; + + /** + * Creates a new GetTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaxonomyRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; + + /** + * Encodes the specified GetTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. + * @param message GetTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. + * @param message GetTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; + + /** + * Decodes a GetTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; + + /** + * Verifies a GetTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; + + /** + * Creates a plain object from a GetTaxonomyRequest message. Also converts values to other types if specified. + * @param message GetTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.GetTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreatePolicyTagRequest. */ + interface ICreatePolicyTagRequest { + + /** CreatePolicyTagRequest parent */ + parent?: (string|null); + + /** CreatePolicyTagRequest policyTag */ + policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); + } + + /** Represents a CreatePolicyTagRequest. */ + class CreatePolicyTagRequest implements ICreatePolicyTagRequest { + + /** + * Constructs a new CreatePolicyTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest); + + /** CreatePolicyTagRequest parent. */ + public parent: string; + + /** CreatePolicyTagRequest policyTag. */ + public policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); + + /** + * Creates a new CreatePolicyTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePolicyTagRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; + + /** + * Encodes the specified CreatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. + * @param message CreatePolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. + * @param message CreatePolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePolicyTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; + + /** + * Decodes a CreatePolicyTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; + + /** + * Verifies a CreatePolicyTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePolicyTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; + + /** + * Creates a plain object from a CreatePolicyTagRequest message. Also converts values to other types if specified. + * @param message CreatePolicyTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePolicyTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeletePolicyTagRequest. */ + interface IDeletePolicyTagRequest { + + /** DeletePolicyTagRequest name */ + name?: (string|null); + } + + /** Represents a DeletePolicyTagRequest. */ + class DeletePolicyTagRequest implements IDeletePolicyTagRequest { + + /** + * Constructs a new DeletePolicyTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest); + + /** DeletePolicyTagRequest name. */ + public name: string; + + /** + * Creates a new DeletePolicyTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePolicyTagRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; + + /** + * Encodes the specified DeletePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. + * @param message DeletePolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. + * @param message DeletePolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePolicyTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; + + /** + * Decodes a DeletePolicyTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; + + /** + * Verifies a DeletePolicyTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePolicyTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePolicyTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; + + /** + * Creates a plain object from a DeletePolicyTagRequest message. Also converts values to other types if specified. + * @param message DeletePolicyTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePolicyTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdatePolicyTagRequest. */ + interface IUpdatePolicyTagRequest { + + /** UpdatePolicyTagRequest policyTag */ + policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); + + /** UpdatePolicyTagRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePolicyTagRequest. */ + class UpdatePolicyTagRequest implements IUpdatePolicyTagRequest { + + /** + * Constructs a new UpdatePolicyTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest); + + /** UpdatePolicyTagRequest policyTag. */ + public policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); + + /** UpdatePolicyTagRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePolicyTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePolicyTagRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; + + /** + * Encodes the specified UpdatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. + * @param message UpdatePolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. + * @param message UpdatePolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; + + /** + * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; + + /** + * Verifies an UpdatePolicyTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePolicyTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; + + /** + * Creates a plain object from an UpdatePolicyTagRequest message. Also converts values to other types if specified. + * @param message UpdatePolicyTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePolicyTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPolicyTagsRequest. */ + interface IListPolicyTagsRequest { + + /** ListPolicyTagsRequest parent */ + parent?: (string|null); + + /** ListPolicyTagsRequest pageSize */ + pageSize?: (number|null); + + /** ListPolicyTagsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPolicyTagsRequest. */ + class ListPolicyTagsRequest implements IListPolicyTagsRequest { + + /** + * Constructs a new ListPolicyTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest); + + /** ListPolicyTagsRequest parent. */ + public parent: string; + + /** ListPolicyTagsRequest pageSize. */ + public pageSize: number; + + /** ListPolicyTagsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPolicyTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPolicyTagsRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; + + /** + * Encodes the specified ListPolicyTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. + * @param message ListPolicyTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPolicyTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. + * @param message ListPolicyTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPolicyTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPolicyTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; + + /** + * Decodes a ListPolicyTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPolicyTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; + + /** + * Verifies a ListPolicyTagsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPolicyTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPolicyTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; + + /** + * Creates a plain object from a ListPolicyTagsRequest message. Also converts values to other types if specified. + * @param message ListPolicyTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPolicyTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPolicyTagsResponse. */ + interface IListPolicyTagsResponse { + + /** ListPolicyTagsResponse policyTags */ + policyTags?: (google.cloud.datacatalog.v1beta1.IPolicyTag[]|null); + + /** ListPolicyTagsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPolicyTagsResponse. */ + class ListPolicyTagsResponse implements IListPolicyTagsResponse { + + /** + * Constructs a new ListPolicyTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse); + + /** ListPolicyTagsResponse policyTags. */ + public policyTags: google.cloud.datacatalog.v1beta1.IPolicyTag[]; + + /** ListPolicyTagsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPolicyTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPolicyTagsResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; + + /** + * Encodes the specified ListPolicyTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. + * @param message ListPolicyTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPolicyTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. + * @param message ListPolicyTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPolicyTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPolicyTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; + + /** + * Decodes a ListPolicyTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPolicyTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; + + /** + * Verifies a ListPolicyTagsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPolicyTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPolicyTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; + + /** + * Creates a plain object from a ListPolicyTagsResponse message. Also converts values to other types if specified. + * @param message ListPolicyTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPolicyTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPolicyTagRequest. */ + interface IGetPolicyTagRequest { + + /** GetPolicyTagRequest name */ + name?: (string|null); + } + + /** Represents a GetPolicyTagRequest. */ + class GetPolicyTagRequest implements IGetPolicyTagRequest { + + /** + * Constructs a new GetPolicyTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest); + + /** GetPolicyTagRequest name. */ + public name: string; + + /** + * Creates a new GetPolicyTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyTagRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; + + /** + * Encodes the specified GetPolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. + * @param message GetPolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. + * @param message GetPolicyTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; + + /** + * Decodes a GetPolicyTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; + + /** + * Verifies a GetPolicyTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; + + /** + * Creates a plain object from a GetPolicyTagRequest message. Also converts values to other types if specified. + * @param message GetPolicyTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.GetPolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a PolicyTagManagerSerialization */ + class PolicyTagManagerSerialization extends $protobuf.rpc.Service { + + /** + * Constructs a new PolicyTagManagerSerialization service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new PolicyTagManagerSerialization service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PolicyTagManagerSerialization; + + /** + * Calls ImportTaxonomies. + * @param request ImportTaxonomiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ImportTaxonomiesResponse + */ + public importTaxonomies(request: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomiesCallback): void; + + /** + * Calls ImportTaxonomies. + * @param request ImportTaxonomiesRequest message or plain object + * @returns Promise + */ + public importTaxonomies(request: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest): Promise; + + /** + * Calls ExportTaxonomies. + * @param request ExportTaxonomiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExportTaxonomiesResponse + */ + public exportTaxonomies(request: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomiesCallback): void; + + /** + * Calls ExportTaxonomies. + * @param request ExportTaxonomiesRequest message or plain object + * @returns Promise + */ + public exportTaxonomies(request: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest): Promise; + } + + namespace PolicyTagManagerSerialization { + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization#importTaxonomies}. + * @param error Error, if any + * @param [response] ImportTaxonomiesResponse + */ + type ImportTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization#exportTaxonomies}. + * @param error Error, if any + * @param [response] ExportTaxonomiesResponse + */ + type ExportTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse) => void; + } + + /** Properties of a SerializedTaxonomy. */ + interface ISerializedTaxonomy { + + /** SerializedTaxonomy displayName */ + displayName?: (string|null); + + /** SerializedTaxonomy description */ + description?: (string|null); + + /** SerializedTaxonomy policyTags */ + policyTags?: (google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]|null); + } + + /** Represents a SerializedTaxonomy. */ + class SerializedTaxonomy implements ISerializedTaxonomy { + + /** + * Constructs a new SerializedTaxonomy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy); + + /** SerializedTaxonomy displayName. */ + public displayName: string; + + /** SerializedTaxonomy description. */ + public description: string; + + /** SerializedTaxonomy policyTags. */ + public policyTags: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]; + + /** + * Creates a new SerializedTaxonomy instance using the specified properties. + * @param [properties] Properties to set + * @returns SerializedTaxonomy instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; + + /** + * Encodes the specified SerializedTaxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. + * @param message SerializedTaxonomy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SerializedTaxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. + * @param message SerializedTaxonomy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SerializedTaxonomy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SerializedTaxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; + + /** + * Decodes a SerializedTaxonomy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SerializedTaxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; + + /** + * Verifies a SerializedTaxonomy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SerializedTaxonomy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SerializedTaxonomy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; + + /** + * Creates a plain object from a SerializedTaxonomy message. Also converts values to other types if specified. + * @param message SerializedTaxonomy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.SerializedTaxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SerializedTaxonomy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SerializedPolicyTag. */ + interface ISerializedPolicyTag { + + /** SerializedPolicyTag displayName */ + displayName?: (string|null); + + /** SerializedPolicyTag description */ + description?: (string|null); + + /** SerializedPolicyTag childPolicyTags */ + childPolicyTags?: (google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]|null); + } + + /** Represents a SerializedPolicyTag. */ + class SerializedPolicyTag implements ISerializedPolicyTag { + + /** + * Constructs a new SerializedPolicyTag. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag); + + /** SerializedPolicyTag displayName. */ + public displayName: string; + + /** SerializedPolicyTag description. */ + public description: string; + + /** SerializedPolicyTag childPolicyTags. */ + public childPolicyTags: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]; + + /** + * Creates a new SerializedPolicyTag instance using the specified properties. + * @param [properties] Properties to set + * @returns SerializedPolicyTag instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; + + /** + * Encodes the specified SerializedPolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. + * @param message SerializedPolicyTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SerializedPolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. + * @param message SerializedPolicyTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SerializedPolicyTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SerializedPolicyTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; + + /** + * Decodes a SerializedPolicyTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SerializedPolicyTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; + + /** + * Verifies a SerializedPolicyTag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SerializedPolicyTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SerializedPolicyTag + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; + + /** + * Creates a plain object from a SerializedPolicyTag message. Also converts values to other types if specified. + * @param message SerializedPolicyTag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.SerializedPolicyTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SerializedPolicyTag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImportTaxonomiesRequest. */ + interface IImportTaxonomiesRequest { + + /** ImportTaxonomiesRequest parent */ + parent?: (string|null); + + /** ImportTaxonomiesRequest inlineSource */ + inlineSource?: (google.cloud.datacatalog.v1beta1.IInlineSource|null); + } + + /** Represents an ImportTaxonomiesRequest. */ + class ImportTaxonomiesRequest implements IImportTaxonomiesRequest { + + /** + * Constructs a new ImportTaxonomiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest); + + /** ImportTaxonomiesRequest parent. */ + public parent: string; + + /** ImportTaxonomiesRequest inlineSource. */ + public inlineSource?: (google.cloud.datacatalog.v1beta1.IInlineSource|null); + + /** ImportTaxonomiesRequest source. */ + public source?: "inlineSource"; + + /** + * Creates a new ImportTaxonomiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportTaxonomiesRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; + + /** + * Encodes the specified ImportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. + * @param message ImportTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. + * @param message ImportTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; + + /** + * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; + + /** + * Verifies an ImportTaxonomiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportTaxonomiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; + + /** + * Creates a plain object from an ImportTaxonomiesRequest message. Also converts values to other types if specified. + * @param message ImportTaxonomiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportTaxonomiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InlineSource. */ + interface IInlineSource { + + /** InlineSource taxonomies */ + taxonomies?: (google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]|null); + } + + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { + + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IInlineSource); + + /** InlineSource taxonomies. */ + public taxonomies: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]; + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IInlineSource): google.cloud.datacatalog.v1beta1.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.InlineSource; + + /** + * Verifies an InlineSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImportTaxonomiesResponse. */ + interface IImportTaxonomiesResponse { + + /** ImportTaxonomiesResponse taxonomies */ + taxonomies?: (google.cloud.datacatalog.v1beta1.ITaxonomy[]|null); + } + + /** Represents an ImportTaxonomiesResponse. */ + class ImportTaxonomiesResponse implements IImportTaxonomiesResponse { + + /** + * Constructs a new ImportTaxonomiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse); + + /** ImportTaxonomiesResponse taxonomies. */ + public taxonomies: google.cloud.datacatalog.v1beta1.ITaxonomy[]; + + /** + * Creates a new ImportTaxonomiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportTaxonomiesResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; + + /** + * Encodes the specified ImportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. + * @param message ImportTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. + * @param message ImportTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; + + /** + * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; + + /** + * Verifies an ImportTaxonomiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportTaxonomiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; + + /** + * Creates a plain object from an ImportTaxonomiesResponse message. Also converts values to other types if specified. + * @param message ImportTaxonomiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportTaxonomiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExportTaxonomiesRequest. */ + interface IExportTaxonomiesRequest { + + /** ExportTaxonomiesRequest parent */ + parent?: (string|null); + + /** ExportTaxonomiesRequest taxonomies */ + taxonomies?: (string[]|null); + + /** ExportTaxonomiesRequest serializedTaxonomies */ + serializedTaxonomies?: (boolean|null); + } + + /** Represents an ExportTaxonomiesRequest. */ + class ExportTaxonomiesRequest implements IExportTaxonomiesRequest { + + /** + * Constructs a new ExportTaxonomiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest); + + /** ExportTaxonomiesRequest parent. */ + public parent: string; + + /** ExportTaxonomiesRequest taxonomies. */ + public taxonomies: string[]; + + /** ExportTaxonomiesRequest serializedTaxonomies. */ + public serializedTaxonomies: boolean; + + /** ExportTaxonomiesRequest destination. */ + public destination?: "serializedTaxonomies"; + + /** + * Creates a new ExportTaxonomiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportTaxonomiesRequest instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; + + /** + * Encodes the specified ExportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. + * @param message ExportTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. + * @param message ExportTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; + + /** + * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; + + /** + * Verifies an ExportTaxonomiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportTaxonomiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; + + /** + * Creates a plain object from an ExportTaxonomiesRequest message. Also converts values to other types if specified. + * @param message ExportTaxonomiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportTaxonomiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExportTaxonomiesResponse. */ + interface IExportTaxonomiesResponse { + + /** ExportTaxonomiesResponse taxonomies */ + taxonomies?: (google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]|null); + } + + /** Represents an ExportTaxonomiesResponse. */ + class ExportTaxonomiesResponse implements IExportTaxonomiesResponse { + + /** + * Constructs a new ExportTaxonomiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse); + + /** ExportTaxonomiesResponse taxonomies. */ + public taxonomies: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]; + + /** + * Creates a new ExportTaxonomiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportTaxonomiesResponse instance + */ + public static create(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; + + /** + * Encodes the specified ExportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. + * @param message ExportTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. + * @param message ExportTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; + + /** + * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; + + /** + * Verifies an ExportTaxonomiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportTaxonomiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; + + /** + * Creates a plain object from an ExportTaxonomiesResponse message. Also converts values to other types if specified. + * @param message ExportTaxonomiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportTaxonomiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: google.api.ResourceDescriptor.History; + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - /** PrimitiveType enum. */ - enum PrimitiveType { - PRIMITIVE_TYPE_UNSPECIFIED = 0, - DOUBLE = 1, - STRING = 2, - BOOL = 3, - TIMESTAMP = 4 - } - } - } - } - } + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Namespace api. */ - namespace api { + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } /** Properties of a Http. */ interface IHttp { @@ -5334,230 +7997,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: google.api.ResourceDescriptor.History; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** Namespace protobuf. */ @@ -7118,6 +9557,9 @@ export namespace google { /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } /** Represents a FileOptions. */ diff --git a/packages/google-cloud-datacatalog/protos/protos.js b/packages/google-cloud-datacatalog/protos/protos.js index a99d930225e..d36a82db5c9 100644 --- a/packages/google-cloud-datacatalog/protos/protos.js +++ b/packages/google-cloud-datacatalog/protos/protos.js @@ -1,3 +1,17 @@ +// 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 +// +// http://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. + /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ (function(global, factory) { /* global define, require, module */ @@ -52,855 +66,1150 @@ */ var v1beta1 = {}; - v1beta1.DataCatalog = (function() { + v1beta1.Tag = (function() { /** - * Constructs a new DataCatalog service. + * Properties of a Tag. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DataCatalog - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function DataCatalog(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataCatalog.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataCatalog; - - /** - * Creates new DataCatalog service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {DataCatalog} RPC service. Useful where requests and/or responses are streamed. - */ - DataCatalog.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#searchCatalog}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef SearchCatalogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} [response] SearchCatalogResponse + * @interface ITag + * @property {string|null} [name] Tag name + * @property {string|null} [template] Tag template + * @property {string|null} [templateDisplayName] Tag templateDisplayName + * @property {string|null} [column] Tag column + * @property {Object.|null} [fields] Tag fields */ /** - * Calls SearchCatalog. - * @function searchCatalog - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogCallback} callback Node-style callback called with the error, if any, and SearchCatalogResponse - * @returns {undefined} - * @variation 1 + * Constructs a new Tag. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a Tag. + * @implements ITag + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ITag=} [properties] Properties to set */ - Object.defineProperty(DataCatalog.prototype.searchCatalog = function searchCatalog(request, callback) { - return this.rpcCall(searchCatalog, $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest, $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse, request, callback); - }, "name", { value: "SearchCatalog" }); + function Tag(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls SearchCatalog. - * @function searchCatalog - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Tag name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup */ + Tag.prototype.name = ""; /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Tag template. + * @member {string} template + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.createEntryGroup = function createEntryGroup(request, callback) { - return this.rpcCall(createEntryGroup, $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); - }, "name", { value: "CreateEntryGroup" }); + Tag.prototype.template = ""; /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Tag templateDisplayName. + * @member {string} templateDisplayName + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup */ + Tag.prototype.templateDisplayName = ""; /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Tag column. + * @member {string} column + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.getEntryGroup = function getEntryGroup(request, callback) { - return this.rpcCall(getEntryGroup, $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); - }, "name", { value: "GetEntryGroup" }); + Tag.prototype.column = ""; /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Tag fields. + * @member {Object.} fields + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Tag.prototype.fields = $util.emptyObject; - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Tag scope. + * @member {"column"|undefined} scope + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroupCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.deleteEntryGroup = function deleteEntryGroup(request, callback) { - return this.rpcCall(deleteEntryGroup, $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntryGroup" }); + Object.defineProperty(Tag.prototype, "scope", { + get: $util.oneOfGetter($oneOfFields = ["column"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new Tag instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {google.cloud.datacatalog.v1beta1.ITag=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag instance */ + Tag.create = function create(properties) { + return new Tag(properties); + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {google.cloud.datacatalog.v1beta1.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Tag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.template != null && message.hasOwnProperty("template")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.template); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.datacatalog.v1beta1.TagField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.column != null && message.hasOwnProperty("column")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.column); + if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.templateDisplayName); + return writer; + }; /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {google.cloud.datacatalog.v1beta1.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataCatalog.prototype.createEntry = function createEntry(request, callback) { - return this.rpcCall(createEntry, $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "CreateEntry" }); + Tag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a Tag message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Tag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Tag(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.template = reader.string(); + break; + case 5: + message.templateDisplayName = reader.string(); + break; + case 4: + message.column = reader.string(); + break; + case 3: + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.cloud.datacatalog.v1beta1.TagField.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Tag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 + * Verifies a Tag message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataCatalog.prototype.updateEntry = function updateEntry(request, callback) { - return this.rpcCall(updateEntry, $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "UpdateEntry" }); + Tag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.template != null && message.hasOwnProperty("template")) + if (!$util.isString(message.template)) + return "template: string expected"; + if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) + if (!$util.isString(message.templateDisplayName)) + return "templateDisplayName: string expected"; + if (message.column != null && message.hasOwnProperty("column")) { + properties.scope = 1; + if (!$util.isString(message.column)) + return "column: string expected"; + } + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.TagField.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag */ + Tag.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.Tag) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.Tag(); + if (object.name != null) + message.name = String(object.name); + if (object.template != null) + message.template = String(object.template); + if (object.templateDisplayName != null) + message.templateDisplayName = String(object.templateDisplayName); + if (object.column != null) + message.column = String(object.column); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Tag.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Tag.fields: object expected"); + message.fields[keys[i]] = $root.google.cloud.datacatalog.v1beta1.TagField.fromObject(object.fields[keys[i]]); + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.Tag + * @static + * @param {google.cloud.datacatalog.v1beta1.Tag} message Tag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + Tag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + if (options.defaults) { + object.name = ""; + object.template = ""; + object.templateDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.template != null && message.hasOwnProperty("template")) + object.template = message.template; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1beta1.TagField.toObject(message.fields[keys2[j]], options); + } + if (message.column != null && message.hasOwnProperty("column")) { + object.column = message.column; + if (options.oneofs) + object.scope = "column"; + } + if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) + object.templateDisplayName = message.templateDisplayName; + return object; + }; /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Converts this Tag to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.Tag * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataCatalog.prototype.deleteEntry = function deleteEntry(request, callback) { - return this.rpcCall(deleteEntry, $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntry" }); + Tag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tag; + })(); + + v1beta1.TagField = (function() { /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a TagField. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ITagField + * @property {string|null} [displayName] TagField displayName + * @property {number|null} [doubleValue] TagField doubleValue + * @property {string|null} [stringValue] TagField stringValue + * @property {boolean|null} [boolValue] TagField boolValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] TagField timestampValue + * @property {google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null} [enumValue] TagField enumValue */ /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + * Constructs a new TagField. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a TagField. + * @implements ITagField + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ITagField=} [properties] Properties to set */ + function TagField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} request GetEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.getEntry = function getEntry(request, callback) { - return this.rpcCall(getEntry, $root.google.cloud.datacatalog.v1beta1.GetEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "GetEntry" }); + TagField.prototype.displayName = ""; /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField doubleValue. + * @member {number} doubleValue + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} request GetEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#lookupEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef LookupEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry */ + TagField.prototype.doubleValue = 0; /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField stringValue. + * @member {string} stringValue + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.lookupEntry = function lookupEntry(request, callback) { - return this.rpcCall(lookupEntry, $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "LookupEntry" }); + TagField.prototype.stringValue = ""; /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField boolValue. + * @member {boolean} boolValue + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate */ + TagField.prototype.boolValue = false; /** - * Calls CreateTagTemplate. - * @function createTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.createTagTemplate = function createTagTemplate(request, callback) { - return this.rpcCall(createTagTemplate, $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); - }, "name", { value: "CreateTagTemplate" }); + TagField.prototype.timestampValue = null; /** - * Calls CreateTagTemplate. - * @function createTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField enumValue. + * @member {google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null|undefined} enumValue + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TagField.prototype.enumValue = null; - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls GetTagTemplate. - * @function getTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagField kind. + * @member {"doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"|undefined} kind + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.getTagTemplate = function getTagTemplate(request, callback) { - return this.rpcCall(getTagTemplate, $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); - }, "name", { value: "GetTagTemplate" }); + Object.defineProperty(TagField.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["doubleValue", "stringValue", "boolValue", "timestampValue", "enumValue"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Calls GetTagTemplate. - * @function getTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new TagField instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {google.cloud.datacatalog.v1beta1.ITagField=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField instance */ + TagField.create = function create(properties) { + return new TagField(properties); + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate + * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {google.cloud.datacatalog.v1beta1.ITagField} message TagField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + TagField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) + $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.enumValue != null && message.hasOwnProperty("enumValue")) + $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.encode(message.enumValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; /** - * Calls UpdateTagTemplate. - * @function updateTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 + * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {google.cloud.datacatalog.v1beta1.ITagField} message TagField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataCatalog.prototype.updateTagTemplate = function updateTagTemplate(request, callback) { - return this.rpcCall(updateTagTemplate, $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); - }, "name", { value: "UpdateTagTemplate" }); + TagField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateTagTemplate. - * @function updateTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a TagField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + TagField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.doubleValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a TagField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + TagField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteTagTemplate. - * @function deleteTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTagTemplate = function deleteTagTemplate(request, callback) { - return this.rpcCall(deleteTagTemplate, $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTagTemplate" }); - - /** - * Calls DeleteTagTemplate. - * @function deleteTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a TagField message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + TagField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + properties.kind = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); + if (error) + return "timestampValue." + error; + } + } + if (message.enumValue != null && message.hasOwnProperty("enumValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify(message.enumValue); + if (error) + return "enumValue." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField + * Creates a TagField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField */ + TagField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagField) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.TagField(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.timestampValue != null) { + if (typeof object.timestampValue !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.TagField.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); + } + if (object.enumValue != null) { + if (typeof object.enumValue !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.TagField.enumValue: object expected"); + message.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.fromObject(object.enumValue); + } + return message; + }; /** - * Calls CreateTagTemplateField. - * @function createTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 + * Creates a plain object from a TagField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @static + * @param {google.cloud.datacatalog.v1beta1.TagField} message TagField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataCatalog.prototype.createTagTemplateField = function createTagTemplateField(request, callback) { - return this.rpcCall(createTagTemplateField, $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "CreateTagTemplateField" }); + TagField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayName = ""; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.kind = "doubleValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (options.oneofs) + object.kind = "timestampValue"; + } + if (message.enumValue != null && message.hasOwnProperty("enumValue")) { + object.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.toObject(message.enumValue, options); + if (options.oneofs) + object.kind = "enumValue"; + } + return object; + }; /** - * Calls CreateTagTemplateField. - * @function createTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Converts this TagField to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.TagField * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField + * @returns {Object.} JSON object */ + TagField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls UpdateTagTemplateField. - * @function updateTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTagTemplateField = function updateTagTemplateField(request, callback) { - return this.rpcCall(updateTagTemplateField, $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "UpdateTagTemplateField" }); + TagField.EnumValue = (function() { - /** - * Calls UpdateTagTemplateField. - * @function updateTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of an EnumValue. + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @interface IEnumValue + * @property {string|null} [displayName] EnumValue displayName + */ - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#renameTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef RenameTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField - */ + /** + * Constructs a new EnumValue. + * @memberof google.cloud.datacatalog.v1beta1.TagField + * @classdesc Represents an EnumValue. + * @implements IEnumValue + * @constructor + * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue=} [properties] Properties to set + */ + function EnumValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls RenameTagTemplateField. - * @function renameTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.renameTagTemplateField = function renameTagTemplateField(request, callback) { - return this.rpcCall(renameTagTemplateField, $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "RenameTagTemplateField" }); + /** + * EnumValue displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @instance + */ + EnumValue.prototype.displayName = ""; - /** - * Calls RenameTagTemplateField. - * @function renameTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new EnumValue instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue instance + */ + EnumValue.create = function create(properties) { + return new EnumValue(properties); + }; - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue} message EnumValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + return writer; + }; - /** - * Calls DeleteTagTemplateField. - * @function deleteTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTagTemplateField = function deleteTagTemplateField(request, callback) { - return this.rpcCall(deleteTagTemplateField, $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTagTemplateField" }); + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue} message EnumValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValue message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue + */ + EnumValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue(); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.TagField.EnumValue} message EnumValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayName = ""; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this EnumValue to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue + * @instance + * @returns {Object.} JSON object + */ + EnumValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValue; + })(); + + return TagField; + })(); + + v1beta1.TagTemplate = (function() { /** - * Calls DeleteTagTemplateField. - * @function deleteTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a TagTemplate. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ITagTemplate + * @property {string|null} [name] TagTemplate name + * @property {string|null} [displayName] TagTemplate displayName + * @property {Object.|null} [fields] TagTemplate fields */ /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTag}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Tag} [response] Tag + * Constructs a new TagTemplate. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a TagTemplate. + * @implements ITagTemplate + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ITagTemplate=} [properties] Properties to set */ + function TagTemplate(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateTag. - * @function createTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagTemplate name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} request CreateTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataCatalog.prototype.createTag = function createTag(request, callback) { - return this.rpcCall(createTag, $root.google.cloud.datacatalog.v1beta1.CreateTagRequest, $root.google.cloud.datacatalog.v1beta1.Tag, request, callback); - }, "name", { value: "CreateTag" }); + TagTemplate.prototype.name = ""; /** - * Calls CreateTag. - * @function createTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * TagTemplate displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} request CreateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TagTemplate.prototype.displayName = ""; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTag}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Tag} [response] Tag + * TagTemplate fields. + * @member {Object.} fields + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @instance */ + TagTemplate.prototype.fields = $util.emptyObject; /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 + * Creates a new TagTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {google.cloud.datacatalog.v1beta1.ITagTemplate=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate instance */ - Object.defineProperty(DataCatalog.prototype.updateTag = function updateTag(request, callback) { - return this.rpcCall(updateTag, $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest, $root.google.cloud.datacatalog.v1beta1.Tag, request, callback); - }, "name", { value: "UpdateTag" }); + TagTemplate.create = function create(properties) { + return new TagTemplate(properties); + }; /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTag}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {google.cloud.datacatalog.v1beta1.ITagTemplate} message TagTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + TagTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.fields != null && message.hasOwnProperty("fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {google.cloud.datacatalog.v1beta1.ITagTemplate} message TagTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataCatalog.prototype.deleteTag = function deleteTag(request, callback) { - return this.rpcCall(deleteTag, $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTag" }); + TagTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a TagTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + TagTemplate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagTemplate(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + reader.skip().pos++; + if (message.fields === $util.emptyObject) + message.fields = {}; + key = reader.string(); + reader.pos++; + message.fields[key] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#listTags}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef ListTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ListTagsResponse} [response] ListTagsResponse + * Decodes a TagTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + TagTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListTags. - * @function listTags - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} request ListTagsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse - * @returns {undefined} - * @variation 1 + * Verifies a TagTemplate message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataCatalog.prototype.listTags = function listTags(request, callback) { - return this.rpcCall(listTags, $root.google.cloud.datacatalog.v1beta1.ListTagsRequest, $root.google.cloud.datacatalog.v1beta1.ListTagsResponse, request, callback); - }, "name", { value: "ListTags" }); + TagTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; /** - * Calls ListTags. - * @function listTags - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} request ListTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate */ + TagTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagTemplate) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.TagTemplate(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplate.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplate.fields: object expected"); + message.fields[keys[i]] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.fields[keys[i]]); + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#setIamPolicy}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @static + * @param {google.cloud.datacatalog.v1beta1.TagTemplate} message TagTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + TagTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.fields[keys2[j]], options); + } + return object; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * Converts this TagTemplate to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.TagTemplate * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataCatalog.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); + TagTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TagTemplate; + })(); + + v1beta1.TagTemplateField = (function() { /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a TagTemplateField. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ITagTemplateField + * @property {string|null} [name] TagTemplateField name + * @property {string|null} [displayName] TagTemplateField displayName + * @property {google.cloud.datacatalog.v1beta1.IFieldType|null} [type] TagTemplateField type */ /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getIamPolicy}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#testIamPermissions}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DataCatalog; - })(); - - v1beta1.SearchCatalogRequest = (function() { - - /** - * Properties of a SearchCatalogRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISearchCatalogRequest - * @property {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null} [scope] SearchCatalogRequest scope - * @property {string|null} [query] SearchCatalogRequest query - * @property {number|null} [pageSize] SearchCatalogRequest pageSize - * @property {string|null} [pageToken] SearchCatalogRequest pageToken - * @property {string|null} [orderBy] SearchCatalogRequest orderBy - */ - - /** - * Constructs a new SearchCatalogRequest. + * Constructs a new TagTemplateField. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SearchCatalogRequest. - * @implements ISearchCatalogRequest + * @classdesc Represents a TagTemplateField. + * @implements ITagTemplateField * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField=} [properties] Properties to set */ - function SearchCatalogRequest(properties) { + function TagTemplateField(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -908,127 +1217,101 @@ } /** - * SearchCatalogRequest scope. - * @member {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null|undefined} scope - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.scope = null; - - /** - * SearchCatalogRequest query. - * @member {string} query - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.query = ""; - - /** - * SearchCatalogRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * TagTemplateField name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @instance */ - SearchCatalogRequest.prototype.pageSize = 0; + TagTemplateField.prototype.name = ""; /** - * SearchCatalogRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * TagTemplateField displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @instance */ - SearchCatalogRequest.prototype.pageToken = ""; + TagTemplateField.prototype.displayName = ""; /** - * SearchCatalogRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * TagTemplateField type. + * @member {google.cloud.datacatalog.v1beta1.IFieldType|null|undefined} type + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @instance */ - SearchCatalogRequest.prototype.orderBy = ""; + TagTemplateField.prototype.type = null; /** - * Creates a new SearchCatalogRequest instance using the specified properties. + * Creates a new TagTemplateField instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest instance + * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField instance */ - SearchCatalogRequest.create = function create(properties) { - return new SearchCatalogRequest(properties); + TagTemplateField.create = function create(properties) { + return new TagTemplateField(properties); }; /** - * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. + * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField} message TagTemplateField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchCatalogRequest.encode = function encode(message, writer) { + TagTemplateField.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && message.hasOwnProperty("query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.scope != null && message.hasOwnProperty("scope")) - $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.encode(message.scope, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.type != null && message.hasOwnProperty("type")) + $root.google.cloud.datacatalog.v1beta1.FieldType.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); return writer; }; /** - * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. + * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField} message TagTemplateField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchCatalogRequest.encodeDelimited = function encodeDelimited(message, writer) { + TagTemplateField.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer. + * Decodes a TagTemplateField message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest + * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchCatalogRequest.decode = function decode(reader, length) { + TagTemplateField.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagTemplateField(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 6: - message.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 1: - message.query = reader.string(); + message.displayName = reader.string(); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 5: - message.orderBy = reader.string(); + message.type = $root.google.cloud.datacatalog.v1beta1.FieldType.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1039,504 +1322,233 @@ }; /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. + * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest + * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchCatalogRequest.decodeDelimited = function decodeDelimited(reader) { + TagTemplateField.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchCatalogRequest message. + * Verifies a TagTemplateField message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchCatalogRequest.verify = function verify(message) { + TagTemplateField.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify(message.scope); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.cloud.datacatalog.v1beta1.FieldType.verify(message.type); if (error) - return "scope." + error; + return "type." + error; } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; return null; }; /** - * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest + * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField */ - SearchCatalogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest) + TagTemplateField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagTemplateField) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest(); - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.scope: object expected"); - message.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.fromObject(object.scope); - } - if (object.query != null) - message.query = String(object.query); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.datacatalog.v1beta1.TagTemplateField(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplateField.type: object expected"); + message.type = $root.google.cloud.datacatalog.v1beta1.FieldType.fromObject(object.type); + } return message; }; /** - * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. + * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} message SearchCatalogRequest + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} message TagTemplateField * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchCatalogRequest.toObject = function toObject(message, options) { + TagTemplateField.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.query = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.scope = null; + object.displayName = ""; + object.type = null; + object.name = ""; } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.toObject(message.scope, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.cloud.datacatalog.v1beta1.FieldType.toObject(message.type, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this SearchCatalogRequest to JSON. + * Converts this TagTemplateField to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField * @instance * @returns {Object.} JSON object */ - SearchCatalogRequest.prototype.toJSON = function toJSON() { + TagTemplateField.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SearchCatalogRequest.Scope = (function() { - - /** - * Properties of a Scope. - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @interface IScope - * @property {Array.|null} [includeOrgIds] Scope includeOrgIds - * @property {Array.|null} [includeProjectIds] Scope includeProjectIds - * @property {boolean|null} [includeGcpPublicDatasets] Scope includeGcpPublicDatasets - */ + return TagTemplateField; + })(); - /** - * Constructs a new Scope. - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @classdesc Represents a Scope. - * @implements IScope - * @constructor - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope=} [properties] Properties to set - */ - function Scope(properties) { - this.includeOrgIds = []; - this.includeProjectIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1beta1.FieldType = (function() { - /** - * Scope includeOrgIds. - * @member {Array.} includeOrgIds - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeOrgIds = $util.emptyArray; + /** + * Properties of a FieldType. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IFieldType + * @property {google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null} [primitiveType] FieldType primitiveType + * @property {google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null} [enumType] FieldType enumType + */ - /** - * Scope includeProjectIds. - * @member {Array.} includeProjectIds - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeProjectIds = $util.emptyArray; + /** + * Constructs a new FieldType. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a FieldType. + * @implements IFieldType + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IFieldType=} [properties] Properties to set + */ + function FieldType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Scope includeGcpPublicDatasets. - * @member {boolean} includeGcpPublicDatasets - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeGcpPublicDatasets = false; + /** + * FieldType primitiveType. + * @member {google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType} primitiveType + * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @instance + */ + FieldType.prototype.primitiveType = 0; - /** - * Creates a new Scope instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope instance - */ - Scope.create = function create(properties) { - return new Scope(properties); - }; + /** + * FieldType enumType. + * @member {google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null|undefined} enumType + * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @instance + */ + FieldType.prototype.enumType = null; - /** - * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope} message Scope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scope.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeOrgIds != null && message.includeOrgIds.length) - for (var i = 0; i < message.includeOrgIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includeOrgIds[i]); - if (message.includeProjectIds != null && message.includeProjectIds.length) - for (var i = 0; i < message.includeProjectIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.includeProjectIds[i]); - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.includeGcpPublicDatasets); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope} message Scope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scope.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FieldType typeDecl. + * @member {"primitiveType"|"enumType"|undefined} typeDecl + * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @instance + */ + Object.defineProperty(FieldType.prototype, "typeDecl", { + get: $util.oneOfGetter($oneOfFields = ["primitiveType", "enumType"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a Scope message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scope.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.includeOrgIds && message.includeOrgIds.length)) - message.includeOrgIds = []; - message.includeOrgIds.push(reader.string()); - break; - case 3: - if (!(message.includeProjectIds && message.includeProjectIds.length)) - message.includeProjectIds = []; - message.includeProjectIds.push(reader.string()); - break; - case 7: - message.includeGcpPublicDatasets = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scope message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scope.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scope message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scope.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.includeOrgIds != null && message.hasOwnProperty("includeOrgIds")) { - if (!Array.isArray(message.includeOrgIds)) - return "includeOrgIds: array expected"; - for (var i = 0; i < message.includeOrgIds.length; ++i) - if (!$util.isString(message.includeOrgIds[i])) - return "includeOrgIds: string[] expected"; - } - if (message.includeProjectIds != null && message.hasOwnProperty("includeProjectIds")) { - if (!Array.isArray(message.includeProjectIds)) - return "includeProjectIds: array expected"; - for (var i = 0; i < message.includeProjectIds.length; ++i) - if (!$util.isString(message.includeProjectIds[i])) - return "includeProjectIds: string[] expected"; - } - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - if (typeof message.includeGcpPublicDatasets !== "boolean") - return "includeGcpPublicDatasets: boolean expected"; - return null; - }; - - /** - * Creates a Scope message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope - */ - Scope.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope(); - if (object.includeOrgIds) { - if (!Array.isArray(object.includeOrgIds)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.includeOrgIds: array expected"); - message.includeOrgIds = []; - for (var i = 0; i < object.includeOrgIds.length; ++i) - message.includeOrgIds[i] = String(object.includeOrgIds[i]); - } - if (object.includeProjectIds) { - if (!Array.isArray(object.includeProjectIds)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.includeProjectIds: array expected"); - message.includeProjectIds = []; - for (var i = 0; i < object.includeProjectIds.length; ++i) - message.includeProjectIds[i] = String(object.includeProjectIds[i]); - } - if (object.includeGcpPublicDatasets != null) - message.includeGcpPublicDatasets = Boolean(object.includeGcpPublicDatasets); - return message; - }; - - /** - * Creates a plain object from a Scope message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} message Scope - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scope.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includeOrgIds = []; - object.includeProjectIds = []; - } - if (options.defaults) - object.includeGcpPublicDatasets = false; - if (message.includeOrgIds && message.includeOrgIds.length) { - object.includeOrgIds = []; - for (var j = 0; j < message.includeOrgIds.length; ++j) - object.includeOrgIds[j] = message.includeOrgIds[j]; - } - if (message.includeProjectIds && message.includeProjectIds.length) { - object.includeProjectIds = []; - for (var j = 0; j < message.includeProjectIds.length; ++j) - object.includeProjectIds[j] = message.includeProjectIds[j]; - } - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - object.includeGcpPublicDatasets = message.includeGcpPublicDatasets; - return object; - }; - - /** - * Converts this Scope to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - * @returns {Object.} JSON object - */ - Scope.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Scope; - })(); - - return SearchCatalogRequest; - })(); - - v1beta1.SearchCatalogResponse = (function() { - - /** - * Properties of a SearchCatalogResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISearchCatalogResponse - * @property {Array.|null} [results] SearchCatalogResponse results - * @property {string|null} [nextPageToken] SearchCatalogResponse nextPageToken - */ - - /** - * Constructs a new SearchCatalogResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SearchCatalogResponse. - * @implements ISearchCatalogResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse=} [properties] Properties to set - */ - function SearchCatalogResponse(properties) { - this.results = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogResponse results. - * @member {Array.} results - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.results = $util.emptyArray; - - /** - * SearchCatalogResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.nextPageToken = ""; - - /** - * Creates a new SearchCatalogResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse instance - */ - SearchCatalogResponse.create = function create(properties) { - return new SearchCatalogResponse(properties); - }; + /** + * Creates a new FieldType instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @static + * @param {google.cloud.datacatalog.v1beta1.IFieldType=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType instance + */ + FieldType.create = function create(properties) { + return new FieldType(properties); + }; /** - * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. + * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IFieldType} message FieldType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchCatalogResponse.encode = function encode(message, writer) { + FieldType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primitiveType); + if (message.enumType != null && message.hasOwnProperty("enumType")) + $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.encode(message.enumType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. + * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IFieldType} message FieldType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchCatalogResponse.encodeDelimited = function encodeDelimited(message, writer) { + FieldType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer. + * Decodes a FieldType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse + * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchCatalogResponse.decode = function decode(reader, length) { + FieldType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.decode(reader, reader.uint32())); + message.primitiveType = reader.int32(); break; - case 3: - message.nextPageToken = reader.string(); + case 2: + message.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1547,237 +1559,5818 @@ }; /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. + * Decodes a FieldType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse + * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchCatalogResponse.decodeDelimited = function decodeDelimited(reader) { + FieldType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchCatalogResponse message. + * Verifies a FieldType message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchCatalogResponse.verify = function verify(message) { + FieldType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify(message.results[i]); + var properties = {}; + if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { + properties.typeDecl = 1; + switch (message.primitiveType) { + default: + return "primitiveType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (properties.typeDecl === 1) + return "typeDecl: multiple values"; + properties.typeDecl = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify(message.enumType); if (error) - return "results." + error; + return "enumType." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FieldType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse + * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType */ - SearchCatalogResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse) + FieldType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results: object expected"); - message.results[i] = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.fromObject(object.results[i]); - } + var message = new $root.google.cloud.datacatalog.v1beta1.FieldType(); + switch (object.primitiveType) { + case "PRIMITIVE_TYPE_UNSPECIFIED": + case 0: + message.primitiveType = 0; + break; + case "DOUBLE": + case 1: + message.primitiveType = 1; + break; + case "STRING": + case 2: + message.primitiveType = 2; + break; + case "BOOL": + case 3: + message.primitiveType = 3; + break; + case "TIMESTAMP": + case 4: + message.primitiveType = 4; + break; + } + if (object.enumType != null) { + if (typeof object.enumType !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.enumType: object expected"); + message.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.fromObject(object.enumType); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. + * Creates a plain object from a FieldType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} message SearchCatalogResponse + * @param {google.cloud.datacatalog.v1beta1.FieldType} message FieldType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchCatalogResponse.toObject = function toObject(message, options) { + FieldType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.toObject(message.results[j], options); + if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { + object.primitiveType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType[message.primitiveType] : message.primitiveType; + if (options.oneofs) + object.typeDecl = "primitiveType"; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + object.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.toObject(message.enumType, options); + if (options.oneofs) + object.typeDecl = "enumType"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this SearchCatalogResponse to JSON. + * Converts this FieldType to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @memberof google.cloud.datacatalog.v1beta1.FieldType * @instance * @returns {Object.} JSON object */ - SearchCatalogResponse.prototype.toJSON = function toJSON() { + FieldType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchCatalogResponse; - })(); + FieldType.EnumType = (function() { - v1beta1.CreateEntryGroupRequest = (function() { + /** + * Properties of an EnumType. + * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @interface IEnumType + * @property {Array.|null} [allowedValues] EnumType allowedValues + */ - /** - * Properties of a CreateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateEntryGroupRequest - * @property {string|null} [parent] CreateEntryGroupRequest parent - * @property {string|null} [entryGroupId] CreateEntryGroupRequest entryGroupId - * @property {google.cloud.datacatalog.v1beta1.IEntryGroup|null} [entryGroup] CreateEntryGroupRequest entryGroup - */ + /** + * Constructs a new EnumType. + * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @classdesc Represents an EnumType. + * @implements IEnumType + * @constructor + * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType=} [properties] Properties to set + */ + function EnumType(properties) { + this.allowedValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new CreateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateEntryGroupRequest. - * @implements ICreateEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest=} [properties] Properties to set - */ - function CreateEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * EnumType allowedValues. + * @member {Array.} allowedValues + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @instance + */ + EnumType.prototype.allowedValues = $util.emptyArray; - /** - * CreateEntryGroupRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.parent = ""; + /** + * Creates a new EnumType instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType instance + */ + EnumType.create = function create(properties) { + return new EnumType(properties); + }; - /** - * CreateEntryGroupRequest entryGroupId. - * @member {string} entryGroupId - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroupId = ""; + /** + * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType} message EnumType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedValues != null && message.allowedValues.length) + for (var i = 0; i < message.allowedValues.length; ++i) + $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.encode(message.allowedValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * CreateEntryGroupRequest entryGroup. - * @member {google.cloud.datacatalog.v1beta1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroup = null; + /** + * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType} message EnumType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest instance - */ - CreateEntryGroupRequest.create = function create(properties) { - return new CreateEntryGroupRequest(properties); - }; + /** + * Decodes an EnumType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedValues && message.allowedValues.length)) + message.allowedValues = []; + message.allowedValues.push($root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - $root.google.cloud.datacatalog.v1beta1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) + /** + * Decodes an EnumType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumType message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { + if (!Array.isArray(message.allowedValues)) + return "allowedValues: array expected"; + for (var i = 0; i < message.allowedValues.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify(message.allowedValues[i]); + if (error) + return "allowedValues." + error; + } + } + return null; + }; + + /** + * Creates an EnumType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType + */ + EnumType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType(); + if (object.allowedValues) { + if (!Array.isArray(object.allowedValues)) + throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowedValues: array expected"); + message.allowedValues = []; + for (var i = 0; i < object.allowedValues.length; ++i) { + if (typeof object.allowedValues[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowedValues: object expected"); + message.allowedValues[i] = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.fromObject(object.allowedValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType} message EnumType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedValues = []; + if (message.allowedValues && message.allowedValues.length) { + object.allowedValues = []; + for (var j = 0; j < message.allowedValues.length; ++j) + object.allowedValues[j] = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.toObject(message.allowedValues[j], options); + } + return object; + }; + + /** + * Converts this EnumType to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @instance + * @returns {Object.} JSON object + */ + EnumType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumType.EnumValue = (function() { + + /** + * Properties of an EnumValue. + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @interface IEnumValue + * @property {string|null} [displayName] EnumValue displayName + */ + + /** + * Constructs a new EnumValue. + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType + * @classdesc Represents an EnumValue. + * @implements IEnumValue + * @constructor + * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue=} [properties] Properties to set + */ + function EnumValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValue displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @instance + */ + EnumValue.prototype.displayName = ""; + + /** + * Creates a new EnumValue instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue instance + */ + EnumValue.create = function create(properties) { + return new EnumValue(properties); + }; + + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValue message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue + */ + EnumValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @static + * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} message EnumValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayName = ""; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this EnumValue to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + * @instance + * @returns {Object.} JSON object + */ + EnumValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValue; + })(); + + return EnumType; + })(); + + /** + * PrimitiveType enum. + * @name google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType + * @enum {string} + * @property {number} PRIMITIVE_TYPE_UNSPECIFIED=0 PRIMITIVE_TYPE_UNSPECIFIED value + * @property {number} DOUBLE=1 DOUBLE value + * @property {number} STRING=2 STRING value + * @property {number} BOOL=3 BOOL value + * @property {number} TIMESTAMP=4 TIMESTAMP value + */ + FieldType.PrimitiveType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIMITIVE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOUBLE"] = 1; + values[valuesById[2] = "STRING"] = 2; + values[valuesById[3] = "BOOL"] = 3; + values[valuesById[4] = "TIMESTAMP"] = 4; + return values; + })(); + + return FieldType; + })(); + + v1beta1.SystemTimestamps = (function() { + + /** + * Properties of a SystemTimestamps. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISystemTimestamps + * @property {google.protobuf.ITimestamp|null} [createTime] SystemTimestamps createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] SystemTimestamps updateTime + * @property {google.protobuf.ITimestamp|null} [expireTime] SystemTimestamps expireTime + */ + + /** + * Constructs a new SystemTimestamps. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a SystemTimestamps. + * @implements ISystemTimestamps + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps=} [properties] Properties to set + */ + function SystemTimestamps(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemTimestamps createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @instance + */ + SystemTimestamps.prototype.createTime = null; + + /** + * SystemTimestamps updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @instance + */ + SystemTimestamps.prototype.updateTime = null; + + /** + * SystemTimestamps expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @instance + */ + SystemTimestamps.prototype.expireTime = null; + + /** + * Creates a new SystemTimestamps instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps instance + */ + SystemTimestamps.create = function create(properties) { + return new SystemTimestamps(properties); + }; + + /** + * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps} message SystemTimestamps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemTimestamps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps} message SystemTimestamps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemTimestamps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemTimestamps message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemTimestamps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SystemTimestamps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemTimestamps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemTimestamps message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemTimestamps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps + */ + SystemTimestamps.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SystemTimestamps) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.SystemTimestamps(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @static + * @param {google.cloud.datacatalog.v1beta1.SystemTimestamps} message SystemTimestamps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemTimestamps.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + object.expireTime = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this SystemTimestamps to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @instance + * @returns {Object.} JSON object + */ + SystemTimestamps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SystemTimestamps; + })(); + + v1beta1.GcsFilesetSpec = (function() { + + /** + * Properties of a GcsFilesetSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IGcsFilesetSpec + * @property {Array.|null} [filePatterns] GcsFilesetSpec filePatterns + * @property {Array.|null} [sampleGcsFileSpecs] GcsFilesetSpec sampleGcsFileSpecs + */ + + /** + * Constructs a new GcsFilesetSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a GcsFilesetSpec. + * @implements IGcsFilesetSpec + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec=} [properties] Properties to set + */ + function GcsFilesetSpec(properties) { + this.filePatterns = []; + this.sampleGcsFileSpecs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsFilesetSpec filePatterns. + * @member {Array.} filePatterns + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @instance + */ + GcsFilesetSpec.prototype.filePatterns = $util.emptyArray; + + /** + * GcsFilesetSpec sampleGcsFileSpecs. + * @member {Array.} sampleGcsFileSpecs + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @instance + */ + GcsFilesetSpec.prototype.sampleGcsFileSpecs = $util.emptyArray; + + /** + * Creates a new GcsFilesetSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec instance + */ + GcsFilesetSpec.create = function create(properties) { + return new GcsFilesetSpec(properties); + }; + + /** + * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFilesetSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filePatterns != null && message.filePatterns.length) + for (var i = 0; i < message.filePatterns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePatterns[i]); + if (message.sampleGcsFileSpecs != null && message.sampleGcsFileSpecs.length) + for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) + $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.encode(message.sampleGcsFileSpecs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFilesetSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsFilesetSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFilesetSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.filePatterns && message.filePatterns.length)) + message.filePatterns = []; + message.filePatterns.push(reader.string()); + break; + case 2: + if (!(message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length)) + message.sampleGcsFileSpecs = []; + message.sampleGcsFileSpecs.push($root.google.cloud.datacatalog.v1beta1.GcsFileSpec.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFilesetSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsFilesetSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsFilesetSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filePatterns != null && message.hasOwnProperty("filePatterns")) { + if (!Array.isArray(message.filePatterns)) + return "filePatterns: array expected"; + for (var i = 0; i < message.filePatterns.length; ++i) + if (!$util.isString(message.filePatterns[i])) + return "filePatterns: string[] expected"; + } + if (message.sampleGcsFileSpecs != null && message.hasOwnProperty("sampleGcsFileSpecs")) { + if (!Array.isArray(message.sampleGcsFileSpecs)) + return "sampleGcsFileSpecs: array expected"; + for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.verify(message.sampleGcsFileSpecs[i]); + if (error) + return "sampleGcsFileSpecs." + error; + } + } + return null; + }; + + /** + * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec + */ + GcsFilesetSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec(); + if (object.filePatterns) { + if (!Array.isArray(object.filePatterns)) + throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.filePatterns: array expected"); + message.filePatterns = []; + for (var i = 0; i < object.filePatterns.length; ++i) + message.filePatterns[i] = String(object.filePatterns[i]); + } + if (object.sampleGcsFileSpecs) { + if (!Array.isArray(object.sampleGcsFileSpecs)) + throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sampleGcsFileSpecs: array expected"); + message.sampleGcsFileSpecs = []; + for (var i = 0; i < object.sampleGcsFileSpecs.length; ++i) { + if (typeof object.sampleGcsFileSpecs[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sampleGcsFileSpecs: object expected"); + message.sampleGcsFileSpecs[i] = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.fromObject(object.sampleGcsFileSpecs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} message GcsFilesetSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsFilesetSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.filePatterns = []; + object.sampleGcsFileSpecs = []; + } + if (message.filePatterns && message.filePatterns.length) { + object.filePatterns = []; + for (var j = 0; j < message.filePatterns.length; ++j) + object.filePatterns[j] = message.filePatterns[j]; + } + if (message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length) { + object.sampleGcsFileSpecs = []; + for (var j = 0; j < message.sampleGcsFileSpecs.length; ++j) + object.sampleGcsFileSpecs[j] = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.toObject(message.sampleGcsFileSpecs[j], options); + } + return object; + }; + + /** + * Converts this GcsFilesetSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @instance + * @returns {Object.} JSON object + */ + GcsFilesetSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GcsFilesetSpec; + })(); + + v1beta1.GcsFileSpec = (function() { + + /** + * Properties of a GcsFileSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IGcsFileSpec + * @property {string|null} [filePath] GcsFileSpec filePath + * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [gcsTimestamps] GcsFileSpec gcsTimestamps + * @property {number|Long|null} [sizeBytes] GcsFileSpec sizeBytes + */ + + /** + * Constructs a new GcsFileSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a GcsFileSpec. + * @implements IGcsFileSpec + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec=} [properties] Properties to set + */ + function GcsFileSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsFileSpec filePath. + * @member {string} filePath + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @instance + */ + GcsFileSpec.prototype.filePath = ""; + + /** + * GcsFileSpec gcsTimestamps. + * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} gcsTimestamps + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @instance + */ + GcsFileSpec.prototype.gcsTimestamps = null; + + /** + * GcsFileSpec sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @instance + */ + GcsFileSpec.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GcsFileSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec instance + */ + GcsFileSpec.create = function create(properties) { + return new GcsFileSpec(properties); + }; + + /** + * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec} message GcsFileSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFileSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filePath != null && message.hasOwnProperty("filePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePath); + if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) + $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.gcsTimestamps, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sizeBytes); + return writer; + }; + + /** + * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec} message GcsFileSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFileSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsFileSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFileSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GcsFileSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filePath = reader.string(); + break; + case 2: + message.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); + break; + case 4: + message.sizeBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFileSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsFileSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsFileSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filePath != null && message.hasOwnProperty("filePath")) + if (!$util.isString(message.filePath)) + return "filePath: string expected"; + if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) { + var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.gcsTimestamps); + if (error) + return "gcsTimestamps." + error; + } + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) + return "sizeBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec + */ + GcsFileSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GcsFileSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.GcsFileSpec(); + if (object.filePath != null) + message.filePath = String(object.filePath); + if (object.gcsTimestamps != null) { + if (typeof object.gcsTimestamps !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFileSpec.gcsTimestamps: object expected"); + message.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.gcsTimestamps); + } + if (object.sizeBytes != null) + if ($util.Long) + (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; + else if (typeof object.sizeBytes === "string") + message.sizeBytes = parseInt(object.sizeBytes, 10); + else if (typeof object.sizeBytes === "number") + message.sizeBytes = object.sizeBytes; + else if (typeof object.sizeBytes === "object") + message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.GcsFileSpec} message GcsFileSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsFileSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filePath = ""; + object.gcsTimestamps = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sizeBytes = options.longs === String ? "0" : 0; + } + if (message.filePath != null && message.hasOwnProperty("filePath")) + object.filePath = message.filePath; + if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) + object.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.gcsTimestamps, options); + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (typeof message.sizeBytes === "number") + object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; + else + object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + return object; + }; + + /** + * Converts this GcsFileSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @instance + * @returns {Object.} JSON object + */ + GcsFileSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GcsFileSpec; + })(); + + v1beta1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISchema + * @property {Array.|null} [columns] Schema columns + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.columns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schema columns. + * @member {Array.} columns + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @instance + */ + Schema.prototype.columns = $util.emptyArray; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {google.cloud.datacatalog.v1beta1.ISchema=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {google.cloud.datacatalog.v1beta1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.datacatalog.v1beta1.ColumnSchema.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {google.cloud.datacatalog.v1beta1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.datacatalog.v1beta1.ColumnSchema.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.Schema) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.Schema(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.datacatalog.v1beta1.Schema.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Schema.columns: object expected"); + message.columns[i] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.fromObject(object.columns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @static + * @param {google.cloud.datacatalog.v1beta1.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.toObject(message.columns[j], options); + } + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Schema; + })(); + + v1beta1.ColumnSchema = (function() { + + /** + * Properties of a ColumnSchema. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IColumnSchema + * @property {string|null} [column] ColumnSchema column + * @property {string|null} [type] ColumnSchema type + * @property {string|null} [description] ColumnSchema description + * @property {string|null} [mode] ColumnSchema mode + * @property {Array.|null} [subcolumns] ColumnSchema subcolumns + */ + + /** + * Constructs a new ColumnSchema. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a ColumnSchema. + * @implements IColumnSchema + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IColumnSchema=} [properties] Properties to set + */ + function ColumnSchema(properties) { + this.subcolumns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnSchema column. + * @member {string} column + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.column = ""; + + /** + * ColumnSchema type. + * @member {string} type + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.type = ""; + + /** + * ColumnSchema description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.description = ""; + + /** + * ColumnSchema mode. + * @member {string} mode + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.mode = ""; + + /** + * ColumnSchema subcolumns. + * @member {Array.} subcolumns + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @instance + */ + ColumnSchema.prototype.subcolumns = $util.emptyArray; + + /** + * Creates a new ColumnSchema instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {google.cloud.datacatalog.v1beta1.IColumnSchema=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema instance + */ + ColumnSchema.create = function create(properties) { + return new ColumnSchema(properties); + }; + + /** + * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {google.cloud.datacatalog.v1beta1.IColumnSchema} message ColumnSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.mode != null && message.hasOwnProperty("mode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); + if (message.column != null && message.hasOwnProperty("column")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.column); + if (message.subcolumns != null && message.subcolumns.length) + for (var i = 0; i < message.subcolumns.length; ++i) + $root.google.cloud.datacatalog.v1beta1.ColumnSchema.encode(message.subcolumns[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {google.cloud.datacatalog.v1beta1.IColumnSchema} message ColumnSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnSchema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ColumnSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.column = reader.string(); + break; + case 1: + message.type = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.mode = reader.string(); + break; + case 7: + if (!(message.subcolumns && message.subcolumns.length)) + message.subcolumns = []; + message.subcolumns.push($root.google.cloud.datacatalog.v1beta1.ColumnSchema.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnSchema message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + if (!$util.isString(message.mode)) + return "mode: string expected"; + if (message.subcolumns != null && message.hasOwnProperty("subcolumns")) { + if (!Array.isArray(message.subcolumns)) + return "subcolumns: array expected"; + for (var i = 0; i < message.subcolumns.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.verify(message.subcolumns[i]); + if (error) + return "subcolumns." + error; + } + } + return null; + }; + + /** + * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema + */ + ColumnSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ColumnSchema) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.ColumnSchema(); + if (object.column != null) + message.column = String(object.column); + if (object.type != null) + message.type = String(object.type); + if (object.description != null) + message.description = String(object.description); + if (object.mode != null) + message.mode = String(object.mode); + if (object.subcolumns) { + if (!Array.isArray(object.subcolumns)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns: array expected"); + message.subcolumns = []; + for (var i = 0; i < object.subcolumns.length; ++i) { + if (typeof object.subcolumns[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns: object expected"); + message.subcolumns[i] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.fromObject(object.subcolumns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @static + * @param {google.cloud.datacatalog.v1beta1.ColumnSchema} message ColumnSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subcolumns = []; + if (options.defaults) { + object.type = ""; + object.description = ""; + object.mode = ""; + object.column = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = message.mode; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.subcolumns && message.subcolumns.length) { + object.subcolumns = []; + for (var j = 0; j < message.subcolumns.length; ++j) + object.subcolumns[j] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.toObject(message.subcolumns[j], options); + } + return object; + }; + + /** + * Converts this ColumnSchema to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @instance + * @returns {Object.} JSON object + */ + ColumnSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ColumnSchema; + })(); + + v1beta1.SearchCatalogResult = (function() { + + /** + * Properties of a SearchCatalogResult. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISearchCatalogResult + * @property {google.cloud.datacatalog.v1beta1.SearchResultType|null} [searchResultType] SearchCatalogResult searchResultType + * @property {string|null} [searchResultSubtype] SearchCatalogResult searchResultSubtype + * @property {string|null} [relativeResourceName] SearchCatalogResult relativeResourceName + * @property {string|null} [linkedResource] SearchCatalogResult linkedResource + */ + + /** + * Constructs a new SearchCatalogResult. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a SearchCatalogResult. + * @implements ISearchCatalogResult + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult=} [properties] Properties to set + */ + function SearchCatalogResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCatalogResult searchResultType. + * @member {google.cloud.datacatalog.v1beta1.SearchResultType} searchResultType + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @instance + */ + SearchCatalogResult.prototype.searchResultType = 0; + + /** + * SearchCatalogResult searchResultSubtype. + * @member {string} searchResultSubtype + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @instance + */ + SearchCatalogResult.prototype.searchResultSubtype = ""; + + /** + * SearchCatalogResult relativeResourceName. + * @member {string} relativeResourceName + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @instance + */ + SearchCatalogResult.prototype.relativeResourceName = ""; + + /** + * SearchCatalogResult linkedResource. + * @member {string} linkedResource + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @instance + */ + SearchCatalogResult.prototype.linkedResource = ""; + + /** + * Creates a new SearchCatalogResult instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult instance + */ + SearchCatalogResult.create = function create(properties) { + return new SearchCatalogResult(properties); + }; + + /** + * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCatalogResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.searchResultType); + if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.searchResultSubtype); + if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.relativeResourceName); + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.linkedResource); + return writer; + }; + + /** + * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCatalogResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCatalogResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCatalogResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.searchResultType = reader.int32(); + break; + case 2: + message.searchResultSubtype = reader.string(); + break; + case 3: + message.relativeResourceName = reader.string(); + break; + case 4: + message.linkedResource = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCatalogResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCatalogResult message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCatalogResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) + switch (message.searchResultType) { + default: + return "searchResultType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) + if (!$util.isString(message.searchResultSubtype)) + return "searchResultSubtype: string expected"; + if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) + if (!$util.isString(message.relativeResourceName)) + return "relativeResourceName: string expected"; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + if (!$util.isString(message.linkedResource)) + return "linkedResource: string expected"; + return null; + }; + + /** + * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult + */ + SearchCatalogResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult(); + switch (object.searchResultType) { + case "SEARCH_RESULT_TYPE_UNSPECIFIED": + case 0: + message.searchResultType = 0; + break; + case "ENTRY": + case 1: + message.searchResultType = 1; + break; + case "TAG_TEMPLATE": + case 2: + message.searchResultType = 2; + break; + case "ENTRY_GROUP": + case 3: + message.searchResultType = 3; + break; + } + if (object.searchResultSubtype != null) + message.searchResultSubtype = String(object.searchResultSubtype); + if (object.relativeResourceName != null) + message.relativeResourceName = String(object.relativeResourceName); + if (object.linkedResource != null) + message.linkedResource = String(object.linkedResource); + return message; + }; + + /** + * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResult} message SearchCatalogResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCatalogResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.searchResultType = options.enums === String ? "SEARCH_RESULT_TYPE_UNSPECIFIED" : 0; + object.searchResultSubtype = ""; + object.relativeResourceName = ""; + object.linkedResource = ""; + } + if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) + object.searchResultType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.SearchResultType[message.searchResultType] : message.searchResultType; + if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) + object.searchResultSubtype = message.searchResultSubtype; + if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) + object.relativeResourceName = message.relativeResourceName; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + object.linkedResource = message.linkedResource; + return object; + }; + + /** + * Converts this SearchCatalogResult to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @instance + * @returns {Object.} JSON object + */ + SearchCatalogResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SearchCatalogResult; + })(); + + /** + * SearchResultType enum. + * @name google.cloud.datacatalog.v1beta1.SearchResultType + * @enum {string} + * @property {number} SEARCH_RESULT_TYPE_UNSPECIFIED=0 SEARCH_RESULT_TYPE_UNSPECIFIED value + * @property {number} ENTRY=1 ENTRY value + * @property {number} TAG_TEMPLATE=2 TAG_TEMPLATE value + * @property {number} ENTRY_GROUP=3 ENTRY_GROUP value + */ + v1beta1.SearchResultType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_RESULT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTRY"] = 1; + values[valuesById[2] = "TAG_TEMPLATE"] = 2; + values[valuesById[3] = "ENTRY_GROUP"] = 3; + return values; + })(); + + v1beta1.BigQueryTableSpec = (function() { + + /** + * Properties of a BigQueryTableSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IBigQueryTableSpec + * @property {google.cloud.datacatalog.v1beta1.TableSourceType|null} [tableSourceType] BigQueryTableSpec tableSourceType + * @property {google.cloud.datacatalog.v1beta1.IViewSpec|null} [viewSpec] BigQueryTableSpec viewSpec + * @property {google.cloud.datacatalog.v1beta1.ITableSpec|null} [tableSpec] BigQueryTableSpec tableSpec + */ + + /** + * Constructs a new BigQueryTableSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a BigQueryTableSpec. + * @implements IBigQueryTableSpec + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec=} [properties] Properties to set + */ + function BigQueryTableSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableSpec tableSourceType. + * @member {google.cloud.datacatalog.v1beta1.TableSourceType} tableSourceType + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @instance + */ + BigQueryTableSpec.prototype.tableSourceType = 0; + + /** + * BigQueryTableSpec viewSpec. + * @member {google.cloud.datacatalog.v1beta1.IViewSpec|null|undefined} viewSpec + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @instance + */ + BigQueryTableSpec.prototype.viewSpec = null; + + /** + * BigQueryTableSpec tableSpec. + * @member {google.cloud.datacatalog.v1beta1.ITableSpec|null|undefined} tableSpec + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @instance + */ + BigQueryTableSpec.prototype.tableSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQueryTableSpec typeSpec. + * @member {"viewSpec"|"tableSpec"|undefined} typeSpec + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @instance + */ + Object.defineProperty(BigQueryTableSpec.prototype, "typeSpec", { + get: $util.oneOfGetter($oneOfFields = ["viewSpec", "tableSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQueryTableSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec instance + */ + BigQueryTableSpec.create = function create(properties) { + return new BigQueryTableSpec(properties); + }; + + /** + * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tableSourceType); + if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) + $root.google.cloud.datacatalog.v1beta1.ViewSpec.encode(message.viewSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) + $root.google.cloud.datacatalog.v1beta1.TableSpec.encode(message.tableSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tableSourceType = reader.int32(); + break; + case 2: + message.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.decode(reader, reader.uint32()); + break; + case 3: + message.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) + switch (message.tableSourceType) { + default: + return "tableSourceType: enum value expected"; + case 0: + case 2: + case 5: + break; + } + if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { + properties.typeSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.ViewSpec.verify(message.viewSpec); + if (error) + return "viewSpec." + error; + } + } + if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { + if (properties.typeSpec === 1) + return "typeSpec: multiple values"; + properties.typeSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.TableSpec.verify(message.tableSpec); + if (error) + return "tableSpec." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec + */ + BigQueryTableSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec(); + switch (object.tableSourceType) { + case "TABLE_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.tableSourceType = 0; + break; + case "BIGQUERY_VIEW": + case 2: + message.tableSourceType = 2; + break; + case "BIGQUERY_TABLE": + case 5: + message.tableSourceType = 5; + break; + } + if (object.viewSpec != null) { + if (typeof object.viewSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.BigQueryTableSpec.viewSpec: object expected"); + message.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.fromObject(object.viewSpec); + } + if (object.tableSpec != null) { + if (typeof object.tableSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.BigQueryTableSpec.tableSpec: object expected"); + message.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.fromObject(object.tableSpec); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} message BigQueryTableSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tableSourceType = options.enums === String ? "TABLE_SOURCE_TYPE_UNSPECIFIED" : 0; + if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) + object.tableSourceType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.TableSourceType[message.tableSourceType] : message.tableSourceType; + if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { + object.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.toObject(message.viewSpec, options); + if (options.oneofs) + object.typeSpec = "viewSpec"; + } + if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { + object.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.toObject(message.tableSpec, options); + if (options.oneofs) + object.typeSpec = "tableSpec"; + } + return object; + }; + + /** + * Converts this BigQueryTableSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryTableSpec; + })(); + + /** + * TableSourceType enum. + * @name google.cloud.datacatalog.v1beta1.TableSourceType + * @enum {string} + * @property {number} TABLE_SOURCE_TYPE_UNSPECIFIED=0 TABLE_SOURCE_TYPE_UNSPECIFIED value + * @property {number} BIGQUERY_VIEW=2 BIGQUERY_VIEW value + * @property {number} BIGQUERY_TABLE=5 BIGQUERY_TABLE value + */ + v1beta1.TableSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "BIGQUERY_VIEW"] = 2; + values[valuesById[5] = "BIGQUERY_TABLE"] = 5; + return values; + })(); + + v1beta1.ViewSpec = (function() { + + /** + * Properties of a ViewSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IViewSpec + * @property {string|null} [viewQuery] ViewSpec viewQuery + */ + + /** + * Constructs a new ViewSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a ViewSpec. + * @implements IViewSpec + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IViewSpec=} [properties] Properties to set + */ + function ViewSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ViewSpec viewQuery. + * @member {string} viewQuery + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @instance + */ + ViewSpec.prototype.viewQuery = ""; + + /** + * Creates a new ViewSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IViewSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec instance + */ + ViewSpec.create = function create(properties) { + return new ViewSpec(properties); + }; + + /** + * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IViewSpec} message ViewSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.viewQuery); + return writer; + }; + + /** + * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IViewSpec} message ViewSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ViewSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ViewSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.viewQuery = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ViewSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ViewSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) + if (!$util.isString(message.viewQuery)) + return "viewQuery: string expected"; + return null; + }; + + /** + * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec + */ + ViewSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ViewSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.ViewSpec(); + if (object.viewQuery != null) + message.viewQuery = String(object.viewQuery); + return message; + }; + + /** + * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.ViewSpec} message ViewSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.viewQuery = ""; + if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) + object.viewQuery = message.viewQuery; + return object; + }; + + /** + * Converts this ViewSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @instance + * @returns {Object.} JSON object + */ + ViewSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ViewSpec; + })(); + + v1beta1.TableSpec = (function() { + + /** + * Properties of a TableSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ITableSpec + * @property {string|null} [groupedEntry] TableSpec groupedEntry + */ + + /** + * Constructs a new TableSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a TableSpec. + * @implements ITableSpec + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ITableSpec=} [properties] Properties to set + */ + function TableSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableSpec groupedEntry. + * @member {string} groupedEntry + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @instance + */ + TableSpec.prototype.groupedEntry = ""; + + /** + * Creates a new TableSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.ITableSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec instance + */ + TableSpec.create = function create(properties) { + return new TableSpec(properties); + }; + + /** + * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.ITableSpec} message TableSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupedEntry); + return writer; + }; + + /** + * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.ITableSpec} message TableSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TableSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupedEntry = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) + if (!$util.isString(message.groupedEntry)) + return "groupedEntry: string expected"; + return null; + }; + + /** + * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec + */ + TableSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.TableSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.TableSpec(); + if (object.groupedEntry != null) + message.groupedEntry = String(object.groupedEntry); + return message; + }; + + /** + * Creates a plain object from a TableSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.TableSpec} message TableSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.groupedEntry = ""; + if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) + object.groupedEntry = message.groupedEntry; + return object; + }; + + /** + * Converts this TableSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @instance + * @returns {Object.} JSON object + */ + TableSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableSpec; + })(); + + v1beta1.BigQueryDateShardedSpec = (function() { + + /** + * Properties of a BigQueryDateShardedSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IBigQueryDateShardedSpec + * @property {string|null} [dataset] BigQueryDateShardedSpec dataset + * @property {string|null} [tablePrefix] BigQueryDateShardedSpec tablePrefix + * @property {number|Long|null} [shardCount] BigQueryDateShardedSpec shardCount + */ + + /** + * Constructs a new BigQueryDateShardedSpec. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a BigQueryDateShardedSpec. + * @implements IBigQueryDateShardedSpec + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec=} [properties] Properties to set + */ + function BigQueryDateShardedSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryDateShardedSpec dataset. + * @member {string} dataset + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @instance + */ + BigQueryDateShardedSpec.prototype.dataset = ""; + + /** + * BigQueryDateShardedSpec tablePrefix. + * @member {string} tablePrefix + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @instance + */ + BigQueryDateShardedSpec.prototype.tablePrefix = ""; + + /** + * BigQueryDateShardedSpec shardCount. + * @member {number|Long} shardCount + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @instance + */ + BigQueryDateShardedSpec.prototype.shardCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BigQueryDateShardedSpec instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec instance + */ + BigQueryDateShardedSpec.create = function create(properties) { + return new BigQueryDateShardedSpec(properties); + }; + + /** + * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDateShardedSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataset != null && message.hasOwnProperty("dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tablePrefix); + if (message.shardCount != null && message.hasOwnProperty("shardCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.shardCount); + return writer; + }; + + /** + * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDateShardedSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDateShardedSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataset = reader.string(); + break; + case 2: + message.tablePrefix = reader.string(); + break; + case 3: + message.shardCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDateShardedSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDateShardedSpec message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDateShardedSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + if (!$util.isString(message.tablePrefix)) + return "tablePrefix: string expected"; + if (message.shardCount != null && message.hasOwnProperty("shardCount")) + if (!$util.isInteger(message.shardCount) && !(message.shardCount && $util.isInteger(message.shardCount.low) && $util.isInteger(message.shardCount.high))) + return "shardCount: integer|Long expected"; + return null; + }; + + /** + * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec + */ + BigQueryDateShardedSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec(); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.tablePrefix != null) + message.tablePrefix = String(object.tablePrefix); + if (object.shardCount != null) + if ($util.Long) + (message.shardCount = $util.Long.fromValue(object.shardCount)).unsigned = false; + else if (typeof object.shardCount === "string") + message.shardCount = parseInt(object.shardCount, 10); + else if (typeof object.shardCount === "number") + message.shardCount = object.shardCount; + else if (typeof object.shardCount === "object") + message.shardCount = new $util.LongBits(object.shardCount.low >>> 0, object.shardCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @static + * @param {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} message BigQueryDateShardedSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDateShardedSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataset = ""; + object.tablePrefix = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.shardCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.shardCount = options.longs === String ? "0" : 0; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) + object.tablePrefix = message.tablePrefix; + if (message.shardCount != null && message.hasOwnProperty("shardCount")) + if (typeof message.shardCount === "number") + object.shardCount = options.longs === String ? String(message.shardCount) : message.shardCount; + else + object.shardCount = options.longs === String ? $util.Long.prototype.toString.call(message.shardCount) : options.longs === Number ? new $util.LongBits(message.shardCount.low >>> 0, message.shardCount.high >>> 0).toNumber() : message.shardCount; + return object; + }; + + /** + * Converts this BigQueryDateShardedSpec to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @instance + * @returns {Object.} JSON object + */ + BigQueryDateShardedSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BigQueryDateShardedSpec; + })(); + + v1beta1.DataCatalog = (function() { + + /** + * Constructs a new DataCatalog service. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a DataCatalog + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataCatalog(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataCatalog.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataCatalog; + + /** + * Creates new DataCatalog service using the specified rpc implementation. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataCatalog} RPC service. Useful where requests and/or responses are streamed. + */ + DataCatalog.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#searchCatalog}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef SearchCatalogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} [response] SearchCatalogResponse + */ + + /** + * Calls SearchCatalog. + * @function searchCatalog + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogCallback} callback Node-style callback called with the error, if any, and SearchCatalogResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.searchCatalog = function searchCatalog(request, callback) { + return this.rpcCall(searchCatalog, $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest, $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse, request, callback); + }, "name", { value: "SearchCatalog" }); + + /** + * Calls SearchCatalog. + * @function searchCatalog + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntryGroup}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef CreateEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup + */ + + /** + * Calls CreateEntryGroup. + * @function createEntryGroup + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.createEntryGroup = function createEntryGroup(request, callback) { + return this.rpcCall(createEntryGroup, $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); + }, "name", { value: "CreateEntryGroup" }); + + /** + * Calls CreateEntryGroup. + * @function createEntryGroup + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntryGroup}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef GetEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup + */ + + /** + * Calls GetEntryGroup. + * @function getEntryGroup + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.getEntryGroup = function getEntryGroup(request, callback) { + return this.rpcCall(getEntryGroup, $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); + }, "name", { value: "GetEntryGroup" }); + + /** + * Calls GetEntryGroup. + * @function getEntryGroup + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntryGroup}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef DeleteEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEntryGroup. + * @function deleteEntryGroup + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroupCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.deleteEntryGroup = function deleteEntryGroup(request, callback) { + return this.rpcCall(deleteEntryGroup, $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntryGroup" }); + + /** + * Calls DeleteEntryGroup. + * @function deleteEntryGroup + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createEntry}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef CreateEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + */ + + /** + * Calls CreateEntry. + * @function createEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} request CreateEntryRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.createEntry = function createEntry(request, callback) { + return this.rpcCall(createEntry, $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); + }, "name", { value: "CreateEntry" }); + + /** + * Calls CreateEntry. + * @function createEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} request CreateEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateEntry}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef UpdateEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + */ + + /** + * Calls UpdateEntry. + * @function updateEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.updateEntry = function updateEntry(request, callback) { + return this.rpcCall(updateEntry, $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); + }, "name", { value: "UpdateEntry" }); + + /** + * Calls UpdateEntry. + * @function updateEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteEntry}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef DeleteEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEntry. + * @function deleteEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.deleteEntry = function deleteEntry(request, callback) { + return this.rpcCall(deleteEntry, $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntry" }); + + /** + * Calls DeleteEntry. + * @function deleteEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getEntry}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef GetEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + */ + + /** + * Calls GetEntry. + * @function getEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} request GetEntryRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.getEntry = function getEntry(request, callback) { + return this.rpcCall(getEntry, $root.google.cloud.datacatalog.v1beta1.GetEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); + }, "name", { value: "GetEntry" }); + + /** + * Calls GetEntry. + * @function getEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} request GetEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#lookupEntry}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef LookupEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry + */ + + /** + * Calls LookupEntry. + * @function lookupEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} request LookupEntryRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.lookupEntry = function lookupEntry(request, callback) { + return this.rpcCall(lookupEntry, $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); + }, "name", { value: "LookupEntry" }); + + /** + * Calls LookupEntry. + * @function lookupEntry + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} request LookupEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplate}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef CreateTagTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate + */ + + /** + * Calls CreateTagTemplate. + * @function createTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.createTagTemplate = function createTagTemplate(request, callback) { + return this.rpcCall(createTagTemplate, $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); + }, "name", { value: "CreateTagTemplate" }); + + /** + * Calls CreateTagTemplate. + * @function createTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getTagTemplate}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef GetTagTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate + */ + + /** + * Calls GetTagTemplate. + * @function getTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.getTagTemplate = function getTagTemplate(request, callback) { + return this.rpcCall(getTagTemplate, $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); + }, "name", { value: "GetTagTemplate" }); + + /** + * Calls GetTagTemplate. + * @function getTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplate}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef UpdateTagTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate + */ + + /** + * Calls UpdateTagTemplate. + * @function updateTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.updateTagTemplate = function updateTagTemplate(request, callback) { + return this.rpcCall(updateTagTemplate, $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); + }, "name", { value: "UpdateTagTemplate" }); + + /** + * Calls UpdateTagTemplate. + * @function updateTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplate}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef DeleteTagTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTagTemplate. + * @function deleteTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.deleteTagTemplate = function deleteTagTemplate(request, callback) { + return this.rpcCall(deleteTagTemplate, $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTagTemplate" }); + + /** + * Calls DeleteTagTemplate. + * @function deleteTagTemplate + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTagTemplateField}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef CreateTagTemplateFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField + */ + + /** + * Calls CreateTagTemplateField. + * @function createTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.createTagTemplateField = function createTagTemplateField(request, callback) { + return this.rpcCall(createTagTemplateField, $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); + }, "name", { value: "CreateTagTemplateField" }); + + /** + * Calls CreateTagTemplateField. + * @function createTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTagTemplateField}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef UpdateTagTemplateFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField + */ + + /** + * Calls UpdateTagTemplateField. + * @function updateTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.updateTagTemplateField = function updateTagTemplateField(request, callback) { + return this.rpcCall(updateTagTemplateField, $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); + }, "name", { value: "UpdateTagTemplateField" }); + + /** + * Calls UpdateTagTemplateField. + * @function updateTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#renameTagTemplateField}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef RenameTagTemplateFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField + */ + + /** + * Calls RenameTagTemplateField. + * @function renameTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.renameTagTemplateField = function renameTagTemplateField(request, callback) { + return this.rpcCall(renameTagTemplateField, $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); + }, "name", { value: "RenameTagTemplateField" }); + + /** + * Calls RenameTagTemplateField. + * @function renameTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTagTemplateField}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef DeleteTagTemplateFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTagTemplateField. + * @function deleteTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.deleteTagTemplateField = function deleteTagTemplateField(request, callback) { + return this.rpcCall(deleteTagTemplateField, $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTagTemplateField" }); + + /** + * Calls DeleteTagTemplateField. + * @function deleteTagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#createTag}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef CreateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Tag} [response] Tag + */ + + /** + * Calls CreateTag. + * @function createTag + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} request CreateTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.createTag = function createTag(request, callback) { + return this.rpcCall(createTag, $root.google.cloud.datacatalog.v1beta1.CreateTagRequest, $root.google.cloud.datacatalog.v1beta1.Tag, request, callback); + }, "name", { value: "CreateTag" }); + + /** + * Calls CreateTag. + * @function createTag + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} request CreateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#updateTag}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef UpdateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Tag} [response] Tag + */ + + /** + * Calls UpdateTag. + * @function updateTag + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.updateTag = function updateTag(request, callback) { + return this.rpcCall(updateTag, $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest, $root.google.cloud.datacatalog.v1beta1.Tag, request, callback); + }, "name", { value: "UpdateTag" }); + + /** + * Calls UpdateTag. + * @function updateTag + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#deleteTag}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef DeleteTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTag. + * @function deleteTag + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.deleteTag = function deleteTag(request, callback) { + return this.rpcCall(deleteTag, $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTag" }); + + /** + * Calls DeleteTag. + * @function deleteTag + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#listTags}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef ListTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.ListTagsResponse} [response] ListTagsResponse + */ + + /** + * Calls ListTags. + * @function listTags + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} request ListTagsRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.listTags = function listTags(request, callback) { + return this.rpcCall(listTags, $root.google.cloud.datacatalog.v1beta1.ListTagsRequest, $root.google.cloud.datacatalog.v1beta1.ListTagsResponse, request, callback); + }, "name", { value: "ListTags" }); + + /** + * Calls ListTags. + * @function listTags + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} request ListTagsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#setIamPolicy}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#getIamPolicy}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog#testIamPermissions}. + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataCatalog.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.datacatalog.v1beta1.DataCatalog + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataCatalog; + })(); + + v1beta1.SearchCatalogRequest = (function() { + + /** + * Properties of a SearchCatalogRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISearchCatalogRequest + * @property {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null} [scope] SearchCatalogRequest scope + * @property {string|null} [query] SearchCatalogRequest query + * @property {number|null} [pageSize] SearchCatalogRequest pageSize + * @property {string|null} [pageToken] SearchCatalogRequest pageToken + * @property {string|null} [orderBy] SearchCatalogRequest orderBy + */ + + /** + * Constructs a new SearchCatalogRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a SearchCatalogRequest. + * @implements ISearchCatalogRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest=} [properties] Properties to set + */ + function SearchCatalogRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCatalogRequest scope. + * @member {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null|undefined} scope + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @instance + */ + SearchCatalogRequest.prototype.scope = null; + + /** + * SearchCatalogRequest query. + * @member {string} query + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @instance + */ + SearchCatalogRequest.prototype.query = ""; + + /** + * SearchCatalogRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @instance + */ + SearchCatalogRequest.prototype.pageSize = 0; + + /** + * SearchCatalogRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @instance + */ + SearchCatalogRequest.prototype.pageToken = ""; + + /** + * SearchCatalogRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @instance + */ + SearchCatalogRequest.prototype.orderBy = ""; + + /** + * Creates a new SearchCatalogRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest instance + */ + SearchCatalogRequest.create = function create(properties) { + return new SearchCatalogRequest(properties); + }; + + /** + * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCatalogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && message.hasOwnProperty("query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.scope != null && message.hasOwnProperty("scope")) + $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.encode(message.scope, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCatalogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCatalogRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCatalogRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.decode(reader, reader.uint32()); + break; + case 1: + message.query = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCatalogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCatalogRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCatalogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest + */ + SearchCatalogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.scope: object expected"); + message.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.fromObject(object.scope); + } + if (object.query != null) + message.query = String(object.query); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} message SearchCatalogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCatalogRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.query = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.scope = null; + } + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.toObject(message.scope, options); + return object; + }; + + /** + * Converts this SearchCatalogRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @instance + * @returns {Object.} JSON object + */ + SearchCatalogRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SearchCatalogRequest.Scope = (function() { + + /** + * Properties of a Scope. + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @interface IScope + * @property {Array.|null} [includeOrgIds] Scope includeOrgIds + * @property {Array.|null} [includeProjectIds] Scope includeProjectIds + * @property {boolean|null} [includeGcpPublicDatasets] Scope includeGcpPublicDatasets + */ + + /** + * Constructs a new Scope. + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest + * @classdesc Represents a Scope. + * @implements IScope + * @constructor + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope=} [properties] Properties to set + */ + function Scope(properties) { + this.includeOrgIds = []; + this.includeProjectIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scope includeOrgIds. + * @member {Array.} includeOrgIds + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @instance + */ + Scope.prototype.includeOrgIds = $util.emptyArray; + + /** + * Scope includeProjectIds. + * @member {Array.} includeProjectIds + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @instance + */ + Scope.prototype.includeProjectIds = $util.emptyArray; + + /** + * Scope includeGcpPublicDatasets. + * @member {boolean} includeGcpPublicDatasets + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @instance + */ + Scope.prototype.includeGcpPublicDatasets = false; + + /** + * Creates a new Scope instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope instance + */ + Scope.create = function create(properties) { + return new Scope(properties); + }; + + /** + * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope} message Scope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scope.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeOrgIds != null && message.includeOrgIds.length) + for (var i = 0; i < message.includeOrgIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includeOrgIds[i]); + if (message.includeProjectIds != null && message.includeProjectIds.length) + for (var i = 0; i < message.includeProjectIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.includeProjectIds[i]); + if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.includeGcpPublicDatasets); + return writer; + }; + + /** + * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope} message Scope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scope.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scope message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scope.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.includeOrgIds && message.includeOrgIds.length)) + message.includeOrgIds = []; + message.includeOrgIds.push(reader.string()); + break; + case 3: + if (!(message.includeProjectIds && message.includeProjectIds.length)) + message.includeProjectIds = []; + message.includeProjectIds.push(reader.string()); + break; + case 7: + message.includeGcpPublicDatasets = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scope message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scope.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scope message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scope.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includeOrgIds != null && message.hasOwnProperty("includeOrgIds")) { + if (!Array.isArray(message.includeOrgIds)) + return "includeOrgIds: array expected"; + for (var i = 0; i < message.includeOrgIds.length; ++i) + if (!$util.isString(message.includeOrgIds[i])) + return "includeOrgIds: string[] expected"; + } + if (message.includeProjectIds != null && message.hasOwnProperty("includeProjectIds")) { + if (!Array.isArray(message.includeProjectIds)) + return "includeProjectIds: array expected"; + for (var i = 0; i < message.includeProjectIds.length; ++i) + if (!$util.isString(message.includeProjectIds[i])) + return "includeProjectIds: string[] expected"; + } + if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) + if (typeof message.includeGcpPublicDatasets !== "boolean") + return "includeGcpPublicDatasets: boolean expected"; + return null; + }; + + /** + * Creates a Scope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope + */ + Scope.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope(); + if (object.includeOrgIds) { + if (!Array.isArray(object.includeOrgIds)) + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.includeOrgIds: array expected"); + message.includeOrgIds = []; + for (var i = 0; i < object.includeOrgIds.length; ++i) + message.includeOrgIds[i] = String(object.includeOrgIds[i]); + } + if (object.includeProjectIds) { + if (!Array.isArray(object.includeProjectIds)) + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.includeProjectIds: array expected"); + message.includeProjectIds = []; + for (var i = 0; i < object.includeProjectIds.length; ++i) + message.includeProjectIds[i] = String(object.includeProjectIds[i]); + } + if (object.includeGcpPublicDatasets != null) + message.includeGcpPublicDatasets = Boolean(object.includeGcpPublicDatasets); + return message; + }; + + /** + * Creates a plain object from a Scope message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} message Scope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includeOrgIds = []; + object.includeProjectIds = []; + } + if (options.defaults) + object.includeGcpPublicDatasets = false; + if (message.includeOrgIds && message.includeOrgIds.length) { + object.includeOrgIds = []; + for (var j = 0; j < message.includeOrgIds.length; ++j) + object.includeOrgIds[j] = message.includeOrgIds[j]; + } + if (message.includeProjectIds && message.includeProjectIds.length) { + object.includeProjectIds = []; + for (var j = 0; j < message.includeProjectIds.length; ++j) + object.includeProjectIds[j] = message.includeProjectIds[j]; + } + if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) + object.includeGcpPublicDatasets = message.includeGcpPublicDatasets; + return object; + }; + + /** + * Converts this Scope to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + * @instance + * @returns {Object.} JSON object + */ + Scope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Scope; + })(); + + return SearchCatalogRequest; + })(); + + v1beta1.SearchCatalogResponse = (function() { + + /** + * Properties of a SearchCatalogResponse. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISearchCatalogResponse + * @property {Array.|null} [results] SearchCatalogResponse results + * @property {string|null} [nextPageToken] SearchCatalogResponse nextPageToken + */ + + /** + * Constructs a new SearchCatalogResponse. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a SearchCatalogResponse. + * @implements ISearchCatalogResponse + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse=} [properties] Properties to set + */ + function SearchCatalogResponse(properties) { + this.results = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchCatalogResponse results. + * @member {Array.} results + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.results = $util.emptyArray; + + /** + * SearchCatalogResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @instance + */ + SearchCatalogResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchCatalogResponse instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse instance + */ + SearchCatalogResponse.create = function create(properties) { + return new SearchCatalogResponse(properties); + }; + + /** + * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCatalogResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchCatalogResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchCatalogResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCatalogResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.decode(reader, reader.uint32())); + break; + case 3: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchCatalogResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchCatalogResponse message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchCatalogResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify(message.results[i]); + if (error) + return "results." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse + */ + SearchCatalogResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results: object expected"); + message.results[i] = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.fromObject(object.results[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} message SearchCatalogResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchCatalogResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.results = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.toObject(message.results[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchCatalogResponse to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse + * @instance + * @returns {Object.} JSON object + */ + SearchCatalogResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SearchCatalogResponse; + })(); + + v1beta1.CreateEntryGroupRequest = (function() { + + /** + * Properties of a CreateEntryGroupRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ICreateEntryGroupRequest + * @property {string|null} [parent] CreateEntryGroupRequest parent + * @property {string|null} [entryGroupId] CreateEntryGroupRequest entryGroupId + * @property {google.cloud.datacatalog.v1beta1.IEntryGroup|null} [entryGroup] CreateEntryGroupRequest entryGroup + */ + + /** + * Constructs a new CreateEntryGroupRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a CreateEntryGroupRequest. + * @implements ICreateEntryGroupRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest=} [properties] Properties to set + */ + function CreateEntryGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEntryGroupRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.parent = ""; + + /** + * CreateEntryGroupRequest entryGroupId. + * @member {string} entryGroupId + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.entryGroupId = ""; + + /** + * CreateEntryGroupRequest entryGroup. + * @member {google.cloud.datacatalog.v1beta1.IEntryGroup|null|undefined} entryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.entryGroup = null; + + /** + * Creates a new CreateEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest instance + */ + CreateEntryGroupRequest.create = function create(properties) { + return new CreateEntryGroupRequest(properties); + }; + + /** + * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntryGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) + $root.google.cloud.datacatalog.v1beta1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryGroupId); return writer; }; /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. + * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntryGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.entryGroupId = reader.string(); + break; + case 2: + message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEntryGroupRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEntryGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) + if (!$util.isString(message.entryGroupId)) + return "entryGroupId: string expected"; + if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) { + var error = $root.google.cloud.datacatalog.v1beta1.EntryGroup.verify(message.entryGroup); + if (error) + return "entryGroup." + error; + } + return null; + }; + + /** + * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest + */ + CreateEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entryGroupId != null) + message.entryGroupId = String(object.entryGroupId); + if (object.entryGroup != null) { + if (typeof object.entryGroup !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.entryGroup: object expected"); + message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.fromObject(object.entryGroup); + } + return message; + }; + + /** + * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} message CreateEntryGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEntryGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entryGroup = null; + object.entryGroupId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) + object.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.toObject(message.entryGroup, options); + if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) + object.entryGroupId = message.entryGroupId; + return object; + }; + + /** + * Converts this CreateEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEntryGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateEntryGroupRequest; + })(); + + v1beta1.GetEntryGroupRequest = (function() { + + /** + * Properties of a GetEntryGroupRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IGetEntryGroupRequest + * @property {string|null} [name] GetEntryGroupRequest name + * @property {google.protobuf.IFieldMask|null} [readMask] GetEntryGroupRequest readMask + */ + + /** + * Constructs a new GetEntryGroupRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a GetEntryGroupRequest. + * @implements IGetEntryGroupRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest=} [properties] Properties to set + */ + function GetEntryGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEntryGroupRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @instance + */ + GetEntryGroupRequest.prototype.name = ""; + + /** + * GetEntryGroupRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @instance + */ + GetEntryGroupRequest.prototype.readMask = null; + + /** + * Creates a new GetEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest instance + */ + GetEntryGroupRequest.create = function create(properties) { + return new GetEntryGroupRequest(properties); + }; + + /** + * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntryGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.readMask != null && message.hasOwnProperty("readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntryGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntryGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntryGroupRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntryGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + return null; + }; + + /** + * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest + */ + GetEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + return message; + }; + + /** + * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} message GetEntryGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntryGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.readMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + return object; + }; + + /** + * Converts this GetEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntryGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetEntryGroupRequest; + })(); + + v1beta1.DeleteEntryGroupRequest = (function() { + + /** + * Properties of a DeleteEntryGroupRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IDeleteEntryGroupRequest + * @property {string|null} [name] DeleteEntryGroupRequest name + */ + + /** + * Constructs a new DeleteEntryGroupRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a DeleteEntryGroupRequest. + * @implements IDeleteEntryGroupRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest=} [properties] Properties to set + */ + function DeleteEntryGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEntryGroupRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @instance + */ + DeleteEntryGroupRequest.prototype.name = ""; + + /** + * Creates a new DeleteEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest instance + */ + DeleteEntryGroupRequest.create = function create(properties) { + return new DeleteEntryGroupRequest(properties); + }; + + /** + * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntryGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntryGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEntryGroupRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEntryGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + */ + DeleteEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} message DeleteEntryGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEntryGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEntryGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteEntryGroupRequest; + })(); + + v1beta1.CreateEntryRequest = (function() { + + /** + * Properties of a CreateEntryRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ICreateEntryRequest + * @property {string|null} [parent] CreateEntryRequest parent + * @property {string|null} [entryId] CreateEntryRequest entryId + * @property {google.cloud.datacatalog.v1beta1.IEntry|null} [entry] CreateEntryRequest entry + */ + + /** + * Constructs a new CreateEntryRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a CreateEntryRequest. + * @implements ICreateEntryRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest=} [properties] Properties to set + */ + function CreateEntryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEntryRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @instance + */ + CreateEntryRequest.prototype.parent = ""; + + /** + * CreateEntryRequest entryId. + * @member {string} entryId + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @instance + */ + CreateEntryRequest.prototype.entryId = ""; + + /** + * CreateEntryRequest entry. + * @member {google.cloud.datacatalog.v1beta1.IEntry|null|undefined} entry + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @instance + */ + CreateEntryRequest.prototype.entry = null; + + /** + * Creates a new CreateEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest instance + */ + CreateEntryRequest.create = function create(properties) { + return new CreateEntryRequest(properties); + }; + + /** + * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entry != null && message.hasOwnProperty("entry")) + $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entryId != null && message.hasOwnProperty("entryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryId); + return writer; + }; + + /** + * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEntryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.entryId = reader.string(); + break; + case 2: + message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEntryRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEntryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entryId != null && message.hasOwnProperty("entryId")) + if (!$util.isString(message.entryId)) + return "entryId: string expected"; + if (message.entry != null && message.hasOwnProperty("entry")) { + var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entry); + if (error) + return "entry." + error; + } + return null; + }; + + /** + * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest + */ + CreateEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entryId != null) + message.entryId = String(object.entryId); + if (object.entry != null) { + if (typeof object.entry !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreateEntryRequest.entry: object expected"); + message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entry); + } + return message; + }; + + /** + * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.CreateEntryRequest} message CreateEntryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEntryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entry = null; + object.entryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entry, options); + if (message.entryId != null && message.hasOwnProperty("entryId")) + object.entryId = message.entryId; + return object; + }; + + /** + * Converts this CreateEntryRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEntryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateEntryRequest; + })(); + + v1beta1.UpdateEntryRequest = (function() { + + /** + * Properties of an UpdateEntryRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IUpdateEntryRequest + * @property {google.cloud.datacatalog.v1beta1.IEntry|null} [entry] UpdateEntryRequest entry + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryRequest updateMask + */ + + /** + * Constructs a new UpdateEntryRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents an UpdateEntryRequest. + * @implements IUpdateEntryRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest=} [properties] Properties to set + */ + function UpdateEntryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEntryRequest entry. + * @member {google.cloud.datacatalog.v1beta1.IEntry|null|undefined} entry + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.entry = null; + + /** + * UpdateEntryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest instance + */ + UpdateEntryRequest.create = function create(properties) { + return new UpdateEntryRequest(properties); + }; + + /** + * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entry != null && message.hasOwnProperty("entry")) + $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. + * Decodes an UpdateEntryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntryGroupRequest.decode = function decode(reader, length) { + UpdateEntryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 3: - message.entryGroupId = reader.string(); + message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32()); break; case 2: - message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEntryRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEntryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entry != null && message.hasOwnProperty("entry")) { + var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entry); + if (error) + return "entry." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest + */ + UpdateEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest(); + if (object.entry != null) { + if (typeof object.entry !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryRequest.entry: object expected"); + message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} message UpdateEntryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEntryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entry = null; + object.updateMask = null; + } + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEntryRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEntryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateEntryRequest; + })(); + + v1beta1.DeleteEntryRequest = (function() { + + /** + * Properties of a DeleteEntryRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IDeleteEntryRequest + * @property {string|null} [name] DeleteEntryRequest name + */ + + /** + * Constructs a new DeleteEntryRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a DeleteEntryRequest. + * @implements IDeleteEntryRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest=} [properties] Properties to set + */ + function DeleteEntryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEntryRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @instance + */ + DeleteEntryRequest.prototype.name = ""; + + /** + * Creates a new DeleteEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest instance + */ + DeleteEntryRequest.create = function create(properties) { + return new DeleteEntryRequest(properties); + }; + + /** + * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEntryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -1788,130 +7381,107 @@ }; /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteEntryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntryGroupRequest message. + * Verifies a DeleteEntryRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEntryGroupRequest.verify = function verify(message) { + DeleteEntryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - if (!$util.isString(message.entryGroupId)) - return "entryGroupId: string expected"; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) { - var error = $root.google.cloud.datacatalog.v1beta1.EntryGroup.verify(message.entryGroup); - if (error) - return "entryGroup." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest */ - CreateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest) + DeleteEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryGroupId != null) - message.entryGroupId = String(object.entryGroupId); - if (object.entryGroup != null) { - if (typeof object.entryGroup !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.fromObject(object.entryGroup); - } + var message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} message CreateEntryGroupRequest + * @param {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} message DeleteEntryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntryGroupRequest.toObject = function toObject(message, options) { + DeleteEntryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.entryGroup = null; - object.entryGroupId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.toObject(message.entryGroup, options); - if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - object.entryGroupId = message.entryGroupId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateEntryGroupRequest to JSON. + * Converts this DeleteEntryRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest * @instance * @returns {Object.} JSON object */ - CreateEntryGroupRequest.prototype.toJSON = function toJSON() { + DeleteEntryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateEntryGroupRequest; + return DeleteEntryRequest; })(); - v1beta1.GetEntryGroupRequest = (function() { + v1beta1.GetEntryRequest = (function() { /** - * Properties of a GetEntryGroupRequest. + * Properties of a GetEntryRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetEntryGroupRequest - * @property {string|null} [name] GetEntryGroupRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetEntryGroupRequest readMask + * @interface IGetEntryRequest + * @property {string|null} [name] GetEntryRequest name */ /** - * Constructs a new GetEntryGroupRequest. + * Constructs a new GetEntryRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetEntryGroupRequest. - * @implements IGetEntryGroupRequest + * @classdesc Represents a GetEntryRequest. + * @implements IGetEntryRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest=} [properties] Properties to set */ - function GetEntryGroupRequest(properties) { + function GetEntryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1919,89 +7489,76 @@ } /** - * GetEntryGroupRequest name. + * GetEntryRequest name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @instance - */ - GetEntryGroupRequest.prototype.name = ""; - - /** - * GetEntryGroupRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @instance */ - GetEntryGroupRequest.prototype.readMask = null; + GetEntryRequest.prototype.name = ""; /** - * Creates a new GetEntryGroupRequest instance using the specified properties. + * Creates a new GetEntryRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest instance + * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest instance */ - GetEntryGroupRequest.create = function create(properties) { - return new GetEntryGroupRequest(properties); + GetEntryRequest.create = function create(properties) { + return new GetEntryRequest(properties); }; /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. + * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} message GetEntryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntryGroupRequest.encode = function encode(message, writer) { + GetEntryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.readMask != null && message.hasOwnProperty("readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. + * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} message GetEntryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer. + * Decodes a GetEntryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntryGroupRequest.decode = function decode(reader, length) { + GetEntryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetEntryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -2011,197 +7568,211 @@ }; /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { + GetEntryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntryGroupRequest message. + * Verifies a GetEntryRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEntryGroupRequest.verify = function verify(message) { + GetEntryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } return null; }; /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest */ - GetEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest) + GetEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetEntryRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest(); + var message = new $root.google.cloud.datacatalog.v1beta1.GetEntryRequest(); if (object.name != null) message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } return message; }; /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} message GetEntryGroupRequest + * @param {google.cloud.datacatalog.v1beta1.GetEntryRequest} message GetEntryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntryGroupRequest.toObject = function toObject(message, options) { + GetEntryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.readMask = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); return object; }; /** - * Converts this GetEntryGroupRequest to JSON. + * Converts this GetEntryRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest * @instance * @returns {Object.} JSON object */ - GetEntryGroupRequest.prototype.toJSON = function toJSON() { + GetEntryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEntryGroupRequest; + return GetEntryRequest; })(); - v1beta1.DeleteEntryGroupRequest = (function() { + v1beta1.LookupEntryRequest = (function() { /** - * Properties of a DeleteEntryGroupRequest. + * Properties of a LookupEntryRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteEntryGroupRequest - * @property {string|null} [name] DeleteEntryGroupRequest name + * @interface ILookupEntryRequest + * @property {string|null} [linkedResource] LookupEntryRequest linkedResource + * @property {string|null} [sqlResource] LookupEntryRequest sqlResource */ /** - * Constructs a new DeleteEntryGroupRequest. + * Constructs a new LookupEntryRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteEntryGroupRequest. - * @implements IDeleteEntryGroupRequest + * @classdesc Represents a LookupEntryRequest. + * @implements ILookupEntryRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest=} [properties] Properties to set + */ + function LookupEntryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookupEntryRequest linkedResource. + * @member {string} linkedResource + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.linkedResource = ""; + + /** + * LookupEntryRequest sqlResource. + * @member {string} sqlResource + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @instance */ - function DeleteEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LookupEntryRequest.prototype.sqlResource = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DeleteEntryGroupRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * LookupEntryRequest targetName. + * @member {"linkedResource"|"sqlResource"|undefined} targetName + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @instance */ - DeleteEntryGroupRequest.prototype.name = ""; + Object.defineProperty(LookupEntryRequest.prototype, "targetName", { + get: $util.oneOfGetter($oneOfFields = ["linkedResource", "sqlResource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. + * Creates a new LookupEntryRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest instance + * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest instance */ - DeleteEntryGroupRequest.create = function create(properties) { - return new DeleteEntryGroupRequest(properties); + LookupEntryRequest.create = function create(properties) { + return new LookupEntryRequest(properties); }; /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. + * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntryGroupRequest.encode = function encode(message, writer) { + LookupEntryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.linkedResource); + if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sqlResource); return writer; }; /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. + * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + LookupEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. + * Decodes a LookupEntryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntryGroupRequest.decode = function decode(reader, length) { + LookupEntryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.linkedResource = reader.string(); + break; + case 3: + message.sqlResource = reader.string(); break; default: reader.skipType(tag & 7); @@ -2212,109 +7783,134 @@ }; /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { + LookupEntryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntryGroupRequest message. + * Verifies a LookupEntryRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEntryGroupRequest.verify = function verify(message) { + LookupEntryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { + properties.targetName = 1; + if (!$util.isString(message.linkedResource)) + return "linkedResource: string expected"; + } + if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { + if (properties.targetName === 1) + return "targetName: multiple values"; + properties.targetName = 1; + if (!$util.isString(message.sqlResource)) + return "sqlResource: string expected"; + } return null; }; /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest */ - DeleteEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest) + LookupEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest(); + if (object.linkedResource != null) + message.linkedResource = String(object.linkedResource); + if (object.sqlResource != null) + message.sqlResource = String(object.sqlResource); return message; }; /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} message DeleteEntryGroupRequest + * @param {google.cloud.datacatalog.v1beta1.LookupEntryRequest} message LookupEntryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntryGroupRequest.toObject = function toObject(message, options) { + LookupEntryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { + object.linkedResource = message.linkedResource; + if (options.oneofs) + object.targetName = "linkedResource"; + } + if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { + object.sqlResource = message.sqlResource; + if (options.oneofs) + object.targetName = "sqlResource"; + } return object; }; /** - * Converts this DeleteEntryGroupRequest to JSON. + * Converts this LookupEntryRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest * @instance * @returns {Object.} JSON object */ - DeleteEntryGroupRequest.prototype.toJSON = function toJSON() { + LookupEntryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteEntryGroupRequest; + return LookupEntryRequest; })(); - v1beta1.CreateEntryRequest = (function() { + v1beta1.Entry = (function() { /** - * Properties of a CreateEntryRequest. + * Properties of an Entry. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateEntryRequest - * @property {string|null} [parent] CreateEntryRequest parent - * @property {string|null} [entryId] CreateEntryRequest entryId - * @property {google.cloud.datacatalog.v1beta1.IEntry|null} [entry] CreateEntryRequest entry + * @interface IEntry + * @property {string|null} [name] Entry name + * @property {string|null} [linkedResource] Entry linkedResource + * @property {google.cloud.datacatalog.v1beta1.EntryType|null} [type] Entry type + * @property {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null} [gcsFilesetSpec] Entry gcsFilesetSpec + * @property {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null} [bigqueryTableSpec] Entry bigqueryTableSpec + * @property {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null} [bigqueryDateShardedSpec] Entry bigqueryDateShardedSpec + * @property {string|null} [displayName] Entry displayName + * @property {string|null} [description] Entry description + * @property {google.cloud.datacatalog.v1beta1.ISchema|null} [schema] Entry schema + * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [sourceSystemTimestamps] Entry sourceSystemTimestamps */ /** - * Constructs a new CreateEntryRequest. + * Constructs a new Entry. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateEntryRequest. - * @implements ICreateEntryRequest + * @classdesc Represents an Entry. + * @implements IEntry * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IEntry=} [properties] Properties to set */ - function CreateEntryRequest(properties) { + function Entry(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2322,101 +7918,217 @@ } /** - * CreateEntryRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * Entry name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.Entry * @instance */ - CreateEntryRequest.prototype.parent = ""; + Entry.prototype.name = ""; + + /** + * Entry linkedResource. + * @member {string} linkedResource + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.linkedResource = ""; + + /** + * Entry type. + * @member {google.cloud.datacatalog.v1beta1.EntryType} type + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.type = 0; + + /** + * Entry gcsFilesetSpec. + * @member {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null|undefined} gcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.gcsFilesetSpec = null; + + /** + * Entry bigqueryTableSpec. + * @member {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null|undefined} bigqueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.bigqueryTableSpec = null; + + /** + * Entry bigqueryDateShardedSpec. + * @member {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null|undefined} bigqueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.bigqueryDateShardedSpec = null; + + /** + * Entry displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.displayName = ""; + + /** + * Entry description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.description = ""; + + /** + * Entry schema. + * @member {google.cloud.datacatalog.v1beta1.ISchema|null|undefined} schema + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.schema = null; + + /** + * Entry sourceSystemTimestamps. + * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} sourceSystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @instance + */ + Entry.prototype.sourceSystemTimestamps = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CreateEntryRequest entryId. - * @member {string} entryId - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * Entry entryType. + * @member {"type"|undefined} entryType + * @memberof google.cloud.datacatalog.v1beta1.Entry * @instance */ - CreateEntryRequest.prototype.entryId = ""; + Object.defineProperty(Entry.prototype, "entryType", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * CreateEntryRequest entry. - * @member {google.cloud.datacatalog.v1beta1.IEntry|null|undefined} entry - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * Entry typeSpec. + * @member {"gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"|undefined} typeSpec + * @memberof google.cloud.datacatalog.v1beta1.Entry * @instance */ - CreateEntryRequest.prototype.entry = null; + Object.defineProperty(Entry.prototype, "typeSpec", { + get: $util.oneOfGetter($oneOfFields = ["gcsFilesetSpec", "bigqueryTableSpec", "bigqueryDateShardedSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CreateEntryRequest instance using the specified properties. + * Creates a new Entry instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest instance + * @param {google.cloud.datacatalog.v1beta1.IEntry=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry instance */ - CreateEntryRequest.create = function create(properties) { - return new CreateEntryRequest(properties); + Entry.create = function create(properties) { + return new Entry(properties); }; /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IEntry} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntryRequest.encode = function encode(message, writer) { + Entry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.entry != null && message.hasOwnProperty("entry")) - $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entryId != null && message.hasOwnProperty("entryId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.schema != null && message.hasOwnProperty("schema")) + $root.google.cloud.datacatalog.v1beta1.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) + $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.encode(message.gcsFilesetSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) + $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.sourceSystemTimestamps, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.linkedResource); + if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) + $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.encode(message.bigqueryTableSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) + $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.encode(message.bigqueryDateShardedSpec, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IEntry} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + Entry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntryRequest message from the specified reader or buffer. + * Decodes an Entry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntryRequest.decode = function decode(reader, length) { + Entry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Entry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; - case 3: - message.entryId = reader.string(); + case 9: + message.linkedResource = reader.string(); break; case 2: - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32()); + message.type = reader.int32(); + break; + case 6: + message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.decode(reader, reader.uint32()); + break; + case 12: + message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.decode(reader, reader.uint32()); + break; + case 15: + message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.decode(reader, reader.uint32()); + break; + case 3: + message.displayName = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + message.schema = $root.google.cloud.datacatalog.v1beta1.Schema.decode(reader, reader.uint32()); + break; + case 7: + message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2427,130 +8139,255 @@ }; /** - * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. + * Decodes an Entry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntryRequest.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntryRequest message. + * Verifies an Entry message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEntryRequest.verify = function verify(message) { + Entry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entryId != null && message.hasOwnProperty("entryId")) - if (!$util.isString(message.entryId)) - return "entryId: string expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { - var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entry); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + if (!$util.isString(message.linkedResource)) + return "linkedResource: string expected"; + if (message.type != null && message.hasOwnProperty("type")) { + properties.entryType = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 2: + case 3: + case 4: + break; + } + } + if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { + properties.typeSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify(message.gcsFilesetSpec); + if (error) + return "gcsFilesetSpec." + error; + } + } + if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { + if (properties.typeSpec === 1) + return "typeSpec: multiple values"; + properties.typeSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify(message.bigqueryTableSpec); + if (error) + return "bigqueryTableSpec." + error; + } + } + if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { + if (properties.typeSpec === 1) + return "typeSpec: multiple values"; + properties.typeSpec = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify(message.bigqueryDateShardedSpec); + if (error) + return "bigqueryDateShardedSpec." + error; + } + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.datacatalog.v1beta1.Schema.verify(message.schema); if (error) - return "entry." + error; + return "schema." + error; + } + if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) { + var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.sourceSystemTimestamps); + if (error) + return "sourceSystemTimestamps." + error; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.Entry) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.Entry(); + if (object.name != null) + message.name = String(object.name); + if (object.linkedResource != null) + message.linkedResource = String(object.linkedResource); + switch (object.type) { + case "ENTRY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 2: + message.type = 2; + break; + case "DATA_STREAM": + case 3: + message.type = 3; + break; + case "FILESET": + case 4: + message.type = 4; + break; + } + if (object.gcsFilesetSpec != null) { + if (typeof object.gcsFilesetSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.gcsFilesetSpec: object expected"); + message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.fromObject(object.gcsFilesetSpec); + } + if (object.bigqueryTableSpec != null) { + if (typeof object.bigqueryTableSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.bigqueryTableSpec: object expected"); + message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.fromObject(object.bigqueryTableSpec); + } + if (object.bigqueryDateShardedSpec != null) { + if (typeof object.bigqueryDateShardedSpec !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.bigqueryDateShardedSpec: object expected"); + message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.fromObject(object.bigqueryDateShardedSpec); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.schema: object expected"); + message.schema = $root.google.cloud.datacatalog.v1beta1.Schema.fromObject(object.schema); } - return null; - }; - - /** - * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest - */ - CreateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryId != null) - message.entryId = String(object.entryId); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entry); + if (object.sourceSystemTimestamps != null) { + if (typeof object.sourceSystemTimestamps !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.sourceSystemTimestamps: object expected"); + message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.sourceSystemTimestamps); } return message; }; /** - * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. + * Creates a plain object from an Entry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @static - * @param {google.cloud.datacatalog.v1beta1.CreateEntryRequest} message CreateEntryRequest + * @param {google.cloud.datacatalog.v1beta1.Entry} message Entry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntryRequest.toObject = function toObject(message, options) { + Entry.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.entry = null; - object.entryId = ""; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.schema = null; + object.sourceSystemTimestamps = null; + object.linkedResource = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.EntryType[message.type] : message.type; + if (options.oneofs) + object.entryType = "type"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.datacatalog.v1beta1.Schema.toObject(message.schema, options); + if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { + object.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.toObject(message.gcsFilesetSpec, options); + if (options.oneofs) + object.typeSpec = "gcsFilesetSpec"; + } + if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) + object.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.sourceSystemTimestamps, options); + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + object.linkedResource = message.linkedResource; + if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { + object.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.toObject(message.bigqueryTableSpec, options); + if (options.oneofs) + object.typeSpec = "bigqueryTableSpec"; + } + if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { + object.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.toObject(message.bigqueryDateShardedSpec, options); + if (options.oneofs) + object.typeSpec = "bigqueryDateShardedSpec"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entry, options); - if (message.entryId != null && message.hasOwnProperty("entryId")) - object.entryId = message.entryId; return object; }; /** - * Converts this CreateEntryRequest to JSON. + * Converts this Entry to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.Entry * @instance * @returns {Object.} JSON object */ - CreateEntryRequest.prototype.toJSON = function toJSON() { + Entry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateEntryRequest; + return Entry; })(); - v1beta1.UpdateEntryRequest = (function() { + v1beta1.EntryGroup = (function() { /** - * Properties of an UpdateEntryRequest. + * Properties of an EntryGroup. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateEntryRequest - * @property {google.cloud.datacatalog.v1beta1.IEntry|null} [entry] UpdateEntryRequest entry - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryRequest updateMask + * @interface IEntryGroup + * @property {string|null} [name] EntryGroup name + * @property {string|null} [displayName] EntryGroup displayName + * @property {string|null} [description] EntryGroup description + * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [dataCatalogTimestamps] EntryGroup dataCatalogTimestamps */ /** - * Constructs a new UpdateEntryRequest. + * Constructs a new EntryGroup. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateEntryRequest. - * @implements IUpdateEntryRequest + * @classdesc Represents an EntryGroup. + * @implements IEntryGroup * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IEntryGroup=} [properties] Properties to set */ - function UpdateEntryRequest(properties) { + function EntryGroup(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2558,88 +8395,114 @@ } /** - * UpdateEntryRequest entry. - * @member {google.cloud.datacatalog.v1beta1.IEntry|null|undefined} entry - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * EntryGroup name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @instance */ - UpdateEntryRequest.prototype.entry = null; + EntryGroup.prototype.name = ""; /** - * UpdateEntryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * EntryGroup displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @instance */ - UpdateEntryRequest.prototype.updateMask = null; + EntryGroup.prototype.displayName = ""; /** - * Creates a new UpdateEntryRequest instance using the specified properties. + * EntryGroup description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @instance + */ + EntryGroup.prototype.description = ""; + + /** + * EntryGroup dataCatalogTimestamps. + * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} dataCatalogTimestamps + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @instance + */ + EntryGroup.prototype.dataCatalogTimestamps = null; + + /** + * Creates a new EntryGroup instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest instance + * @param {google.cloud.datacatalog.v1beta1.IEntryGroup=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup instance */ - UpdateEntryRequest.create = function create(properties) { - return new UpdateEntryRequest(properties); + EntryGroup.create = function create(properties) { + return new EntryGroup(properties); }; /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. + * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IEntryGroup} message EntryGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntryRequest.encode = function encode(message, writer) { + EntryGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entry != null && message.hasOwnProperty("entry")) - $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) + $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.dataCatalogTimestamps, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. + * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IEntryGroup} message EntryGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + EntryGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer. + * Decodes an EntryGroup message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntryRequest.decode = function decode(reader, length) { + EntryGroup.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.EntryGroup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2650,126 +8513,139 @@ }; /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. + * Decodes an EntryGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntryRequest.decodeDelimited = function decodeDelimited(reader) { + EntryGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntryRequest message. + * Verifies an EntryGroup message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEntryRequest.verify = function verify(message) { + EntryGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { - var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entry); - if (error) - return "entry." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) { + var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.dataCatalogTimestamps); if (error) - return "updateMask." + error; + return "dataCatalogTimestamps." + error; } return null; }; /** - * Creates an UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup */ - UpdateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest) + EntryGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.EntryGroup) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest(); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.datacatalog.v1beta1.EntryGroup(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.dataCatalogTimestamps != null) { + if (typeof object.dataCatalogTimestamps !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.EntryGroup.dataCatalogTimestamps: object expected"); + message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.dataCatalogTimestamps); } return message; }; /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. + * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} message UpdateEntryRequest + * @param {google.cloud.datacatalog.v1beta1.EntryGroup} message EntryGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntryRequest.toObject = function toObject(message, options) { + EntryGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.entry = null; - object.updateMask = null; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.dataCatalogTimestamps = null; } - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) + object.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.dataCatalogTimestamps, options); return object; }; /** - * Converts this UpdateEntryRequest to JSON. + * Converts this EntryGroup to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.EntryGroup * @instance * @returns {Object.} JSON object */ - UpdateEntryRequest.prototype.toJSON = function toJSON() { + EntryGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateEntryRequest; + return EntryGroup; })(); - v1beta1.DeleteEntryRequest = (function() { + v1beta1.CreateTagTemplateRequest = (function() { /** - * Properties of a DeleteEntryRequest. + * Properties of a CreateTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteEntryRequest - * @property {string|null} [name] DeleteEntryRequest name + * @interface ICreateTagTemplateRequest + * @property {string|null} [parent] CreateTagTemplateRequest parent + * @property {string|null} [tagTemplateId] CreateTagTemplateRequest tagTemplateId + * @property {google.cloud.datacatalog.v1beta1.ITagTemplate|null} [tagTemplate] CreateTagTemplateRequest tagTemplate */ /** - * Constructs a new DeleteEntryRequest. + * Constructs a new CreateTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteEntryRequest. - * @implements IDeleteEntryRequest + * @classdesc Represents a CreateTagTemplateRequest. + * @implements ICreateTagTemplateRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest=} [properties] Properties to set */ - function DeleteEntryRequest(properties) { + function CreateTagTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2777,75 +8653,101 @@ } /** - * DeleteEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * CreateTagTemplateRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @instance */ - DeleteEntryRequest.prototype.name = ""; + CreateTagTemplateRequest.prototype.parent = ""; /** - * Creates a new DeleteEntryRequest instance using the specified properties. + * CreateTagTemplateRequest tagTemplateId. + * @member {string} tagTemplateId + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @instance + */ + CreateTagTemplateRequest.prototype.tagTemplateId = ""; + + /** + * CreateTagTemplateRequest tagTemplate. + * @member {google.cloud.datacatalog.v1beta1.ITagTemplate|null|undefined} tagTemplate + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @instance + */ + CreateTagTemplateRequest.prototype.tagTemplate = null; + + /** + * Creates a new CreateTagTemplateRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest instance */ - DeleteEntryRequest.create = function create(properties) { - return new DeleteEntryRequest(properties); + CreateTagTemplateRequest.create = function create(properties) { + return new CreateTagTemplateRequest(properties); }; /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. + * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntryRequest.encode = function encode(message, writer) { + CreateTagTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) + $root.google.cloud.datacatalog.v1beta1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagTemplateId); return writer; }; /** - * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. + * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer. + * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntryRequest.decode = function decode(reader, length) { + CreateTagTemplateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 3: + message.tagTemplateId = reader.string(); + break; + case 2: + message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2856,107 +8758,129 @@ }; /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntryRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntryRequest message. + * Verifies a CreateTagTemplateRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEntryRequest.verify = function verify(message) { + CreateTagTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) + if (!$util.isString(message.tagTemplateId)) + return "tagTemplateId: string expected"; + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { + var error = $root.google.cloud.datacatalog.v1beta1.TagTemplate.verify(message.tagTemplate); + if (error) + return "tagTemplate." + error; + } return null; }; /** - * Creates a DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest */ - DeleteEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest) + CreateTagTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tagTemplateId != null) + message.tagTemplateId = String(object.tagTemplateId); + if (object.tagTemplate != null) { + if (typeof object.tagTemplate !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.tagTemplate: object expected"); + message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.fromObject(object.tagTemplate); + } return message; }; /** - * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} message DeleteEntryRequest + * @param {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} message CreateTagTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntryRequest.toObject = function toObject(message, options) { + CreateTagTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.tagTemplate = null; + object.tagTemplateId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) + object.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.toObject(message.tagTemplate, options); + if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) + object.tagTemplateId = message.tagTemplateId; return object; }; /** - * Converts this DeleteEntryRequest to JSON. + * Converts this CreateTagTemplateRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest * @instance * @returns {Object.} JSON object */ - DeleteEntryRequest.prototype.toJSON = function toJSON() { + CreateTagTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteEntryRequest; + return CreateTagTemplateRequest; })(); - v1beta1.GetEntryRequest = (function() { + v1beta1.GetTagTemplateRequest = (function() { /** - * Properties of a GetEntryRequest. + * Properties of a GetTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetEntryRequest - * @property {string|null} [name] GetEntryRequest name + * @interface IGetTagTemplateRequest + * @property {string|null} [name] GetTagTemplateRequest name */ /** - * Constructs a new GetEntryRequest. + * Constructs a new GetTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetEntryRequest. - * @implements IGetEntryRequest + * @classdesc Represents a GetTagTemplateRequest. + * @implements IGetTagTemplateRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest=} [properties] Properties to set */ - function GetEntryRequest(properties) { + function GetTagTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2964,35 +8888,35 @@ } /** - * GetEntryRequest name. + * GetTagTemplateRequest name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @instance */ - GetEntryRequest.prototype.name = ""; + GetTagTemplateRequest.prototype.name = ""; /** - * Creates a new GetEntryRequest instance using the specified properties. + * Creates a new GetTagTemplateRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest instance + * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest instance */ - GetEntryRequest.create = function create(properties) { - return new GetEntryRequest(properties); + GetTagTemplateRequest.create = function create(properties) { + return new GetTagTemplateRequest(properties); }; /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. + * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} message GetEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntryRequest.encode = function encode(message, writer) { + GetTagTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -3001,33 +8925,33 @@ }; /** - * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. + * Encodes the specified GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} message GetEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntryRequest message from the specified reader or buffer. + * Decodes a GetTagTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntryRequest.decode = function decode(reader, length) { + GetTagTemplateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetEntryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -3043,30 +8967,30 @@ }; /** - * Decodes a GetEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTagTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntryRequest.decodeDelimited = function decodeDelimited(reader) { + GetTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntryRequest message. + * Verifies a GetTagTemplateRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEntryRequest.verify = function verify(message) { + GetTagTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -3076,32 +9000,32 @@ }; /** - * Creates a GetEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest */ - GetEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetEntryRequest) + GetTagTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetEntryRequest(); + var message = new $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.GetEntryRequest} message GetEntryRequest + * @param {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} message GetTagTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntryRequest.toObject = function toObject(message, options) { + GetTagTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -3113,38 +9037,56 @@ }; /** - * Converts this GetEntryRequest to JSON. + * Converts this GetTagTemplateRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest * @instance * @returns {Object.} JSON object */ - GetEntryRequest.prototype.toJSON = function toJSON() { + GetTagTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEntryRequest; + return GetTagTemplateRequest; })(); - v1beta1.LookupEntryRequest = (function() { + /** + * EntryType enum. + * @name google.cloud.datacatalog.v1beta1.EntryType + * @enum {string} + * @property {number} ENTRY_TYPE_UNSPECIFIED=0 ENTRY_TYPE_UNSPECIFIED value + * @property {number} TABLE=2 TABLE value + * @property {number} DATA_STREAM=3 DATA_STREAM value + * @property {number} FILESET=4 FILESET value + */ + v1beta1.EntryType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTRY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "TABLE"] = 2; + values[valuesById[3] = "DATA_STREAM"] = 3; + values[valuesById[4] = "FILESET"] = 4; + return values; + })(); + + v1beta1.UpdateTagTemplateRequest = (function() { /** - * Properties of a LookupEntryRequest. + * Properties of an UpdateTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ILookupEntryRequest - * @property {string|null} [linkedResource] LookupEntryRequest linkedResource - * @property {string|null} [sqlResource] LookupEntryRequest sqlResource + * @interface IUpdateTagTemplateRequest + * @property {google.cloud.datacatalog.v1beta1.ITagTemplate|null} [tagTemplate] UpdateTagTemplateRequest tagTemplate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateRequest updateMask */ /** - * Constructs a new LookupEntryRequest. + * Constructs a new UpdateTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a LookupEntryRequest. - * @implements ILookupEntryRequest + * @classdesc Represents an UpdateTagTemplateRequest. + * @implements IUpdateTagTemplateRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest=} [properties] Properties to set */ - function LookupEntryRequest(properties) { + function UpdateTagTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3152,102 +9094,88 @@ } /** - * LookupEntryRequest linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.linkedResource = ""; - - /** - * LookupEntryRequest sqlResource. - * @member {string} sqlResource - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * UpdateTagTemplateRequest tagTemplate. + * @member {google.cloud.datacatalog.v1beta1.ITagTemplate|null|undefined} tagTemplate + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @instance */ - LookupEntryRequest.prototype.sqlResource = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateTagTemplateRequest.prototype.tagTemplate = null; /** - * LookupEntryRequest targetName. - * @member {"linkedResource"|"sqlResource"|undefined} targetName - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * UpdateTagTemplateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @instance */ - Object.defineProperty(LookupEntryRequest.prototype, "targetName", { - get: $util.oneOfGetter($oneOfFields = ["linkedResource", "sqlResource"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateTagTemplateRequest.prototype.updateMask = null; /** - * Creates a new LookupEntryRequest instance using the specified properties. + * Creates a new UpdateTagTemplateRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest instance */ - LookupEntryRequest.create = function create(properties) { - return new LookupEntryRequest(properties); + UpdateTagTemplateRequest.create = function create(properties) { + return new UpdateTagTemplateRequest(properties); }; /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. + * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEntryRequest.encode = function encode(message, writer) { + UpdateTagTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.linkedResource); - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sqlResource); + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) + $root.google.cloud.datacatalog.v1beta1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. + * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEntryRequest message from the specified reader or buffer. + * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEntryRequest.decode = function decode(reader, length) { + UpdateTagTemplateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.linkedResource = reader.string(); + message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.decode(reader, reader.uint32()); break; - case 3: - message.sqlResource = reader.string(); + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3258,134 +9186,127 @@ }; /** - * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEntryRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEntryRequest message. + * Verifies an UpdateTagTemplateRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LookupEntryRequest.verify = function verify(message) { + UpdateTagTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { - properties.targetName = 1; - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { + var error = $root.google.cloud.datacatalog.v1beta1.TagTemplate.verify(message.tagTemplate); + if (error) + return "tagTemplate." + error; } - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { - if (properties.targetName === 1) - return "targetName: multiple values"; - properties.targetName = 1; - if (!$util.isString(message.sqlResource)) - return "sqlResource: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest */ - LookupEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest) + UpdateTagTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest(); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - if (object.sqlResource != null) - message.sqlResource = String(object.sqlResource); + var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest(); + if (object.tagTemplate != null) { + if (typeof object.tagTemplate !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.tagTemplate: object expected"); + message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.fromObject(object.tagTemplate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.LookupEntryRequest} message LookupEntryRequest + * @param {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} message UpdateTagTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEntryRequest.toObject = function toObject(message, options) { + UpdateTagTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { - object.linkedResource = message.linkedResource; - if (options.oneofs) - object.targetName = "linkedResource"; - } - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { - object.sqlResource = message.sqlResource; - if (options.oneofs) - object.targetName = "sqlResource"; + if (options.defaults) { + object.tagTemplate = null; + object.updateMask = null; } + if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) + object.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.toObject(message.tagTemplate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LookupEntryRequest to JSON. + * Converts this UpdateTagTemplateRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest * @instance * @returns {Object.} JSON object */ - LookupEntryRequest.prototype.toJSON = function toJSON() { + UpdateTagTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LookupEntryRequest; + return UpdateTagTemplateRequest; })(); - v1beta1.Entry = (function() { + v1beta1.DeleteTagTemplateRequest = (function() { /** - * Properties of an Entry. + * Properties of a DeleteTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IEntry - * @property {string|null} [name] Entry name - * @property {string|null} [linkedResource] Entry linkedResource - * @property {google.cloud.datacatalog.v1beta1.EntryType|null} [type] Entry type - * @property {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null} [gcsFilesetSpec] Entry gcsFilesetSpec - * @property {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null} [bigqueryTableSpec] Entry bigqueryTableSpec - * @property {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null} [bigqueryDateShardedSpec] Entry bigqueryDateShardedSpec - * @property {string|null} [displayName] Entry displayName - * @property {string|null} [description] Entry description - * @property {google.cloud.datacatalog.v1beta1.ISchema|null} [schema] Entry schema - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [sourceSystemTimestamps] Entry sourceSystemTimestamps + * @interface IDeleteTagTemplateRequest + * @property {string|null} [name] DeleteTagTemplateRequest name + * @property {boolean|null} [force] DeleteTagTemplateRequest force */ /** - * Constructs a new Entry. + * Constructs a new DeleteTagTemplateRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an Entry. - * @implements IEntry + * @classdesc Represents a DeleteTagTemplateRequest. + * @implements IDeleteTagTemplateRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IEntry=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest=} [properties] Properties to set */ - function Entry(properties) { + function DeleteTagTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3393,217 +9314,88 @@ } /** - * Entry name. + * DeleteTagTemplateRequest name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.name = ""; - - /** - * Entry linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.linkedResource = ""; - - /** - * Entry type. - * @member {google.cloud.datacatalog.v1beta1.EntryType} type - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.type = 0; - - /** - * Entry gcsFilesetSpec. - * @member {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null|undefined} gcsFilesetSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.gcsFilesetSpec = null; - - /** - * Entry bigqueryTableSpec. - * @member {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null|undefined} bigqueryTableSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.bigqueryTableSpec = null; - - /** - * Entry bigqueryDateShardedSpec. - * @member {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null|undefined} bigqueryDateShardedSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.bigqueryDateShardedSpec = null; - - /** - * Entry displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.displayName = ""; - - /** - * Entry description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.description = ""; - - /** - * Entry schema. - * @member {google.cloud.datacatalog.v1beta1.ISchema|null|undefined} schema - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.schema = null; - - /** - * Entry sourceSystemTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} sourceSystemTimestamps - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.sourceSystemTimestamps = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Entry entryType. - * @member {"type"|undefined} entryType - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @instance */ - Object.defineProperty(Entry.prototype, "entryType", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteTagTemplateRequest.prototype.name = ""; /** - * Entry typeSpec. - * @member {"gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"|undefined} typeSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry + * DeleteTagTemplateRequest force. + * @member {boolean} force + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @instance */ - Object.defineProperty(Entry.prototype, "typeSpec", { - get: $util.oneOfGetter($oneOfFields = ["gcsFilesetSpec", "bigqueryTableSpec", "bigqueryDateShardedSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteTagTemplateRequest.prototype.force = false; /** - * Creates a new Entry instance using the specified properties. + * Creates a new DeleteTagTemplateRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IEntry=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest instance */ - Entry.create = function create(properties) { - return new Entry(properties); + DeleteTagTemplateRequest.create = function create(properties) { + return new DeleteTagTemplateRequest(properties); }; /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. + * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IEntry} message Entry message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + DeleteTagTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.schema != null && message.hasOwnProperty("schema")) - $root.google.cloud.datacatalog.v1beta1.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) - $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.encode(message.gcsFilesetSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) - $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.sourceSystemTimestamps, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.linkedResource); - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) - $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.encode(message.bigqueryTableSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) - $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.encode(message.bigqueryDateShardedSpec, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.force != null && message.hasOwnProperty("force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. + * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IEntry} message Entry message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Entry message from the specified reader or buffer. + * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + DeleteTagTemplateRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Entry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 9: - message.linkedResource = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 6: - message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.decode(reader, reader.uint32()); - break; - case 12: - message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.decode(reader, reader.uint32()); - break; - case 15: - message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.decode(reader, reader.uint32()); - break; - case 3: - message.displayName = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - message.schema = $root.google.cloud.datacatalog.v1beta1.Schema.decode(reader, reader.uint32()); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); break; - case 7: - message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); + case 2: + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -3614,255 +9406,117 @@ }; /** - * Decodes an Entry message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + DeleteTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Entry message. + * Verifies a DeleteTagTemplateRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + DeleteTagTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - properties.entryType = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 2: - case 3: - case 4: - break; - } - } - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify(message.gcsFilesetSpec); - if (error) - return "gcsFilesetSpec." + error; - } - } - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify(message.bigqueryTableSpec); - if (error) - return "bigqueryTableSpec." + error; - } - } - if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify(message.bigqueryDateShardedSpec); - if (error) - return "bigqueryDateShardedSpec." + error; - } - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.datacatalog.v1beta1.Schema.verify(message.schema); - if (error) - return "schema." + error; - } - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) { - var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.sourceSystemTimestamps); - if (error) - return "sourceSystemTimestamps." + error; - } + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Entry) + DeleteTagTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Entry(); + var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest(); if (object.name != null) message.name = String(object.name); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - switch (object.type) { - case "ENTRY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 2: - message.type = 2; - break; - case "DATA_STREAM": - case 3: - message.type = 3; - break; - case "FILESET": - case 4: - message.type = 4; - break; - } - if (object.gcsFilesetSpec != null) { - if (typeof object.gcsFilesetSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.gcsFilesetSpec: object expected"); - message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.fromObject(object.gcsFilesetSpec); - } - if (object.bigqueryTableSpec != null) { - if (typeof object.bigqueryTableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.bigqueryTableSpec: object expected"); - message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.fromObject(object.bigqueryTableSpec); - } - if (object.bigqueryDateShardedSpec != null) { - if (typeof object.bigqueryDateShardedSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.bigqueryDateShardedSpec: object expected"); - message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.fromObject(object.bigqueryDateShardedSpec); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.schema: object expected"); - message.schema = $root.google.cloud.datacatalog.v1beta1.Schema.fromObject(object.schema); - } - if (object.sourceSystemTimestamps != null) { - if (typeof object.sourceSystemTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.sourceSystemTimestamps: object expected"); - message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.sourceSystemTimestamps); - } + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @static - * @param {google.cloud.datacatalog.v1beta1.Entry} message Entry + * @param {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} message DeleteTagTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + DeleteTagTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.description = ""; - object.schema = null; - object.sourceSystemTimestamps = null; - object.linkedResource = ""; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.EntryType[message.type] : message.type; - if (options.oneofs) - object.entryType = "type"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.datacatalog.v1beta1.Schema.toObject(message.schema, options); - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { - object.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.toObject(message.gcsFilesetSpec, options); - if (options.oneofs) - object.typeSpec = "gcsFilesetSpec"; - } - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) - object.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.sourceSystemTimestamps, options); - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { - object.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.toObject(message.bigqueryTableSpec, options); - if (options.oneofs) - object.typeSpec = "bigqueryTableSpec"; - } - if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { - object.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.toObject(message.bigqueryDateShardedSpec, options); - if (options.oneofs) - object.typeSpec = "bigqueryDateShardedSpec"; - } + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this Entry to JSON. + * Converts this DeleteTagTemplateRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Entry + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { + DeleteTagTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Entry; + return DeleteTagTemplateRequest; })(); - v1beta1.EntryGroup = (function() { + v1beta1.CreateTagRequest = (function() { /** - * Properties of an EntryGroup. + * Properties of a CreateTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IEntryGroup - * @property {string|null} [name] EntryGroup name - * @property {string|null} [displayName] EntryGroup displayName - * @property {string|null} [description] EntryGroup description - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [dataCatalogTimestamps] EntryGroup dataCatalogTimestamps + * @interface ICreateTagRequest + * @property {string|null} [parent] CreateTagRequest parent + * @property {google.cloud.datacatalog.v1beta1.ITag|null} [tag] CreateTagRequest tag */ /** - * Constructs a new EntryGroup. + * Constructs a new CreateTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an EntryGroup. - * @implements IEntryGroup + * @classdesc Represents a CreateTagRequest. + * @implements ICreateTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest=} [properties] Properties to set */ - function EntryGroup(properties) { + function CreateTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3870,114 +9524,88 @@ } /** - * EntryGroup name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - */ - EntryGroup.prototype.name = ""; - - /** - * EntryGroup displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - */ - EntryGroup.prototype.displayName = ""; - - /** - * EntryGroup description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * CreateTagRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @instance */ - EntryGroup.prototype.description = ""; + CreateTagRequest.prototype.parent = ""; /** - * EntryGroup dataCatalogTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} dataCatalogTimestamps - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * CreateTagRequest tag. + * @member {google.cloud.datacatalog.v1beta1.ITag|null|undefined} tag + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @instance */ - EntryGroup.prototype.dataCatalogTimestamps = null; + CreateTagRequest.prototype.tag = null; /** - * Creates a new EntryGroup instance using the specified properties. + * Creates a new CreateTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest instance */ - EntryGroup.create = function create(properties) { - return new EntryGroup(properties); + CreateTagRequest.create = function create(properties) { + return new CreateTagRequest(properties); }; /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup} message EntryGroup message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} message CreateTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntryGroup.encode = function encode(message, writer) { + CreateTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) - $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.dataCatalogTimestamps, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tag != null && message.hasOwnProperty("tag")) + $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup} message EntryGroup message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} message CreateTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntryGroup.encodeDelimited = function encodeDelimited(message, writer) { + CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntryGroup message from the specified reader or buffer. + * Decodes a CreateTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup + * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntryGroup.decode = function decode(reader, length) { + CreateTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.EntryGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); + message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3988,139 +9616,122 @@ }; /** - * Decodes an EntryGroup message from the specified reader or buffer, length delimited. + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup + * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntryGroup.decodeDelimited = function decodeDelimited(reader) { + CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntryGroup message. + * Verifies a CreateTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntryGroup.verify = function verify(message) { + CreateTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) { - var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.dataCatalogTimestamps); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tag); if (error) - return "dataCatalogTimestamps." + error; + return "tag." + error; } return null; }; /** - * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup + * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest */ - EntryGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.EntryGroup) + CreateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.EntryGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.dataCatalogTimestamps != null) { - if (typeof object.dataCatalogTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.EntryGroup.dataCatalogTimestamps: object expected"); - message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.dataCatalogTimestamps); + var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagRequest.tag: object expected"); + message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tag); } return message; }; /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} message EntryGroup + * @param {google.cloud.datacatalog.v1beta1.CreateTagRequest} message CreateTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntryGroup.toObject = function toObject(message, options) { + CreateTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.dataCatalogTimestamps = null; + object.parent = ""; + object.tag = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) - object.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.dataCatalogTimestamps, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tag, options); return object; }; /** - * Converts this EntryGroup to JSON. + * Converts this CreateTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup + * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest * @instance * @returns {Object.} JSON object */ - EntryGroup.prototype.toJSON = function toJSON() { + CreateTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EntryGroup; + return CreateTagRequest; })(); - v1beta1.CreateTagTemplateRequest = (function() { + v1beta1.UpdateTagRequest = (function() { /** - * Properties of a CreateTagTemplateRequest. + * Properties of an UpdateTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTagTemplateRequest - * @property {string|null} [parent] CreateTagTemplateRequest parent - * @property {string|null} [tagTemplateId] CreateTagTemplateRequest tagTemplateId - * @property {google.cloud.datacatalog.v1beta1.ITagTemplate|null} [tagTemplate] CreateTagTemplateRequest tagTemplate + * @interface IUpdateTagRequest + * @property {google.cloud.datacatalog.v1beta1.ITag|null} [tag] UpdateTagRequest tag + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask */ /** - * Constructs a new CreateTagTemplateRequest. + * Constructs a new UpdateTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTagTemplateRequest. - * @implements ICreateTagTemplateRequest + * @classdesc Represents an UpdateTagRequest. + * @implements IUpdateTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest=} [properties] Properties to set */ - function CreateTagTemplateRequest(properties) { + function UpdateTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4128,101 +9739,88 @@ } /** - * CreateTagTemplateRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.parent = ""; - - /** - * CreateTagTemplateRequest tagTemplateId. - * @member {string} tagTemplateId - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * UpdateTagRequest tag. + * @member {google.cloud.datacatalog.v1beta1.ITag|null|undefined} tag + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @instance */ - CreateTagTemplateRequest.prototype.tagTemplateId = ""; + UpdateTagRequest.prototype.tag = null; /** - * CreateTagTemplateRequest tagTemplate. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplate|null|undefined} tagTemplate - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * UpdateTagRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @instance */ - CreateTagTemplateRequest.prototype.tagTemplate = null; + UpdateTagRequest.prototype.updateMask = null; /** - * Creates a new CreateTagTemplateRequest instance using the specified properties. + * Creates a new UpdateTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest instance */ - CreateTagTemplateRequest.create = function create(properties) { - return new CreateTagTemplateRequest(properties); + UpdateTagRequest.create = function create(properties) { + return new UpdateTagRequest(properties); }; /** - * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTagTemplateRequest.encode = function encode(message, writer) { + UpdateTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - $root.google.cloud.datacatalog.v1beta1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagTemplateId); + if (message.tag != null && message.hasOwnProperty("tag")) + $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. + * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. + * Decodes an UpdateTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTagTemplateRequest.decode = function decode(reader, length) { + UpdateTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 3: - message.tagTemplateId = reader.string(); + message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32()); break; case 2: - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4233,129 +9831,126 @@ }; /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTagTemplateRequest message. + * Verifies an UpdateTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTagTemplateRequest.verify = function verify(message) { + UpdateTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - if (!$util.isString(message.tagTemplateId)) - return "tagTemplateId: string expected"; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplate.verify(message.tagTemplate); + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tag); if (error) - return "tagTemplate." + error; + return "tag." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest */ - CreateTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest) + UpdateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplateId != null) - message.tagTemplateId = String(object.tagTemplateId); - if (object.tagTemplate != null) { - if (typeof object.tagTemplate !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.tagTemplate: object expected"); - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.fromObject(object.tagTemplate); + var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest(); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagRequest.tag: object expected"); + message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tag); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} message CreateTagTemplateRequest + * @param {google.cloud.datacatalog.v1beta1.UpdateTagRequest} message UpdateTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTagTemplateRequest.toObject = function toObject(message, options) { + UpdateTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.tagTemplate = null; - object.tagTemplateId = ""; + object.tag = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.toObject(message.tagTemplate, options); - if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - object.tagTemplateId = message.tagTemplateId; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tag, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this CreateTagTemplateRequest to JSON. + * Converts this UpdateTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest * @instance * @returns {Object.} JSON object */ - CreateTagTemplateRequest.prototype.toJSON = function toJSON() { + UpdateTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTagTemplateRequest; + return UpdateTagRequest; })(); - v1beta1.GetTagTemplateRequest = (function() { + v1beta1.DeleteTagRequest = (function() { /** - * Properties of a GetTagTemplateRequest. + * Properties of a DeleteTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetTagTemplateRequest - * @property {string|null} [name] GetTagTemplateRequest name + * @interface IDeleteTagRequest + * @property {string|null} [name] DeleteTagRequest name */ /** - * Constructs a new GetTagTemplateRequest. + * Constructs a new DeleteTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetTagTemplateRequest. - * @implements IGetTagTemplateRequest + * @classdesc Represents a DeleteTagRequest. + * @implements IDeleteTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest=} [properties] Properties to set */ - function GetTagTemplateRequest(properties) { + function DeleteTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4363,35 +9958,35 @@ } /** - * GetTagTemplateRequest name. + * DeleteTagRequest name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @instance */ - GetTagTemplateRequest.prototype.name = ""; + DeleteTagRequest.prototype.name = ""; /** - * Creates a new GetTagTemplateRequest instance using the specified properties. + * Creates a new DeleteTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest instance */ - GetTagTemplateRequest.create = function create(properties) { - return new GetTagTemplateRequest(properties); + DeleteTagRequest.create = function create(properties) { + return new DeleteTagRequest(properties); }; /** - * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTagTemplateRequest.encode = function encode(message, writer) { + DeleteTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -4400,33 +9995,33 @@ }; /** - * Encodes the specified GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. + * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer. + * Decodes a DeleteTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTagTemplateRequest.decode = function decode(reader, length) { + DeleteTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4442,30 +10037,30 @@ }; /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTagTemplateRequest message. + * Verifies a DeleteTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTagTemplateRequest.verify = function verify(message) { + DeleteTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -4475,32 +10070,32 @@ }; /** - * Creates a GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest */ - GetTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest) + DeleteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest(); + var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} message GetTagTemplateRequest + * @param {google.cloud.datacatalog.v1beta1.DeleteTagRequest} message DeleteTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTagTemplateRequest.toObject = function toObject(message, options) { + DeleteTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -4512,56 +10107,39 @@ }; /** - * Converts this GetTagTemplateRequest to JSON. + * Converts this DeleteTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest * @instance * @returns {Object.} JSON object */ - GetTagTemplateRequest.prototype.toJSON = function toJSON() { + DeleteTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTagTemplateRequest; - })(); - - /** - * EntryType enum. - * @name google.cloud.datacatalog.v1beta1.EntryType - * @enum {string} - * @property {number} ENTRY_TYPE_UNSPECIFIED=0 ENTRY_TYPE_UNSPECIFIED value - * @property {number} TABLE=2 TABLE value - * @property {number} DATA_STREAM=3 DATA_STREAM value - * @property {number} FILESET=4 FILESET value - */ - v1beta1.EntryType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTRY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "TABLE"] = 2; - values[valuesById[3] = "DATA_STREAM"] = 3; - values[valuesById[4] = "FILESET"] = 4; - return values; + return DeleteTagRequest; })(); - v1beta1.UpdateTagTemplateRequest = (function() { + v1beta1.CreateTagTemplateFieldRequest = (function() { /** - * Properties of an UpdateTagTemplateRequest. + * Properties of a CreateTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTagTemplateRequest - * @property {google.cloud.datacatalog.v1beta1.ITagTemplate|null} [tagTemplate] UpdateTagTemplateRequest tagTemplate - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateRequest updateMask + * @interface ICreateTagTemplateFieldRequest + * @property {string|null} [parent] CreateTagTemplateFieldRequest parent + * @property {string|null} [tagTemplateFieldId] CreateTagTemplateFieldRequest tagTemplateFieldId + * @property {google.cloud.datacatalog.v1beta1.ITagTemplateField|null} [tagTemplateField] CreateTagTemplateFieldRequest tagTemplateField */ /** - * Constructs a new UpdateTagTemplateRequest. + * Constructs a new CreateTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTagTemplateRequest. - * @implements IUpdateTagTemplateRequest + * @classdesc Represents a CreateTagTemplateFieldRequest. + * @implements ICreateTagTemplateFieldRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest=} [properties] Properties to set */ - function UpdateTagTemplateRequest(properties) { + function CreateTagTemplateFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4569,88 +10147,101 @@ } /** - * UpdateTagTemplateRequest tagTemplate. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplate|null|undefined} tagTemplate - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * CreateTagTemplateFieldRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @instance */ - UpdateTagTemplateRequest.prototype.tagTemplate = null; + CreateTagTemplateFieldRequest.prototype.parent = ""; /** - * UpdateTagTemplateRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * CreateTagTemplateFieldRequest tagTemplateFieldId. + * @member {string} tagTemplateFieldId + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @instance */ - UpdateTagTemplateRequest.prototype.updateMask = null; + CreateTagTemplateFieldRequest.prototype.tagTemplateFieldId = ""; + + /** + * CreateTagTemplateFieldRequest tagTemplateField. + * @member {google.cloud.datacatalog.v1beta1.ITagTemplateField|null|undefined} tagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @instance + */ + CreateTagTemplateFieldRequest.prototype.tagTemplateField = null; /** - * Creates a new UpdateTagTemplateRequest instance using the specified properties. + * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest instance */ - UpdateTagTemplateRequest.create = function create(properties) { - return new UpdateTagTemplateRequest(properties); + CreateTagTemplateFieldRequest.create = function create(properties) { + return new CreateTagTemplateFieldRequest(properties); }; /** - * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. + * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTagTemplateRequest.encode = function encode(message, writer) { + CreateTagTemplateFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - $root.google.cloud.datacatalog.v1beta1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagTemplateFieldId); + if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) + $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. + * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. + * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTagTemplateRequest.decode = function decode(reader, length) { + CreateTagTemplateFieldRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.tagTemplateFieldId = reader.string(); + break; + case 3: + message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4661,127 +10252,131 @@ }; /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTagTemplateRequest message. + * Verifies a CreateTagTemplateFieldRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTagTemplateRequest.verify = function verify(message) { + CreateTagTemplateFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplate.verify(message.tagTemplate); - if (error) - return "tagTemplate." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) + if (!$util.isString(message.tagTemplateFieldId)) + return "tagTemplateFieldId: string expected"; + if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { + var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.tagTemplateField); if (error) - return "updateMask." + error; + return "tagTemplateField." + error; } return null; }; /** - * Creates an UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest */ - UpdateTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest) + CreateTagTemplateFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest(); - if (object.tagTemplate != null) { - if (typeof object.tagTemplate !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.tagTemplate: object expected"); - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.fromObject(object.tagTemplate); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tagTemplateFieldId != null) + message.tagTemplateFieldId = String(object.tagTemplateFieldId); + if (object.tagTemplateField != null) { + if (typeof object.tagTemplateField !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.tagTemplateField: object expected"); + message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.tagTemplateField); } return message; }; /** - * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} message UpdateTagTemplateRequest + * @param {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTagTemplateRequest.toObject = function toObject(message, options) { + CreateTagTemplateFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tagTemplate = null; - object.updateMask = null; + object.parent = ""; + object.tagTemplateFieldId = ""; + object.tagTemplateField = null; } - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.toObject(message.tagTemplate, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) + object.tagTemplateFieldId = message.tagTemplateFieldId; + if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) + object.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.tagTemplateField, options); return object; }; /** - * Converts this UpdateTagTemplateRequest to JSON. + * Converts this CreateTagTemplateFieldRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest * @instance * @returns {Object.} JSON object */ - UpdateTagTemplateRequest.prototype.toJSON = function toJSON() { + CreateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateTagTemplateRequest; + return CreateTagTemplateFieldRequest; })(); - v1beta1.DeleteTagTemplateRequest = (function() { + v1beta1.UpdateTagTemplateFieldRequest = (function() { /** - * Properties of a DeleteTagTemplateRequest. + * Properties of an UpdateTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTagTemplateRequest - * @property {string|null} [name] DeleteTagTemplateRequest name - * @property {boolean|null} [force] DeleteTagTemplateRequest force + * @interface IUpdateTagTemplateFieldRequest + * @property {string|null} [name] UpdateTagTemplateFieldRequest name + * @property {google.cloud.datacatalog.v1beta1.ITagTemplateField|null} [tagTemplateField] UpdateTagTemplateFieldRequest tagTemplateField + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateFieldRequest updateMask */ /** - * Constructs a new DeleteTagTemplateRequest. + * Constructs a new UpdateTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTagTemplateRequest. - * @implements IDeleteTagTemplateRequest + * @classdesc Represents an UpdateTagTemplateFieldRequest. + * @implements IUpdateTagTemplateFieldRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set */ - function DeleteTagTemplateRequest(properties) { + function UpdateTagTemplateFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4789,80 +10384,90 @@ } /** - * DeleteTagTemplateRequest name. + * UpdateTagTemplateFieldRequest name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @instance */ - DeleteTagTemplateRequest.prototype.name = ""; + UpdateTagTemplateFieldRequest.prototype.name = ""; /** - * DeleteTagTemplateRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * UpdateTagTemplateFieldRequest tagTemplateField. + * @member {google.cloud.datacatalog.v1beta1.ITagTemplateField|null|undefined} tagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @instance */ - DeleteTagTemplateRequest.prototype.force = false; + UpdateTagTemplateFieldRequest.prototype.tagTemplateField = null; /** - * Creates a new DeleteTagTemplateRequest instance using the specified properties. + * UpdateTagTemplateFieldRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + * @instance + */ + UpdateTagTemplateFieldRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest instance */ - DeleteTagTemplateRequest.create = function create(properties) { - return new DeleteTagTemplateRequest(properties); + UpdateTagTemplateFieldRequest.create = function create(properties) { + return new UpdateTagTemplateFieldRequest(properties); }; /** - * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. + * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTagTemplateRequest.encode = function encode(message, writer) { + UpdateTagTemplateFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && message.hasOwnProperty("force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) + $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. + * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. + * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTagTemplateRequest.decode = function decode(reader, length) { + UpdateTagTemplateFieldRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4870,7 +10475,10 @@ message.name = reader.string(); break; case 2: - message.force = reader.bool(); + message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4881,117 +10489,135 @@ }; /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTagTemplateRequest message. + * Verifies an UpdateTagTemplateFieldRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTagTemplateRequest.verify = function verify(message) { + UpdateTagTemplateFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { + var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.tagTemplateField); + if (error) + return "tagTemplateField." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest + * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest */ - DeleteTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest) + UpdateTagTemplateFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest(); + var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + if (object.tagTemplateField != null) { + if (typeof object.tagTemplateField !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.tagTemplateField: object expected"); + message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.tagTemplateField); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} message DeleteTagTemplateRequest + * @param {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTagTemplateRequest.toObject = function toObject(message, options) { + UpdateTagTemplateFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.force = false; + object.tagTemplateField = null; + object.updateMask = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) + object.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.tagTemplateField, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this DeleteTagTemplateRequest to JSON. + * Converts this UpdateTagTemplateFieldRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest * @instance * @returns {Object.} JSON object */ - DeleteTagTemplateRequest.prototype.toJSON = function toJSON() { + UpdateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTagTemplateRequest; + return UpdateTagTemplateFieldRequest; })(); - v1beta1.CreateTagRequest = (function() { + v1beta1.RenameTagTemplateFieldRequest = (function() { /** - * Properties of a CreateTagRequest. + * Properties of a RenameTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTagRequest - * @property {string|null} [parent] CreateTagRequest parent - * @property {google.cloud.datacatalog.v1beta1.ITag|null} [tag] CreateTagRequest tag + * @interface IRenameTagTemplateFieldRequest + * @property {string|null} [name] RenameTagTemplateFieldRequest name + * @property {string|null} [newTagTemplateFieldId] RenameTagTemplateFieldRequest newTagTemplateFieldId */ /** - * Constructs a new CreateTagRequest. + * Constructs a new RenameTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTagRequest. - * @implements ICreateTagRequest + * @classdesc Represents a RenameTagTemplateFieldRequest. + * @implements IRenameTagTemplateFieldRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest=} [properties] Properties to set */ - function CreateTagRequest(properties) { + function RenameTagTemplateFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4999,88 +10625,88 @@ } /** - * CreateTagRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * RenameTagTemplateFieldRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @instance */ - CreateTagRequest.prototype.parent = ""; + RenameTagTemplateFieldRequest.prototype.name = ""; /** - * CreateTagRequest tag. - * @member {google.cloud.datacatalog.v1beta1.ITag|null|undefined} tag - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * RenameTagTemplateFieldRequest newTagTemplateFieldId. + * @member {string} newTagTemplateFieldId + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @instance */ - CreateTagRequest.prototype.tag = null; + RenameTagTemplateFieldRequest.prototype.newTagTemplateFieldId = ""; /** - * Creates a new CreateTagRequest instance using the specified properties. + * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest instance + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest instance */ - CreateTagRequest.create = function create(properties) { - return new CreateTagRequest(properties); + RenameTagTemplateFieldRequest.create = function create(properties) { + return new RenameTagTemplateFieldRequest(properties); }; /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. + * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} message CreateTagRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTagRequest.encode = function encode(message, writer) { + RenameTagTemplateFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.tag != null && message.hasOwnProperty("tag")) - $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.newTagTemplateFieldId); return writer; }; /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. + * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} message CreateTagRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + RenameTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTagRequest message from the specified reader or buffer. + * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest + * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTagRequest.decode = function decode(reader, length) { + RenameTagTemplateFieldRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32()); + message.newTagTemplateFieldId = reader.string(); break; default: reader.skipType(tag & 7); @@ -5091,122 +10717,117 @@ }; /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest + * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { + RenameTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTagRequest message. + * Verifies a RenameTagTemplateFieldRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTagRequest.verify = function verify(message) { + RenameTagTemplateFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tag); - if (error) - return "tag." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) + if (!$util.isString(message.newTagTemplateFieldId)) + return "newTagTemplateFieldId: string expected"; return null; }; /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest + * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest */ - CreateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagRequest) + RenameTagTemplateFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagRequest.tag: object expected"); - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tag); - } + var message = new $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.newTagTemplateFieldId != null) + message.newTagTemplateFieldId = String(object.newTagTemplateFieldId); return message; }; /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTagRequest} message CreateTagRequest + * @param {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTagRequest.toObject = function toObject(message, options) { + RenameTagTemplateFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.tag = null; + object.name = ""; + object.newTagTemplateFieldId = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tag, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) + object.newTagTemplateFieldId = message.newTagTemplateFieldId; return object; }; /** - * Converts this CreateTagRequest to JSON. + * Converts this RenameTagTemplateFieldRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest * @instance * @returns {Object.} JSON object */ - CreateTagRequest.prototype.toJSON = function toJSON() { + RenameTagTemplateFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTagRequest; + return RenameTagTemplateFieldRequest; })(); - v1beta1.UpdateTagRequest = (function() { + v1beta1.DeleteTagTemplateFieldRequest = (function() { /** - * Properties of an UpdateTagRequest. + * Properties of a DeleteTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTagRequest - * @property {google.cloud.datacatalog.v1beta1.ITag|null} [tag] UpdateTagRequest tag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask + * @interface IDeleteTagTemplateFieldRequest + * @property {string|null} [name] DeleteTagTemplateFieldRequest name + * @property {boolean|null} [force] DeleteTagTemplateFieldRequest force */ /** - * Constructs a new UpdateTagRequest. + * Constructs a new DeleteTagTemplateFieldRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTagRequest. - * @implements IUpdateTagRequest + * @classdesc Represents a DeleteTagTemplateFieldRequest. + * @implements IDeleteTagTemplateFieldRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set */ - function UpdateTagRequest(properties) { + function DeleteTagTemplateFieldRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5214,88 +10835,88 @@ } /** - * UpdateTagRequest tag. - * @member {google.cloud.datacatalog.v1beta1.ITag|null|undefined} tag - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * DeleteTagTemplateFieldRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @instance */ - UpdateTagRequest.prototype.tag = null; + DeleteTagTemplateFieldRequest.prototype.name = ""; - /** - * UpdateTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + /** + * DeleteTagTemplateFieldRequest force. + * @member {boolean} force + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @instance */ - UpdateTagRequest.prototype.updateMask = null; + DeleteTagTemplateFieldRequest.prototype.force = false; /** - * Creates a new UpdateTagRequest instance using the specified properties. + * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest instance */ - UpdateTagRequest.create = function create(properties) { - return new UpdateTagRequest(properties); + DeleteTagTemplateFieldRequest.create = function create(properties) { + return new DeleteTagTemplateFieldRequest(properties); }; /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. + * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTagRequest.encode = function encode(message, writer) { + DeleteTagTemplateFieldRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tag != null && message.hasOwnProperty("tag")) - $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && message.hasOwnProperty("force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. + * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. + * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTagRequest.decode = function decode(reader, length) { + DeleteTagTemplateFieldRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -5306,126 +10927,118 @@ }; /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTagRequest message. + * Verifies a DeleteTagTemplateFieldRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTagRequest.verify = function verify(message) { + DeleteTagTemplateFieldRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tag); - if (error) - return "tag." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest + * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest */ - UpdateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest) + DeleteTagTemplateFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest(); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagRequest.tag: object expected"); - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTagRequest} message UpdateTagRequest + * @param {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTagRequest.toObject = function toObject(message, options) { + DeleteTagTemplateFieldRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tag = null; - object.updateMask = null; + object.name = ""; + object.force = false; } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tag, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this UpdateTagRequest to JSON. + * Converts this DeleteTagTemplateFieldRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest + * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest * @instance * @returns {Object.} JSON object */ - UpdateTagRequest.prototype.toJSON = function toJSON() { + DeleteTagTemplateFieldRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateTagRequest; + return DeleteTagTemplateFieldRequest; })(); - v1beta1.DeleteTagRequest = (function() { + v1beta1.ListTagsRequest = (function() { /** - * Properties of a DeleteTagRequest. + * Properties of a ListTagsRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTagRequest - * @property {string|null} [name] DeleteTagRequest name + * @interface IListTagsRequest + * @property {string|null} [parent] ListTagsRequest parent + * @property {number|null} [pageSize] ListTagsRequest pageSize + * @property {string|null} [pageToken] ListTagsRequest pageToken */ /** - * Constructs a new DeleteTagRequest. + * Constructs a new ListTagsRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTagRequest. - * @implements IDeleteTagRequest + * @classdesc Represents a ListTagsRequest. + * @implements IListTagsRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest=} [properties] Properties to set */ - function DeleteTagRequest(properties) { + function ListTagsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5433,75 +11046,101 @@ } /** - * DeleteTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * ListTagsRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @instance */ - DeleteTagRequest.prototype.name = ""; + ListTagsRequest.prototype.parent = ""; /** - * Creates a new DeleteTagRequest instance using the specified properties. + * ListTagsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageSize = 0; + + /** + * ListTagsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTagsRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest instance + * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest instance */ - DeleteTagRequest.create = function create(properties) { - return new DeleteTagRequest(properties); + ListTagsRequest.create = function create(properties) { + return new ListTagsRequest(properties); }; /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} message ListTagsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTagRequest.encode = function encode(message, writer) { + ListTagsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} message ListTagsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. + * Decodes a ListTagsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest + * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTagRequest.decode = function decode(reader, length) { + ListTagsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTagsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5512,109 +11151,126 @@ }; /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest + * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { + ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTagRequest message. + * Verifies a ListTagsRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTagRequest.verify = function verify(message) { + ListTagsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest + * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest */ - DeleteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest) + ListTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTagsRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.datacatalog.v1beta1.ListTagsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTagRequest} message DeleteTagRequest + * @param {google.cloud.datacatalog.v1beta1.ListTagsRequest} message ListTagsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTagRequest.toObject = function toObject(message, options) { + ListTagsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this DeleteTagRequest to JSON. + * Converts this ListTagsRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest * @instance * @returns {Object.} JSON object */ - DeleteTagRequest.prototype.toJSON = function toJSON() { + ListTagsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTagRequest; + return ListTagsRequest; })(); - v1beta1.CreateTagTemplateFieldRequest = (function() { + v1beta1.ListTagsResponse = (function() { /** - * Properties of a CreateTagTemplateFieldRequest. + * Properties of a ListTagsResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTagTemplateFieldRequest - * @property {string|null} [parent] CreateTagTemplateFieldRequest parent - * @property {string|null} [tagTemplateFieldId] CreateTagTemplateFieldRequest tagTemplateFieldId - * @property {google.cloud.datacatalog.v1beta1.ITagTemplateField|null} [tagTemplateField] CreateTagTemplateFieldRequest tagTemplateField + * @interface IListTagsResponse + * @property {Array.|null} [tags] ListTagsResponse tags + * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken */ /** - * Constructs a new CreateTagTemplateFieldRequest. + * Constructs a new ListTagsResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTagTemplateFieldRequest. - * @implements ICreateTagTemplateFieldRequest + * @classdesc Represents a ListTagsResponse. + * @implements IListTagsResponse * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse=} [properties] Properties to set */ - function CreateTagTemplateFieldRequest(properties) { + function ListTagsResponse(properties) { + this.tags = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5622,101 +11278,91 @@ } /** - * CreateTagTemplateFieldRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.parent = ""; - - /** - * CreateTagTemplateFieldRequest tagTemplateFieldId. - * @member {string} tagTemplateFieldId - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * ListTagsResponse tags. + * @member {Array.} tags + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @instance */ - CreateTagTemplateFieldRequest.prototype.tagTemplateFieldId = ""; + ListTagsResponse.prototype.tags = $util.emptyArray; /** - * CreateTagTemplateFieldRequest tagTemplateField. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplateField|null|undefined} tagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * ListTagsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @instance */ - CreateTagTemplateFieldRequest.prototype.tagTemplateField = null; + ListTagsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. + * Creates a new ListTagsResponse instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest instance + * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse instance */ - CreateTagTemplateFieldRequest.create = function create(properties) { - return new CreateTagTemplateFieldRequest(properties); + ListTagsResponse.create = function create(properties) { + return new ListTagsResponse(properties); }; /** - * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse} message ListTagsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTagTemplateFieldRequest.encode = function encode(message, writer) { + ListTagsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagTemplateFieldId); - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. + * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse} message ListTagsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. + * Decodes a ListTagsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest + * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTagTemplateFieldRequest.decode = function decode(reader, length) { + ListTagsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTagsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32())); break; case 2: - message.tagTemplateFieldId = reader.string(); - break; - case 3: - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5727,582 +11373,601 @@ }; /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest + * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { + ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTagTemplateFieldRequest message. + * Verifies a ListTagsResponse message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTagTemplateFieldRequest.verify = function verify(message) { + ListTagsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - if (!$util.isString(message.tagTemplateFieldId)) - return "tagTemplateFieldId: string expected"; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.tagTemplateField); - if (error) - return "tagTemplateField." + error; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tags[i]); + if (error) + return "tags." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest + * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse */ - CreateTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest) + ListTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTagsResponse) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplateFieldId != null) - message.tagTemplateFieldId = String(object.tagTemplateFieldId); - if (object.tagTemplateField != null) { - if (typeof object.tagTemplateField !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.tagTemplateField: object expected"); - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.tagTemplateField); + var message = new $root.google.cloud.datacatalog.v1beta1.ListTagsResponse(); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ListTagsResponse.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ListTagsResponse.tags: object expected"); + message.tags[i] = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tags[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest + * @param {google.cloud.datacatalog.v1beta1.ListTagsResponse} message ListTagsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTagTemplateFieldRequest.toObject = function toObject(message, options) { + ListTagsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.tagTemplateFieldId = ""; - object.tagTemplateField = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - object.tagTemplateFieldId = message.tagTemplateFieldId; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - object.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.tagTemplateField, options); + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tags[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateTagTemplateFieldRequest to JSON. + * Converts this ListTagsResponse to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse * @instance * @returns {Object.} JSON object */ - CreateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { + ListTagsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTagTemplateFieldRequest; + return ListTagsResponse; })(); - v1beta1.UpdateTagTemplateFieldRequest = (function() { + v1beta1.PolicyTagManager = (function() { /** - * Properties of an UpdateTagTemplateFieldRequest. + * Constructs a new PolicyTagManager service. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTagTemplateFieldRequest - * @property {string|null} [name] UpdateTagTemplateFieldRequest name - * @property {google.cloud.datacatalog.v1beta1.ITagTemplateField|null} [tagTemplateField] UpdateTagTemplateFieldRequest tagTemplateField - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateFieldRequest updateMask + * @classdesc Represents a PolicyTagManager + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function PolicyTagManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PolicyTagManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PolicyTagManager; /** - * Constructs a new UpdateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTagTemplateFieldRequest. - * @implements IUpdateTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set + * Creates new PolicyTagManager service using the specified rpc implementation. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {PolicyTagManager} RPC service. Useful where requests and/or responses are streamed. */ - function UpdateTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + PolicyTagManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * UpdateTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#createTaxonomy}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef CreateTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Taxonomy} [response] Taxonomy + */ + + /** + * Calls CreateTaxonomy. + * @function createTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} request CreateTaxonomyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy + * @returns {undefined} + * @variation 1 */ - UpdateTagTemplateFieldRequest.prototype.name = ""; + Object.defineProperty(PolicyTagManager.prototype.createTaxonomy = function createTaxonomy(request, callback) { + return this.rpcCall(createTaxonomy, $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest, $root.google.cloud.datacatalog.v1beta1.Taxonomy, request, callback); + }, "name", { value: "CreateTaxonomy" }); /** - * UpdateTagTemplateFieldRequest tagTemplateField. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplateField|null|undefined} tagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + * Calls CreateTaxonomy. + * @function createTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} request CreateTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagTemplateFieldRequest.prototype.tagTemplateField = null; /** - * UpdateTagTemplateFieldRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#deleteTaxonomy}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef DeleteTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTaxonomy. + * @function deleteTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} request DeleteTaxonomyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomyCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - UpdateTagTemplateFieldRequest.prototype.updateMask = null; + Object.defineProperty(PolicyTagManager.prototype.deleteTaxonomy = function deleteTaxonomy(request, callback) { + return this.rpcCall(deleteTaxonomy, $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTaxonomy" }); /** - * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest instance + * Calls DeleteTaxonomy. + * @function deleteTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} request DeleteTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagTemplateFieldRequest.create = function create(properties) { - return new UpdateTagTemplateFieldRequest(properties); - }; /** - * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#updateTaxonomy}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef UpdateTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Taxonomy} [response] Taxonomy */ - UpdateTagTemplateFieldRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateTaxonomy. + * @function updateTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} request UpdateTaxonomyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy + * @returns {undefined} + * @variation 1 */ - UpdateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(PolicyTagManager.prototype.updateTaxonomy = function updateTaxonomy(request, callback) { + return this.rpcCall(updateTaxonomy, $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest, $root.google.cloud.datacatalog.v1beta1.Taxonomy, request, callback); + }, "name", { value: "UpdateTaxonomy" }); /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateTaxonomy. + * @function updateTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} request UpdateTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#listTaxonomies}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef ListTaxonomiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} [response] ListTaxonomiesResponse */ - UpdateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an UpdateTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListTaxonomies. + * @function listTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} request ListTaxonomiesRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomiesCallback} callback Node-style callback called with the error, if any, and ListTaxonomiesResponse + * @returns {undefined} + * @variation 1 */ - UpdateTagTemplateFieldRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.tagTemplateField); - if (error) - return "tagTemplateField." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + Object.defineProperty(PolicyTagManager.prototype.listTaxonomies = function listTaxonomies(request, callback) { + return this.rpcCall(listTaxonomies, $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest, $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse, request, callback); + }, "name", { value: "ListTaxonomies" }); /** - * Creates an UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest + * Calls ListTaxonomies. + * @function listTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} request ListTaxonomiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#getTaxonomy}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef GetTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.Taxonomy} [response] Taxonomy + */ + + /** + * Calls GetTaxonomy. + * @function getTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} request GetTaxonomyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PolicyTagManager.prototype.getTaxonomy = function getTaxonomy(request, callback) { + return this.rpcCall(getTaxonomy, $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest, $root.google.cloud.datacatalog.v1beta1.Taxonomy, request, callback); + }, "name", { value: "GetTaxonomy" }); + + /** + * Calls GetTaxonomy. + * @function getTaxonomy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} request GetTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#createPolicyTag}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef CreatePolicyTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.PolicyTag} [response] PolicyTag + */ + + /** + * Calls CreatePolicyTag. + * @function createPolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} request CreatePolicyTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PolicyTagManager.prototype.createPolicyTag = function createPolicyTag(request, callback) { + return this.rpcCall(createPolicyTag, $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest, $root.google.cloud.datacatalog.v1beta1.PolicyTag, request, callback); + }, "name", { value: "CreatePolicyTag" }); + + /** + * Calls CreatePolicyTag. + * @function createPolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} request CreatePolicyTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#deletePolicyTag}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef DeletePolicyTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePolicyTag. + * @function deletePolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} request DeletePolicyTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTagCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PolicyTagManager.prototype.deletePolicyTag = function deletePolicyTag(request, callback) { + return this.rpcCall(deletePolicyTag, $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePolicyTag" }); + + /** + * Calls DeletePolicyTag. + * @function deletePolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} request DeletePolicyTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#updatePolicyTag}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef UpdatePolicyTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.PolicyTag} [response] PolicyTag */ - UpdateTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.tagTemplateField != null) { - if (typeof object.tagTemplateField !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.tagTemplateField: object expected"); - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.tagTemplateField); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; /** - * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdatePolicyTag. + * @function updatePolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} request UpdatePolicyTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag + * @returns {undefined} + * @variation 1 */ - UpdateTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.tagTemplateField = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - object.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.tagTemplateField, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + Object.defineProperty(PolicyTagManager.prototype.updatePolicyTag = function updatePolicyTag(request, callback) { + return this.rpcCall(updatePolicyTag, $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest, $root.google.cloud.datacatalog.v1beta1.PolicyTag, request, callback); + }, "name", { value: "UpdatePolicyTag" }); /** - * Converts this UpdateTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + * Calls UpdatePolicyTag. + * @function updatePolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance - * @returns {Object.} JSON object + * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} request UpdatePolicyTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return UpdateTagTemplateFieldRequest; - })(); + /** + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#listPolicyTags}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef ListPolicyTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} [response] ListPolicyTagsResponse + */ - v1beta1.RenameTagTemplateFieldRequest = (function() { + /** + * Calls ListPolicyTags. + * @function listPolicyTags + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} request ListPolicyTagsRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTagsCallback} callback Node-style callback called with the error, if any, and ListPolicyTagsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PolicyTagManager.prototype.listPolicyTags = function listPolicyTags(request, callback) { + return this.rpcCall(listPolicyTags, $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest, $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse, request, callback); + }, "name", { value: "ListPolicyTags" }); /** - * Properties of a RenameTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IRenameTagTemplateFieldRequest - * @property {string|null} [name] RenameTagTemplateFieldRequest name - * @property {string|null} [newTagTemplateFieldId] RenameTagTemplateFieldRequest newTagTemplateFieldId + * Calls ListPolicyTags. + * @function listPolicyTags + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} request ListPolicyTagsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new RenameTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a RenameTagTemplateFieldRequest. - * @implements IRenameTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#getPolicyTag}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef GetPolicyTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.PolicyTag} [response] PolicyTag */ - function RenameTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * RenameTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest + * Calls GetPolicyTag. + * @function getPolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} request GetPolicyTagRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag + * @returns {undefined} + * @variation 1 */ - RenameTagTemplateFieldRequest.prototype.name = ""; + Object.defineProperty(PolicyTagManager.prototype.getPolicyTag = function getPolicyTag(request, callback) { + return this.rpcCall(getPolicyTag, $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest, $root.google.cloud.datacatalog.v1beta1.PolicyTag, request, callback); + }, "name", { value: "GetPolicyTag" }); /** - * RenameTagTemplateFieldRequest newTagTemplateFieldId. - * @member {string} newTagTemplateFieldId - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest + * Calls GetPolicyTag. + * @function getPolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance + * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} request GetPolicyTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RenameTagTemplateFieldRequest.prototype.newTagTemplateFieldId = ""; /** - * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest instance + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#getIamPolicy}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - RenameTagTemplateFieldRequest.create = function create(properties) { - return new RenameTagTemplateFieldRequest(properties); - }; /** - * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - RenameTagTemplateFieldRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.newTagTemplateFieldId); - return writer; - }; + Object.defineProperty(PolicyTagManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); /** - * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RenameTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#setIamPolicy}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - RenameTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.newTagTemplateFieldId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - RenameTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(PolicyTagManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); /** - * Verifies a RenameTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RenameTagTemplateFieldRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - if (!$util.isString(message.newTagTemplateFieldId)) - return "newTagTemplateFieldId: string expected"; - return null; - }; /** - * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager#testIamPermissions}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse */ - RenameTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.newTagTemplateFieldId != null) - message.newTagTemplateFieldId = String(object.newTagTemplateFieldId); - return message; - }; /** - * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - RenameTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.newTagTemplateFieldId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - object.newTagTemplateFieldId = message.newTagTemplateFieldId; - return object; - }; + Object.defineProperty(PolicyTagManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * Converts this RenameTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager * @instance - * @returns {Object.} JSON object + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RenameTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return RenameTagTemplateFieldRequest; + return PolicyTagManager; })(); - v1beta1.DeleteTagTemplateFieldRequest = (function() { + v1beta1.Taxonomy = (function() { /** - * Properties of a DeleteTagTemplateFieldRequest. + * Properties of a Taxonomy. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTagTemplateFieldRequest - * @property {string|null} [name] DeleteTagTemplateFieldRequest name - * @property {boolean|null} [force] DeleteTagTemplateFieldRequest force + * @interface ITaxonomy + * @property {string|null} [name] Taxonomy name + * @property {string|null} [displayName] Taxonomy displayName + * @property {string|null} [description] Taxonomy description + * @property {Array.|null} [activatedPolicyTypes] Taxonomy activatedPolicyTypes */ /** - * Constructs a new DeleteTagTemplateFieldRequest. + * Constructs a new Taxonomy. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTagTemplateFieldRequest. - * @implements IDeleteTagTemplateFieldRequest + * @classdesc Represents a Taxonomy. + * @implements ITaxonomy * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ITaxonomy=} [properties] Properties to set */ - function DeleteTagTemplateFieldRequest(properties) { + function Taxonomy(properties) { + this.activatedPolicyTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6310,80 +11975,104 @@ } /** - * DeleteTagTemplateFieldRequest name. + * Taxonomy name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @instance */ - DeleteTagTemplateFieldRequest.prototype.name = ""; + Taxonomy.prototype.name = ""; /** - * DeleteTagTemplateFieldRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * Taxonomy displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @instance */ - DeleteTagTemplateFieldRequest.prototype.force = false; + Taxonomy.prototype.displayName = ""; /** - * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. + * Taxonomy description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @instance + */ + Taxonomy.prototype.description = ""; + + /** + * Taxonomy activatedPolicyTypes. + * @member {Array.} activatedPolicyTypes + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy + * @instance + */ + Taxonomy.prototype.activatedPolicyTypes = $util.emptyArray; + + /** + * Creates a new Taxonomy instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest instance + * @param {google.cloud.datacatalog.v1beta1.ITaxonomy=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy instance */ - DeleteTagTemplateFieldRequest.create = function create(properties) { - return new DeleteTagTemplateFieldRequest(properties); + Taxonomy.create = function create(properties) { + return new Taxonomy(properties); }; /** - * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. + * Encodes the specified Taxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ITaxonomy} message Taxonomy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTagTemplateFieldRequest.encode = function encode(message, writer) { + Taxonomy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && message.hasOwnProperty("force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.activatedPolicyTypes != null && message.activatedPolicyTypes.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.activatedPolicyTypes.length; ++i) + writer.int32(message.activatedPolicyTypes[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. + * Encodes the specified Taxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ITaxonomy} message Taxonomy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { + Taxonomy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. + * Decodes a Taxonomy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTagTemplateFieldRequest.decode = function decode(reader, length) { + Taxonomy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Taxonomy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6391,7 +12080,20 @@ message.name = reader.string(); break; case 2: - message.force = reader.bool(); + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 6: + if (!(message.activatedPolicyTypes && message.activatedPolicyTypes.length)) + message.activatedPolicyTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.activatedPolicyTypes.push(reader.int32()); + } else + message.activatedPolicyTypes.push(reader.int32()); break; default: reader.skipType(tag & 7); @@ -6402,118 +12104,179 @@ }; /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. + * Decodes a Taxonomy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { + Taxonomy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTagTemplateFieldRequest message. + * Verifies a Taxonomy message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTagTemplateFieldRequest.verify = function verify(message) { + Taxonomy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.activatedPolicyTypes != null && message.hasOwnProperty("activatedPolicyTypes")) { + if (!Array.isArray(message.activatedPolicyTypes)) + return "activatedPolicyTypes: array expected"; + for (var i = 0; i < message.activatedPolicyTypes.length; ++i) + switch (message.activatedPolicyTypes[i]) { + default: + return "activatedPolicyTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; /** - * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Taxonomy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest + * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy */ - DeleteTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest) + Taxonomy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.Taxonomy) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest(); + var message = new $root.google.cloud.datacatalog.v1beta1.Taxonomy(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.activatedPolicyTypes) { + if (!Array.isArray(object.activatedPolicyTypes)) + throw TypeError(".google.cloud.datacatalog.v1beta1.Taxonomy.activatedPolicyTypes: array expected"); + message.activatedPolicyTypes = []; + for (var i = 0; i < object.activatedPolicyTypes.length; ++i) + switch (object.activatedPolicyTypes[i]) { + default: + case "POLICY_TYPE_UNSPECIFIED": + case 0: + message.activatedPolicyTypes[i] = 0; + break; + case "FINE_GRAINED_ACCESS_CONTROL": + case 1: + message.activatedPolicyTypes[i] = 1; + break; + } + } return message; }; /** - * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. + * Creates a plain object from a Taxonomy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest + * @param {google.cloud.datacatalog.v1beta1.Taxonomy} message Taxonomy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTagTemplateFieldRequest.toObject = function toObject(message, options) { + Taxonomy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.activatedPolicyTypes = []; if (options.defaults) { object.name = ""; - object.force = false; + object.displayName = ""; + object.description = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.activatedPolicyTypes && message.activatedPolicyTypes.length) { + object.activatedPolicyTypes = []; + for (var j = 0; j < message.activatedPolicyTypes.length; ++j) + object.activatedPolicyTypes[j] = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] : message.activatedPolicyTypes[j]; + } return object; }; /** - * Converts this DeleteTagTemplateFieldRequest to JSON. + * Converts this Taxonomy to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + * @memberof google.cloud.datacatalog.v1beta1.Taxonomy * @instance * @returns {Object.} JSON object */ - DeleteTagTemplateFieldRequest.prototype.toJSON = function toJSON() { + Taxonomy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTagTemplateFieldRequest; + /** + * PolicyType enum. + * @name google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType + * @enum {string} + * @property {number} POLICY_TYPE_UNSPECIFIED=0 POLICY_TYPE_UNSPECIFIED value + * @property {number} FINE_GRAINED_ACCESS_CONTROL=1 FINE_GRAINED_ACCESS_CONTROL value + */ + Taxonomy.PolicyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "POLICY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FINE_GRAINED_ACCESS_CONTROL"] = 1; + return values; + })(); + + return Taxonomy; })(); - v1beta1.ListTagsRequest = (function() { + v1beta1.PolicyTag = (function() { /** - * Properties of a ListTagsRequest. + * Properties of a PolicyTag. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListTagsRequest - * @property {string|null} [parent] ListTagsRequest parent - * @property {number|null} [pageSize] ListTagsRequest pageSize - * @property {string|null} [pageToken] ListTagsRequest pageToken + * @interface IPolicyTag + * @property {string|null} [name] PolicyTag name + * @property {string|null} [displayName] PolicyTag displayName + * @property {string|null} [description] PolicyTag description + * @property {string|null} [parentPolicyTag] PolicyTag parentPolicyTag + * @property {Array.|null} [childPolicyTags] PolicyTag childPolicyTags */ /** - * Constructs a new ListTagsRequest. + * Constructs a new PolicyTag. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListTagsRequest. - * @implements IListTagsRequest + * @classdesc Represents a PolicyTag. + * @implements IPolicyTag * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IPolicyTag=} [properties] Properties to set */ - function ListTagsRequest(properties) { + function PolicyTag(properties) { + this.childPolicyTags = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6521,101 +12284,130 @@ } /** - * ListTagsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * PolicyTag name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @instance */ - ListTagsRequest.prototype.parent = ""; + PolicyTag.prototype.name = ""; /** - * ListTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * PolicyTag displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @instance */ - ListTagsRequest.prototype.pageSize = 0; + PolicyTag.prototype.displayName = ""; /** - * ListTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * PolicyTag description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @instance */ - ListTagsRequest.prototype.pageToken = ""; + PolicyTag.prototype.description = ""; /** - * Creates a new ListTagsRequest instance using the specified properties. + * PolicyTag parentPolicyTag. + * @member {string} parentPolicyTag + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag + * @instance + */ + PolicyTag.prototype.parentPolicyTag = ""; + + /** + * PolicyTag childPolicyTags. + * @member {Array.} childPolicyTags + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag + * @instance + */ + PolicyTag.prototype.childPolicyTags = $util.emptyArray; + + /** + * Creates a new PolicyTag instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest instance + * @param {google.cloud.datacatalog.v1beta1.IPolicyTag=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag instance */ - ListTagsRequest.create = function create(properties) { - return new ListTagsRequest(properties); + PolicyTag.create = function create(properties) { + return new PolicyTag(properties); }; /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. + * Encodes the specified PolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IPolicyTag} message PolicyTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTagsRequest.encode = function encode(message, writer) { + PolicyTag.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentPolicyTag); + if (message.childPolicyTags != null && message.childPolicyTags.length) + for (var i = 0; i < message.childPolicyTags.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.childPolicyTags[i]); return writer; }; /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. + * Encodes the specified PolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IPolicyTag} message PolicyTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + PolicyTag.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTagsRequest message from the specified reader or buffer. + * Decodes a PolicyTag message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest + * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTagsRequest.decode = function decode(reader, length) { + PolicyTag.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTagsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.PolicyTag(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.displayName = reader.string(); break; case 3: - message.pageToken = reader.string(); + message.description = reader.string(); + break; + case 4: + message.parentPolicyTag = reader.string(); + break; + case 5: + if (!(message.childPolicyTags && message.childPolicyTags.length)) + message.childPolicyTags = []; + message.childPolicyTags.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -6626,126 +12418,154 @@ }; /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * Decodes a PolicyTag message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest + * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { + PolicyTag.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTagsRequest message. + * Verifies a PolicyTag message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTagsRequest.verify = function verify(message) { + PolicyTag.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) + if (!$util.isString(message.parentPolicyTag)) + return "parentPolicyTag: string expected"; + if (message.childPolicyTags != null && message.hasOwnProperty("childPolicyTags")) { + if (!Array.isArray(message.childPolicyTags)) + return "childPolicyTags: array expected"; + for (var i = 0; i < message.childPolicyTags.length; ++i) + if (!$util.isString(message.childPolicyTags[i])) + return "childPolicyTags: string[] expected"; + } return null; }; /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PolicyTag message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest + * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag */ - ListTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTagsRequest) + PolicyTag.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.PolicyTag) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListTagsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.datacatalog.v1beta1.PolicyTag(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.parentPolicyTag != null) + message.parentPolicyTag = String(object.parentPolicyTag); + if (object.childPolicyTags) { + if (!Array.isArray(object.childPolicyTags)) + throw TypeError(".google.cloud.datacatalog.v1beta1.PolicyTag.childPolicyTags: array expected"); + message.childPolicyTags = []; + for (var i = 0; i < object.childPolicyTags.length; ++i) + message.childPolicyTags[i] = String(object.childPolicyTags[i]); + } return message; }; /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * Creates a plain object from a PolicyTag message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @static - * @param {google.cloud.datacatalog.v1beta1.ListTagsRequest} message ListTagsRequest + * @param {google.cloud.datacatalog.v1beta1.PolicyTag} message PolicyTag * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTagsRequest.toObject = function toObject(message, options) { + PolicyTag.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.childPolicyTags = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.parentPolicyTag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) + object.parentPolicyTag = message.parentPolicyTag; + if (message.childPolicyTags && message.childPolicyTags.length) { + object.childPolicyTags = []; + for (var j = 0; j < message.childPolicyTags.length; ++j) + object.childPolicyTags[j] = message.childPolicyTags[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this ListTagsRequest to JSON. + * Converts this PolicyTag to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest + * @memberof google.cloud.datacatalog.v1beta1.PolicyTag * @instance * @returns {Object.} JSON object */ - ListTagsRequest.prototype.toJSON = function toJSON() { + PolicyTag.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTagsRequest; + return PolicyTag; })(); - v1beta1.ListTagsResponse = (function() { + v1beta1.CreateTaxonomyRequest = (function() { /** - * Properties of a ListTagsResponse. + * Properties of a CreateTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListTagsResponse - * @property {Array.|null} [tags] ListTagsResponse tags - * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken + * @interface ICreateTaxonomyRequest + * @property {string|null} [parent] CreateTaxonomyRequest parent + * @property {google.cloud.datacatalog.v1beta1.ITaxonomy|null} [taxonomy] CreateTaxonomyRequest taxonomy */ /** - * Constructs a new ListTagsResponse. + * Constructs a new CreateTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListTagsResponse. - * @implements IListTagsResponse + * @classdesc Represents a CreateTaxonomyRequest. + * @implements ICreateTaxonomyRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest=} [properties] Properties to set */ - function ListTagsResponse(properties) { - this.tags = []; + function CreateTaxonomyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6753,91 +12573,88 @@ } /** - * ListTagsResponse tags. - * @member {Array.} tags - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * CreateTaxonomyRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @instance */ - ListTagsResponse.prototype.tags = $util.emptyArray; + CreateTaxonomyRequest.prototype.parent = ""; /** - * ListTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * CreateTaxonomyRequest taxonomy. + * @member {google.cloud.datacatalog.v1beta1.ITaxonomy|null|undefined} taxonomy + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @instance */ - ListTagsResponse.prototype.nextPageToken = ""; + CreateTaxonomyRequest.prototype.taxonomy = null; /** - * Creates a new ListTagsResponse instance using the specified properties. + * Creates a new CreateTaxonomyRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse instance + * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest instance */ - ListTagsResponse.create = function create(properties) { - return new ListTagsResponse(properties); + CreateTaxonomyRequest.create = function create(properties) { + return new CreateTaxonomyRequest(properties); }; /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. + * Encodes the specified CreateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse} message ListTagsResponse message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} message CreateTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTagsResponse.encode = function encode(message, writer) { + CreateTaxonomyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) + $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. + * Encodes the specified CreateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse} message ListTagsResponse message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} message CreateTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTagsResponse message from the specified reader or buffer. + * Decodes a CreateTaxonomyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse + * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTagsResponse.decode = function decode(reader, length) { + CreateTaxonomyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTagsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push($root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6848,136 +12665,121 @@ }; /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateTaxonomyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse + * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTagsResponse message. + * Verifies a CreateTaxonomyRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTagsResponse.verify = function verify(message) { + CreateTaxonomyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tags[i]); - if (error) - return "tags." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) { + var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomy); + if (error) + return "taxonomy." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse + * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest */ - ListTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTagsResponse) + CreateTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListTagsResponse(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ListTagsResponse.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) { - if (typeof object.tags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListTagsResponse.tags: object expected"); - message.tags[i] = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tags[i]); - } + var message = new $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taxonomy != null) { + if (typeof object.taxonomy !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.taxonomy: object expected"); + message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomy); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateTaxonomyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ListTagsResponse} message ListTagsResponse + * @param {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} message CreateTaxonomyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTagsResponse.toObject = function toObject(message, options) { + CreateTaxonomyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tags[j], options); + if (options.defaults) { + object.parent = ""; + object.taxonomy = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) + object.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomy, options); return object; }; /** - * Converts this ListTagsResponse to JSON. + * Converts this CreateTaxonomyRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse + * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest * @instance * @returns {Object.} JSON object */ - ListTagsResponse.prototype.toJSON = function toJSON() { + CreateTaxonomyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTagsResponse; + return CreateTaxonomyRequest; })(); - v1beta1.GcsFilesetSpec = (function() { + v1beta1.DeleteTaxonomyRequest = (function() { /** - * Properties of a GcsFilesetSpec. + * Properties of a DeleteTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGcsFilesetSpec - * @property {Array.|null} [filePatterns] GcsFilesetSpec filePatterns - * @property {Array.|null} [sampleGcsFileSpecs] GcsFilesetSpec sampleGcsFileSpecs + * @interface IDeleteTaxonomyRequest + * @property {string|null} [name] DeleteTaxonomyRequest name */ /** - * Constructs a new GcsFilesetSpec. + * Constructs a new DeleteTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GcsFilesetSpec. - * @implements IGcsFilesetSpec + * @classdesc Represents a DeleteTaxonomyRequest. + * @implements IDeleteTaxonomyRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest=} [properties] Properties to set */ - function GcsFilesetSpec(properties) { - this.filePatterns = []; - this.sampleGcsFileSpecs = []; + function DeleteTaxonomyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6985,94 +12787,75 @@ } /** - * GcsFilesetSpec filePatterns. - * @member {Array.} filePatterns - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @instance - */ - GcsFilesetSpec.prototype.filePatterns = $util.emptyArray; - - /** - * GcsFilesetSpec sampleGcsFileSpecs. - * @member {Array.} sampleGcsFileSpecs - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * DeleteTaxonomyRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @instance */ - GcsFilesetSpec.prototype.sampleGcsFileSpecs = $util.emptyArray; + DeleteTaxonomyRequest.prototype.name = ""; /** - * Creates a new GcsFilesetSpec instance using the specified properties. + * Creates a new DeleteTaxonomyRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec instance + * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest instance */ - GcsFilesetSpec.create = function create(properties) { - return new GcsFilesetSpec(properties); + DeleteTaxonomyRequest.create = function create(properties) { + return new DeleteTaxonomyRequest(properties); }; /** - * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. + * Encodes the specified DeleteTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} message DeleteTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsFilesetSpec.encode = function encode(message, writer) { + DeleteTaxonomyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filePatterns != null && message.filePatterns.length) - for (var i = 0; i < message.filePatterns.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePatterns[i]); - if (message.sampleGcsFileSpecs != null && message.sampleGcsFileSpecs.length) - for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) - $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.encode(message.sampleGcsFileSpecs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. + * Encodes the specified DeleteTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} message DeleteTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsFilesetSpec.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer. + * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec + * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsFilesetSpec.decode = function decode(reader, length) { + DeleteTaxonomyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.filePatterns && message.filePatterns.length)) - message.filePatterns = []; - message.filePatterns.push(reader.string()); - break; - case 2: - if (!(message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length)) - message.sampleGcsFileSpecs = []; - message.sampleGcsFileSpecs.push($root.google.cloud.datacatalog.v1beta1.GcsFileSpec.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -7083,147 +12866,108 @@ }; /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. + * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec + * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsFilesetSpec.decodeDelimited = function decodeDelimited(reader) { + DeleteTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsFilesetSpec message. + * Verifies a DeleteTaxonomyRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFilesetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filePatterns != null && message.hasOwnProperty("filePatterns")) { - if (!Array.isArray(message.filePatterns)) - return "filePatterns: array expected"; - for (var i = 0; i < message.filePatterns.length; ++i) - if (!$util.isString(message.filePatterns[i])) - return "filePatterns: string[] expected"; - } - if (message.sampleGcsFileSpecs != null && message.hasOwnProperty("sampleGcsFileSpecs")) { - if (!Array.isArray(message.sampleGcsFileSpecs)) - return "sampleGcsFileSpecs: array expected"; - for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.verify(message.sampleGcsFileSpecs[i]); - if (error) - return "sampleGcsFileSpecs." + error; - } - } + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTaxonomyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTaxonomyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec + * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest */ - GcsFilesetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec) + DeleteTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec(); - if (object.filePatterns) { - if (!Array.isArray(object.filePatterns)) - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.filePatterns: array expected"); - message.filePatterns = []; - for (var i = 0; i < object.filePatterns.length; ++i) - message.filePatterns[i] = String(object.filePatterns[i]); - } - if (object.sampleGcsFileSpecs) { - if (!Array.isArray(object.sampleGcsFileSpecs)) - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sampleGcsFileSpecs: array expected"); - message.sampleGcsFileSpecs = []; - for (var i = 0; i < object.sampleGcsFileSpecs.length; ++i) { - if (typeof object.sampleGcsFileSpecs[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sampleGcsFileSpecs: object expected"); - message.sampleGcsFileSpecs[i] = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.fromObject(object.sampleGcsFileSpecs[i]); - } - } + var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTaxonomyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} message GcsFilesetSpec + * @param {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} message DeleteTaxonomyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsFilesetSpec.toObject = function toObject(message, options) { + DeleteTaxonomyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.filePatterns = []; - object.sampleGcsFileSpecs = []; - } - if (message.filePatterns && message.filePatterns.length) { - object.filePatterns = []; - for (var j = 0; j < message.filePatterns.length; ++j) - object.filePatterns[j] = message.filePatterns[j]; - } - if (message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length) { - object.sampleGcsFileSpecs = []; - for (var j = 0; j < message.sampleGcsFileSpecs.length; ++j) - object.sampleGcsFileSpecs[j] = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.toObject(message.sampleGcsFileSpecs[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this GcsFilesetSpec to JSON. + * Converts this DeleteTaxonomyRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec + * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest * @instance * @returns {Object.} JSON object */ - GcsFilesetSpec.prototype.toJSON = function toJSON() { + DeleteTaxonomyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsFilesetSpec; + return DeleteTaxonomyRequest; })(); - v1beta1.GcsFileSpec = (function() { + v1beta1.UpdateTaxonomyRequest = (function() { /** - * Properties of a GcsFileSpec. + * Properties of an UpdateTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGcsFileSpec - * @property {string|null} [filePath] GcsFileSpec filePath - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [gcsTimestamps] GcsFileSpec gcsTimestamps - * @property {number|Long|null} [sizeBytes] GcsFileSpec sizeBytes + * @interface IUpdateTaxonomyRequest + * @property {google.cloud.datacatalog.v1beta1.ITaxonomy|null} [taxonomy] UpdateTaxonomyRequest taxonomy + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaxonomyRequest updateMask */ /** - * Constructs a new GcsFileSpec. + * Constructs a new UpdateTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GcsFileSpec. - * @implements IGcsFileSpec + * @classdesc Represents an UpdateTaxonomyRequest. + * @implements IUpdateTaxonomyRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest=} [properties] Properties to set */ - function GcsFileSpec(properties) { + function UpdateTaxonomyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7231,101 +12975,88 @@ } /** - * GcsFileSpec filePath. - * @member {string} filePath - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.filePath = ""; - - /** - * GcsFileSpec gcsTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} gcsTimestamps - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * UpdateTaxonomyRequest taxonomy. + * @member {google.cloud.datacatalog.v1beta1.ITaxonomy|null|undefined} taxonomy + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @instance */ - GcsFileSpec.prototype.gcsTimestamps = null; + UpdateTaxonomyRequest.prototype.taxonomy = null; /** - * GcsFileSpec sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * UpdateTaxonomyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @instance */ - GcsFileSpec.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UpdateTaxonomyRequest.prototype.updateMask = null; /** - * Creates a new GcsFileSpec instance using the specified properties. + * Creates a new UpdateTaxonomyRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec instance + * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest instance */ - GcsFileSpec.create = function create(properties) { - return new GcsFileSpec(properties); + UpdateTaxonomyRequest.create = function create(properties) { + return new UpdateTaxonomyRequest(properties); }; /** - * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. + * Encodes the specified UpdateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec} message GcsFileSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} message UpdateTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsFileSpec.encode = function encode(message, writer) { + UpdateTaxonomyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filePath != null && message.hasOwnProperty("filePath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePath); - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) - $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.gcsTimestamps, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sizeBytes); + if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) + $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. + * Encodes the specified UpdateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec} message GcsFileSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} message UpdateTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsFileSpec.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsFileSpec message from the specified reader or buffer. + * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec + * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsFileSpec.decode = function decode(reader, length) { + UpdateTaxonomyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GcsFileSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.filePath = reader.string(); + message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32()); break; case 2: - message.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); - break; - case 4: - message.sizeBytes = reader.int64(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7336,145 +13067,128 @@ }; /** - * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. + * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec + * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsFileSpec.decodeDelimited = function decodeDelimited(reader) { + UpdateTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsFileSpec message. + * Verifies an UpdateTaxonomyRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsFileSpec.verify = function verify(message) { + UpdateTaxonomyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filePath != null && message.hasOwnProperty("filePath")) - if (!$util.isString(message.filePath)) - return "filePath: string expected"; - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) { - var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.gcsTimestamps); + if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) { + var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomy); if (error) - return "gcsTimestamps." + error; + return "taxonomy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) - return "sizeBytes: integer|Long expected"; return null; }; /** - * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec + * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest */ - GcsFileSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GcsFileSpec) + UpdateTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GcsFileSpec(); - if (object.filePath != null) - message.filePath = String(object.filePath); - if (object.gcsTimestamps != null) { - if (typeof object.gcsTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFileSpec.gcsTimestamps: object expected"); - message.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.gcsTimestamps); + var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest(); + if (object.taxonomy != null) { + if (typeof object.taxonomy !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.taxonomy: object expected"); + message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.sizeBytes != null) - if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; - else if (typeof object.sizeBytes === "string") - message.sizeBytes = parseInt(object.sizeBytes, 10); - else if (typeof object.sizeBytes === "number") - message.sizeBytes = object.sizeBytes; - else if (typeof object.sizeBytes === "object") - message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTaxonomyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.GcsFileSpec} message GcsFileSpec + * @param {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} message UpdateTaxonomyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsFileSpec.toObject = function toObject(message, options) { + UpdateTaxonomyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.filePath = ""; - object.gcsTimestamps = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sizeBytes = options.longs === String ? "0" : 0; + object.taxonomy = null; + object.updateMask = null; } - if (message.filePath != null && message.hasOwnProperty("filePath")) - object.filePath = message.filePath; - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) - object.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.gcsTimestamps, options); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") - object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; - else - object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) + object.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this GcsFileSpec to JSON. + * Converts this UpdateTaxonomyRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest * @instance * @returns {Object.} JSON object */ - GcsFileSpec.prototype.toJSON = function toJSON() { + UpdateTaxonomyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsFileSpec; + return UpdateTaxonomyRequest; })(); - v1beta1.SystemTimestamps = (function() { + v1beta1.ListTaxonomiesRequest = (function() { /** - * Properties of a SystemTimestamps. + * Properties of a ListTaxonomiesRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISystemTimestamps - * @property {google.protobuf.ITimestamp|null} [createTime] SystemTimestamps createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] SystemTimestamps updateTime - * @property {google.protobuf.ITimestamp|null} [expireTime] SystemTimestamps expireTime + * @interface IListTaxonomiesRequest + * @property {string|null} [parent] ListTaxonomiesRequest parent + * @property {number|null} [pageSize] ListTaxonomiesRequest pageSize + * @property {string|null} [pageToken] ListTaxonomiesRequest pageToken */ /** - * Constructs a new SystemTimestamps. + * Constructs a new ListTaxonomiesRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SystemTimestamps. - * @implements ISystemTimestamps + * @classdesc Represents a ListTaxonomiesRequest. + * @implements IListTaxonomiesRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest=} [properties] Properties to set */ - function SystemTimestamps(properties) { + function ListTaxonomiesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7482,101 +13196,101 @@ } /** - * SystemTimestamps createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * ListTaxonomiesRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @instance */ - SystemTimestamps.prototype.createTime = null; + ListTaxonomiesRequest.prototype.parent = ""; /** - * SystemTimestamps updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * ListTaxonomiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @instance */ - SystemTimestamps.prototype.updateTime = null; + ListTaxonomiesRequest.prototype.pageSize = 0; /** - * SystemTimestamps expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * ListTaxonomiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @instance */ - SystemTimestamps.prototype.expireTime = null; + ListTaxonomiesRequest.prototype.pageToken = ""; /** - * Creates a new SystemTimestamps instance using the specified properties. + * Creates a new ListTaxonomiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps instance + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest instance */ - SystemTimestamps.create = function create(properties) { - return new SystemTimestamps(properties); + ListTaxonomiesRequest.create = function create(properties) { + return new ListTaxonomiesRequest(properties); }; /** - * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. + * Encodes the specified ListTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps} message SystemTimestamps message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} message ListTaxonomiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SystemTimestamps.encode = function encode(message, writer) { + ListTaxonomiesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. + * Encodes the specified ListTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps} message SystemTimestamps message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} message ListTaxonomiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SystemTimestamps.encodeDelimited = function encodeDelimited(message, writer) { + ListTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SystemTimestamps message from the specified reader or buffer. + * Decodes a ListTaxonomiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SystemTimestamps.decode = function decode(reader, length) { + ListTaxonomiesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SystemTimestamps(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 3: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -7587,140 +13301,126 @@ }; /** - * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. + * Decodes a ListTaxonomiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SystemTimestamps.decodeDelimited = function decodeDelimited(reader) { + ListTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SystemTimestamps message. + * Verifies a ListTaxonomiesRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SystemTimestamps.verify = function verify(message) { + ListTaxonomiesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. + * Creates a ListTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest */ - SystemTimestamps.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SystemTimestamps) + ListTaxonomiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SystemTimestamps(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } + var message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. + * Creates a plain object from a ListTaxonomiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.SystemTimestamps} message SystemTimestamps + * @param {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} message ListTaxonomiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SystemTimestamps.toObject = function toObject(message, options) { + ListTaxonomiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.updateTime = null; - object.expireTime = null; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this SystemTimestamps to JSON. + * Converts this ListTaxonomiesRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest * @instance * @returns {Object.} JSON object */ - SystemTimestamps.prototype.toJSON = function toJSON() { + ListTaxonomiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SystemTimestamps; + return ListTaxonomiesRequest; })(); - v1beta1.Schema = (function() { + v1beta1.ListTaxonomiesResponse = (function() { /** - * Properties of a Schema. + * Properties of a ListTaxonomiesResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISchema - * @property {Array.|null} [columns] Schema columns + * @interface IListTaxonomiesResponse + * @property {Array.|null} [taxonomies] ListTaxonomiesResponse taxonomies + * @property {string|null} [nextPageToken] ListTaxonomiesResponse nextPageToken */ /** - * Constructs a new Schema. + * Constructs a new ListTaxonomiesResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a Schema. - * @implements ISchema + * @classdesc Represents a ListTaxonomiesResponse. + * @implements IListTaxonomiesResponse * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISchema=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse=} [properties] Properties to set */ - function Schema(properties) { - this.columns = []; + function ListTaxonomiesResponse(properties) { + this.taxonomies = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7728,78 +13428,91 @@ } /** - * Schema columns. - * @member {Array.} columns - * @memberof google.cloud.datacatalog.v1beta1.Schema + * ListTaxonomiesResponse taxonomies. + * @member {Array.} taxonomies + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @instance */ - Schema.prototype.columns = $util.emptyArray; + ListTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; /** - * Creates a new Schema instance using the specified properties. + * ListTaxonomiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse + * @instance + */ + ListTaxonomiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTaxonomiesResponse instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.ISchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema instance + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse instance */ - Schema.create = function create(properties) { - return new Schema(properties); + ListTaxonomiesResponse.create = function create(properties) { + return new ListTaxonomiesResponse(properties); }; /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. + * Encodes the specified ListTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.ISchema} message Schema message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse} message ListTaxonomiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Schema.encode = function encode(message, writer) { + ListTaxonomiesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.datacatalog.v1beta1.ColumnSchema.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.taxonomies != null && message.taxonomies.length) + for (var i = 0; i < message.taxonomies.length; ++i) + $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. + * Encodes the specified ListTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.ISchema} message Schema message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse} message ListTaxonomiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Schema.encodeDelimited = function encodeDelimited(message, writer) { + ListTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Schema message from the specified reader or buffer. + * Decodes a ListTaxonomiesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Schema.decode = function decode(reader, length) { + ListTaxonomiesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Schema(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + if (!(message.taxonomies && message.taxonomies.length)) + message.taxonomies = []; + message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32())); + break; case 2: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.datacatalog.v1beta1.ColumnSchema.decode(reader, reader.uint32())); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -7810,129 +13523,133 @@ }; /** - * Decodes a Schema message from the specified reader or buffer, length delimited. + * Decodes a ListTaxonomiesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Schema.decodeDelimited = function decodeDelimited(reader) { + ListTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Schema message. + * Verifies a ListTaxonomiesResponse message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Schema.verify = function verify(message) { + ListTaxonomiesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.verify(message.columns[i]); + if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { + if (!Array.isArray(message.taxonomies)) + return "taxonomies: array expected"; + for (var i = 0; i < message.taxonomies.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomies[i]); if (error) - return "columns." + error; + return "taxonomies." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * Creates a ListTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema + * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse */ - Schema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Schema) + ListTaxonomiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Schema(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.datacatalog.v1beta1.Schema.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Schema.columns: object expected"); - message.columns[i] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.fromObject(object.columns[i]); + var message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse(); + if (object.taxonomies) { + if (!Array.isArray(object.taxonomies)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.taxonomies: array expected"); + message.taxonomies = []; + for (var i = 0; i < object.taxonomies.length; ++i) { + if (typeof object.taxonomies[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.taxonomies: object expected"); + message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomies[i]); } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. + * Creates a plain object from a ListTaxonomiesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.Schema} message Schema + * @param {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} message ListTaxonomiesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Schema.toObject = function toObject(message, options) { + ListTaxonomiesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.columns = []; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.toObject(message.columns[j], options); + object.taxonomies = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.taxonomies && message.taxonomies.length) { + object.taxonomies = []; + for (var j = 0; j < message.taxonomies.length; ++j) + object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomies[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this Schema to JSON. + * Converts this ListTaxonomiesResponse to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Schema + * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse * @instance * @returns {Object.} JSON object */ - Schema.prototype.toJSON = function toJSON() { + ListTaxonomiesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Schema; + return ListTaxonomiesResponse; })(); - v1beta1.ColumnSchema = (function() { + v1beta1.GetTaxonomyRequest = (function() { /** - * Properties of a ColumnSchema. + * Properties of a GetTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IColumnSchema - * @property {string|null} [column] ColumnSchema column - * @property {string|null} [type] ColumnSchema type - * @property {string|null} [description] ColumnSchema description - * @property {string|null} [mode] ColumnSchema mode - * @property {Array.|null} [subcolumns] ColumnSchema subcolumns + * @interface IGetTaxonomyRequest + * @property {string|null} [name] GetTaxonomyRequest name */ /** - * Constructs a new ColumnSchema. + * Constructs a new GetTaxonomyRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ColumnSchema. - * @implements IColumnSchema + * @classdesc Represents a GetTaxonomyRequest. + * @implements IGetTaxonomyRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest=} [properties] Properties to set */ - function ColumnSchema(properties) { - this.subcolumns = []; + function GetTaxonomyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7940,130 +13657,75 @@ } /** - * ColumnSchema column. - * @member {string} column - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.column = ""; - - /** - * ColumnSchema type. - * @member {string} type - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.type = ""; - - /** - * ColumnSchema description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.description = ""; - - /** - * ColumnSchema mode. - * @member {string} mode - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.mode = ""; - - /** - * ColumnSchema subcolumns. - * @member {Array.} subcolumns - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * GetTaxonomyRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @instance */ - ColumnSchema.prototype.subcolumns = $util.emptyArray; + GetTaxonomyRequest.prototype.name = ""; /** - * Creates a new ColumnSchema instance using the specified properties. + * Creates a new GetTaxonomyRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema instance + * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest instance */ - ColumnSchema.create = function create(properties) { - return new ColumnSchema(properties); + GetTaxonomyRequest.create = function create(properties) { + return new GetTaxonomyRequest(properties); }; /** - * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. + * Encodes the specified GetTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema} message ColumnSchema message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} message GetTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnSchema.encode = function encode(message, writer) { + GetTaxonomyRequest.encode = function encode(message, writer) { if (!writer) - writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.mode != null && message.hasOwnProperty("mode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); - if (message.column != null && message.hasOwnProperty("column")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.column); - if (message.subcolumns != null && message.subcolumns.length) - for (var i = 0; i < message.subcolumns.length; ++i) - $root.google.cloud.datacatalog.v1beta1.ColumnSchema.encode(message.subcolumns[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. + * Encodes the specified GetTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema} message ColumnSchema message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} message GetTaxonomyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnSchema.encodeDelimited = function encodeDelimited(message, writer) { + GetTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ColumnSchema message from the specified reader or buffer. + * Decodes a GetTaxonomyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema + * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnSchema.decode = function decode(reader, length) { + GetTaxonomyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ColumnSchema(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - message.column = reader.string(); - break; case 1: - message.type = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.mode = reader.string(); - break; - case 7: - if (!(message.subcolumns && message.subcolumns.length)) - message.subcolumns = []; - message.subcolumns.push($root.google.cloud.datacatalog.v1beta1.ColumnSchema.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -8074,161 +13736,108 @@ }; /** - * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. + * Decodes a GetTaxonomyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema + * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnSchema.decodeDelimited = function decodeDelimited(reader) { + GetTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ColumnSchema message. + * Verifies a GetTaxonomyRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ColumnSchema.verify = function verify(message) { + GetTaxonomyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - if (!$util.isString(message.mode)) - return "mode: string expected"; - if (message.subcolumns != null && message.hasOwnProperty("subcolumns")) { - if (!Array.isArray(message.subcolumns)) - return "subcolumns: array expected"; - for (var i = 0; i < message.subcolumns.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.verify(message.subcolumns[i]); - if (error) - return "subcolumns." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaxonomyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema + * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest */ - ColumnSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ColumnSchema) + GetTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ColumnSchema(); - if (object.column != null) - message.column = String(object.column); - if (object.type != null) - message.type = String(object.type); - if (object.description != null) - message.description = String(object.description); - if (object.mode != null) - message.mode = String(object.mode); - if (object.subcolumns) { - if (!Array.isArray(object.subcolumns)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns: array expected"); - message.subcolumns = []; - for (var i = 0; i < object.subcolumns.length; ++i) { - if (typeof object.subcolumns[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns: object expected"); - message.subcolumns[i] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.fromObject(object.subcolumns[i]); - } - } + var message = new $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. + * Creates a plain object from a GetTaxonomyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ColumnSchema} message ColumnSchema + * @param {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} message GetTaxonomyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnSchema.toObject = function toObject(message, options) { + GetTaxonomyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.subcolumns = []; - if (options.defaults) { - object.type = ""; - object.description = ""; - object.mode = ""; - object.column = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = message.mode; - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.subcolumns && message.subcolumns.length) { - object.subcolumns = []; - for (var j = 0; j < message.subcolumns.length; ++j) - object.subcolumns[j] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.toObject(message.subcolumns[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ColumnSchema to JSON. + * Converts this GetTaxonomyRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema + * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest * @instance * @returns {Object.} JSON object */ - ColumnSchema.prototype.toJSON = function toJSON() { + GetTaxonomyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ColumnSchema; + return GetTaxonomyRequest; })(); - v1beta1.SearchCatalogResult = (function() { + v1beta1.CreatePolicyTagRequest = (function() { /** - * Properties of a SearchCatalogResult. + * Properties of a CreatePolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISearchCatalogResult - * @property {google.cloud.datacatalog.v1beta1.SearchResultType|null} [searchResultType] SearchCatalogResult searchResultType - * @property {string|null} [searchResultSubtype] SearchCatalogResult searchResultSubtype - * @property {string|null} [relativeResourceName] SearchCatalogResult relativeResourceName - * @property {string|null} [linkedResource] SearchCatalogResult linkedResource + * @interface ICreatePolicyTagRequest + * @property {string|null} [parent] CreatePolicyTagRequest parent + * @property {google.cloud.datacatalog.v1beta1.IPolicyTag|null} [policyTag] CreatePolicyTagRequest policyTag */ /** - * Constructs a new SearchCatalogResult. + * Constructs a new CreatePolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SearchCatalogResult. - * @implements ISearchCatalogResult + * @classdesc Represents a CreatePolicyTagRequest. + * @implements ICreatePolicyTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest=} [properties] Properties to set */ - function SearchCatalogResult(properties) { + function CreatePolicyTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8236,114 +13845,88 @@ } /** - * SearchCatalogResult searchResultType. - * @member {google.cloud.datacatalog.v1beta1.SearchResultType} searchResultType - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.searchResultType = 0; - - /** - * SearchCatalogResult searchResultSubtype. - * @member {string} searchResultSubtype - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.searchResultSubtype = ""; - - /** - * SearchCatalogResult relativeResourceName. - * @member {string} relativeResourceName - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * CreatePolicyTagRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @instance */ - SearchCatalogResult.prototype.relativeResourceName = ""; + CreatePolicyTagRequest.prototype.parent = ""; /** - * SearchCatalogResult linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * CreatePolicyTagRequest policyTag. + * @member {google.cloud.datacatalog.v1beta1.IPolicyTag|null|undefined} policyTag + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @instance */ - SearchCatalogResult.prototype.linkedResource = ""; + CreatePolicyTagRequest.prototype.policyTag = null; /** - * Creates a new SearchCatalogResult instance using the specified properties. + * Creates a new CreatePolicyTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult instance + * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest instance */ - SearchCatalogResult.create = function create(properties) { - return new SearchCatalogResult(properties); + CreatePolicyTagRequest.create = function create(properties) { + return new CreatePolicyTagRequest(properties); }; /** - * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. + * Encodes the specified CreatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} message CreatePolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchCatalogResult.encode = function encode(message, writer) { + CreatePolicyTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.searchResultType); - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.searchResultSubtype); - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relativeResourceName); - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.linkedResource); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.policyTag != null && message.hasOwnProperty("policyTag")) + $root.google.cloud.datacatalog.v1beta1.PolicyTag.encode(message.policyTag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. + * Encodes the specified CreatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} message CreatePolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchCatalogResult.encodeDelimited = function encodeDelimited(message, writer) { + CreatePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchCatalogResult message from the specified reader or buffer. + * Decodes a CreatePolicyTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult + * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchCatalogResult.decode = function decode(reader, length) { + CreatePolicyTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.searchResultType = reader.int32(); + message.parent = reader.string(); break; case 2: - message.searchResultSubtype = reader.string(); - break; - case 3: - message.relativeResourceName = reader.string(); - break; - case 4: - message.linkedResource = reader.string(); + message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8354,175 +13937,121 @@ }; /** - * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. + * Decodes a CreatePolicyTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult + * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchCatalogResult.decodeDelimited = function decodeDelimited(reader) { + CreatePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchCatalogResult message. + * Verifies a CreatePolicyTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchCatalogResult.verify = function verify(message) { + CreatePolicyTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - switch (message.searchResultType) { - default: - return "searchResultType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - if (!$util.isString(message.searchResultSubtype)) - return "searchResultSubtype: string expected"; - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - if (!$util.isString(message.relativeResourceName)) - return "relativeResourceName: string expected"; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.policyTag != null && message.hasOwnProperty("policyTag")) { + var error = $root.google.cloud.datacatalog.v1beta1.PolicyTag.verify(message.policyTag); + if (error) + return "policyTag." + error; + } return null; }; /** - * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult - */ - SearchCatalogResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult(); - switch (object.searchResultType) { - case "SEARCH_RESULT_TYPE_UNSPECIFIED": - case 0: - message.searchResultType = 0; - break; - case "ENTRY": - case 1: - message.searchResultType = 1; - break; - case "TAG_TEMPLATE": - case 2: - message.searchResultType = 2; - break; - case "ENTRY_GROUP": - case 3: - message.searchResultType = 3; - break; - } - if (object.searchResultSubtype != null) - message.searchResultSubtype = String(object.searchResultSubtype); - if (object.relativeResourceName != null) - message.relativeResourceName = String(object.relativeResourceName); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); + * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest + */ + CreatePolicyTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.policyTag != null) { + if (typeof object.policyTag !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.policyTag: object expected"); + message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.fromObject(object.policyTag); + } return message; }; /** - * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. + * Creates a plain object from a CreatePolicyTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResult} message SearchCatalogResult + * @param {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} message CreatePolicyTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchCatalogResult.toObject = function toObject(message, options) { + CreatePolicyTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.searchResultType = options.enums === String ? "SEARCH_RESULT_TYPE_UNSPECIFIED" : 0; - object.searchResultSubtype = ""; - object.relativeResourceName = ""; - object.linkedResource = ""; + object.parent = ""; + object.policyTag = null; } - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - object.searchResultType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.SearchResultType[message.searchResultType] : message.searchResultType; - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - object.searchResultSubtype = message.searchResultSubtype; - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - object.relativeResourceName = message.relativeResourceName; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.policyTag != null && message.hasOwnProperty("policyTag")) + object.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.toObject(message.policyTag, options); return object; }; /** - * Converts this SearchCatalogResult to JSON. + * Converts this CreatePolicyTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult + * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest * @instance * @returns {Object.} JSON object */ - SearchCatalogResult.prototype.toJSON = function toJSON() { + CreatePolicyTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchCatalogResult; - })(); - - /** - * SearchResultType enum. - * @name google.cloud.datacatalog.v1beta1.SearchResultType - * @enum {string} - * @property {number} SEARCH_RESULT_TYPE_UNSPECIFIED=0 SEARCH_RESULT_TYPE_UNSPECIFIED value - * @property {number} ENTRY=1 ENTRY value - * @property {number} TAG_TEMPLATE=2 TAG_TEMPLATE value - * @property {number} ENTRY_GROUP=3 ENTRY_GROUP value - */ - v1beta1.SearchResultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_RESULT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTRY"] = 1; - values[valuesById[2] = "TAG_TEMPLATE"] = 2; - values[valuesById[3] = "ENTRY_GROUP"] = 3; - return values; + return CreatePolicyTagRequest; })(); - v1beta1.BigQueryTableSpec = (function() { + v1beta1.DeletePolicyTagRequest = (function() { /** - * Properties of a BigQueryTableSpec. + * Properties of a DeletePolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IBigQueryTableSpec - * @property {google.cloud.datacatalog.v1beta1.TableSourceType|null} [tableSourceType] BigQueryTableSpec tableSourceType - * @property {google.cloud.datacatalog.v1beta1.IViewSpec|null} [viewSpec] BigQueryTableSpec viewSpec - * @property {google.cloud.datacatalog.v1beta1.ITableSpec|null} [tableSpec] BigQueryTableSpec tableSpec + * @interface IDeletePolicyTagRequest + * @property {string|null} [name] DeletePolicyTagRequest name */ /** - * Constructs a new BigQueryTableSpec. + * Constructs a new DeletePolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a BigQueryTableSpec. - * @implements IBigQueryTableSpec + * @classdesc Represents a DeletePolicyTagRequest. + * @implements IDeletePolicyTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest=} [properties] Properties to set */ - function BigQueryTableSpec(properties) { + function DeletePolicyTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8530,115 +14059,75 @@ } /** - * BigQueryTableSpec tableSourceType. - * @member {google.cloud.datacatalog.v1beta1.TableSourceType} tableSourceType - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.tableSourceType = 0; - - /** - * BigQueryTableSpec viewSpec. - * @member {google.cloud.datacatalog.v1beta1.IViewSpec|null|undefined} viewSpec - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.viewSpec = null; - - /** - * BigQueryTableSpec tableSpec. - * @member {google.cloud.datacatalog.v1beta1.ITableSpec|null|undefined} tableSpec - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.tableSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryTableSpec typeSpec. - * @member {"viewSpec"|"tableSpec"|undefined} typeSpec - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * DeletePolicyTagRequest name. + * @member {string} name + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @instance */ - Object.defineProperty(BigQueryTableSpec.prototype, "typeSpec", { - get: $util.oneOfGetter($oneOfFields = ["viewSpec", "tableSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeletePolicyTagRequest.prototype.name = ""; /** - * Creates a new BigQueryTableSpec instance using the specified properties. + * Creates a new DeletePolicyTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec instance + * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest instance */ - BigQueryTableSpec.create = function create(properties) { - return new BigQueryTableSpec(properties); + DeletePolicyTagRequest.create = function create(properties) { + return new DeletePolicyTagRequest(properties); }; /** - * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. + * Encodes the specified DeletePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} message DeletePolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryTableSpec.encode = function encode(message, writer) { + DeletePolicyTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tableSourceType); - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) - $root.google.cloud.datacatalog.v1beta1.ViewSpec.encode(message.viewSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) - $root.google.cloud.datacatalog.v1beta1.TableSpec.encode(message.tableSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. + * Encodes the specified DeletePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} message DeletePolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryTableSpec.encodeDelimited = function encodeDelimited(message, writer) { + DeletePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer. + * Decodes a DeletePolicyTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec + * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryTableSpec.decode = function decode(reader, length) { + DeletePolicyTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.tableSourceType = reader.int32(); - break; - case 2: - message.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.decode(reader, reader.uint32()); - break; - case 3: - message.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -8649,180 +14138,108 @@ }; /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. + * Decodes a DeletePolicyTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec + * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryTableSpec.decodeDelimited = function decodeDelimited(reader) { + DeletePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryTableSpec message. + * Verifies a DeletePolicyTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryTableSpec.verify = function verify(message) { + DeletePolicyTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - switch (message.tableSourceType) { - default: - return "tableSourceType: enum value expected"; - case 0: - case 2: - case 5: - break; - } - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.ViewSpec.verify(message.viewSpec); - if (error) - return "viewSpec." + error; - } - } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.TableSpec.verify(message.tableSpec); - if (error) - return "tableSpec." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePolicyTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec + * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest */ - BigQueryTableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec) + DeletePolicyTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec(); - switch (object.tableSourceType) { - case "TABLE_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.tableSourceType = 0; - break; - case "BIGQUERY_VIEW": - case 2: - message.tableSourceType = 2; - break; - case "BIGQUERY_TABLE": - case 5: - message.tableSourceType = 5; - break; - } - if (object.viewSpec != null) { - if (typeof object.viewSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.BigQueryTableSpec.viewSpec: object expected"); - message.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.fromObject(object.viewSpec); - } - if (object.tableSpec != null) { - if (typeof object.tableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.BigQueryTableSpec.tableSpec: object expected"); - message.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.fromObject(object.tableSpec); - } + var message = new $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. + * Creates a plain object from a DeletePolicyTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} message BigQueryTableSpec + * @param {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} message DeletePolicyTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryTableSpec.toObject = function toObject(message, options) { + DeletePolicyTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.tableSourceType = options.enums === String ? "TABLE_SOURCE_TYPE_UNSPECIFIED" : 0; - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - object.tableSourceType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.TableSourceType[message.tableSourceType] : message.tableSourceType; - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { - object.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.toObject(message.viewSpec, options); - if (options.oneofs) - object.typeSpec = "viewSpec"; - } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - object.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.toObject(message.tableSpec, options); - if (options.oneofs) - object.typeSpec = "tableSpec"; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this BigQueryTableSpec to JSON. + * Converts this DeletePolicyTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec + * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest * @instance * @returns {Object.} JSON object */ - BigQueryTableSpec.prototype.toJSON = function toJSON() { + DeletePolicyTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryTableSpec; - })(); - - /** - * TableSourceType enum. - * @name google.cloud.datacatalog.v1beta1.TableSourceType - * @enum {string} - * @property {number} TABLE_SOURCE_TYPE_UNSPECIFIED=0 TABLE_SOURCE_TYPE_UNSPECIFIED value - * @property {number} BIGQUERY_VIEW=2 BIGQUERY_VIEW value - * @property {number} BIGQUERY_TABLE=5 BIGQUERY_TABLE value - */ - v1beta1.TableSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "BIGQUERY_VIEW"] = 2; - values[valuesById[5] = "BIGQUERY_TABLE"] = 5; - return values; + return DeletePolicyTagRequest; })(); - v1beta1.ViewSpec = (function() { + v1beta1.UpdatePolicyTagRequest = (function() { /** - * Properties of a ViewSpec. + * Properties of an UpdatePolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IViewSpec - * @property {string|null} [viewQuery] ViewSpec viewQuery + * @interface IUpdatePolicyTagRequest + * @property {google.cloud.datacatalog.v1beta1.IPolicyTag|null} [policyTag] UpdatePolicyTagRequest policyTag + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePolicyTagRequest updateMask */ /** - * Constructs a new ViewSpec. + * Constructs a new UpdatePolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ViewSpec. - * @implements IViewSpec + * @classdesc Represents an UpdatePolicyTagRequest. + * @implements IUpdatePolicyTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.IViewSpec=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest=} [properties] Properties to set */ - function ViewSpec(properties) { + function UpdatePolicyTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8830,75 +14247,88 @@ } /** - * ViewSpec viewQuery. - * @member {string} viewQuery - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * UpdatePolicyTagRequest policyTag. + * @member {google.cloud.datacatalog.v1beta1.IPolicyTag|null|undefined} policyTag + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @instance */ - ViewSpec.prototype.viewQuery = ""; + UpdatePolicyTagRequest.prototype.policyTag = null; /** - * Creates a new ViewSpec instance using the specified properties. + * UpdatePolicyTagRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest + * @instance + */ + UpdatePolicyTagRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePolicyTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IViewSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec instance + * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest instance */ - ViewSpec.create = function create(properties) { - return new ViewSpec(properties); + UpdatePolicyTagRequest.create = function create(properties) { + return new UpdatePolicyTagRequest(properties); }; /** - * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. + * Encodes the specified UpdatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IViewSpec} message ViewSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} message UpdatePolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ViewSpec.encode = function encode(message, writer) { + UpdatePolicyTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.viewQuery); + if (message.policyTag != null && message.hasOwnProperty("policyTag")) + $root.google.cloud.datacatalog.v1beta1.PolicyTag.encode(message.policyTag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. + * Encodes the specified UpdatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.IViewSpec} message ViewSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} message UpdatePolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ViewSpec.encodeDelimited = function encodeDelimited(message, writer) { + UpdatePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ViewSpec message from the specified reader or buffer. + * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec + * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ViewSpec.decode = function decode(reader, length) { + UpdatePolicyTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ViewSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.viewQuery = reader.string(); + message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8909,107 +14339,128 @@ }; /** - * Decodes a ViewSpec message from the specified reader or buffer, length delimited. + * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec + * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ViewSpec.decodeDelimited = function decodeDelimited(reader) { + UpdatePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ViewSpec message. + * Verifies an UpdatePolicyTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ViewSpec.verify = function verify(message) { + UpdatePolicyTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - if (!$util.isString(message.viewQuery)) - return "viewQuery: string expected"; + if (message.policyTag != null && message.hasOwnProperty("policyTag")) { + var error = $root.google.cloud.datacatalog.v1beta1.PolicyTag.verify(message.policyTag); + if (error) + return "policyTag." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec + * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest */ - ViewSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ViewSpec) + UpdatePolicyTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ViewSpec(); - if (object.viewQuery != null) - message.viewQuery = String(object.viewQuery); + var message = new $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest(); + if (object.policyTag != null) { + if (typeof object.policyTag !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.policyTag: object expected"); + message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.fromObject(object.policyTag); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. + * Creates a plain object from an UpdatePolicyTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ViewSpec} message ViewSpec + * @param {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} message UpdatePolicyTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ViewSpec.toObject = function toObject(message, options) { + UpdatePolicyTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.viewQuery = ""; - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - object.viewQuery = message.viewQuery; + if (options.defaults) { + object.policyTag = null; + object.updateMask = null; + } + if (message.policyTag != null && message.hasOwnProperty("policyTag")) + object.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.toObject(message.policyTag, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ViewSpec to JSON. + * Converts this UpdatePolicyTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec + * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest * @instance * @returns {Object.} JSON object */ - ViewSpec.prototype.toJSON = function toJSON() { + UpdatePolicyTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ViewSpec; + return UpdatePolicyTagRequest; })(); - v1beta1.TableSpec = (function() { + v1beta1.ListPolicyTagsRequest = (function() { /** - * Properties of a TableSpec. + * Properties of a ListPolicyTagsRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITableSpec - * @property {string|null} [groupedEntry] TableSpec groupedEntry + * @interface IListPolicyTagsRequest + * @property {string|null} [parent] ListPolicyTagsRequest parent + * @property {number|null} [pageSize] ListPolicyTagsRequest pageSize + * @property {string|null} [pageToken] ListPolicyTagsRequest pageToken */ /** - * Constructs a new TableSpec. + * Constructs a new ListPolicyTagsRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TableSpec. - * @implements ITableSpec + * @classdesc Represents a ListPolicyTagsRequest. + * @implements IListPolicyTagsRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITableSpec=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest=} [properties] Properties to set */ - function TableSpec(properties) { + function ListPolicyTagsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9017,75 +14468,101 @@ } /** - * TableSpec groupedEntry. - * @member {string} groupedEntry - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * ListPolicyTagsRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @instance */ - TableSpec.prototype.groupedEntry = ""; + ListPolicyTagsRequest.prototype.parent = ""; /** - * Creates a new TableSpec instance using the specified properties. + * ListPolicyTagsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest + * @instance + */ + ListPolicyTagsRequest.prototype.pageSize = 0; + + /** + * ListPolicyTagsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest + * @instance + */ + ListPolicyTagsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPolicyTagsRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec instance + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest instance */ - TableSpec.create = function create(properties) { - return new TableSpec(properties); + ListPolicyTagsRequest.create = function create(properties) { + return new ListPolicyTagsRequest(properties); }; /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. + * Encodes the specified ListPolicyTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITableSpec} message TableSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} message ListPolicyTagsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableSpec.encode = function encode(message, writer) { + ListPolicyTagsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupedEntry); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. + * Encodes the specified ListPolicyTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITableSpec} message TableSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} message ListPolicyTagsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TableSpec.encodeDelimited = function encodeDelimited(message, writer) { + ListPolicyTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TableSpec message from the specified reader or buffer. + * Decodes a ListPolicyTagsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TableSpec.decode = function decode(reader, length) { + ListPolicyTagsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TableSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.groupedEntry = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -9096,109 +14573,126 @@ }; /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. + * Decodes a ListPolicyTagsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TableSpec.decodeDelimited = function decodeDelimited(reader) { + ListPolicyTagsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TableSpec message. + * Verifies a ListPolicyTagsRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TableSpec.verify = function verify(message) { + ListPolicyTagsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - if (!$util.isString(message.groupedEntry)) - return "groupedEntry: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ListPolicyTagsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest */ - TableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TableSpec) + ListPolicyTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TableSpec(); - if (object.groupedEntry != null) - message.groupedEntry = String(object.groupedEntry); + var message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. + * Creates a plain object from a ListPolicyTagsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @static - * @param {google.cloud.datacatalog.v1beta1.TableSpec} message TableSpec + * @param {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} message ListPolicyTagsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TableSpec.toObject = function toObject(message, options) { + ListPolicyTagsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.groupedEntry = ""; - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - object.groupedEntry = message.groupedEntry; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this TableSpec to JSON. + * Converts this ListPolicyTagsRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TableSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest * @instance * @returns {Object.} JSON object */ - TableSpec.prototype.toJSON = function toJSON() { + ListPolicyTagsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TableSpec; + return ListPolicyTagsRequest; })(); - v1beta1.BigQueryDateShardedSpec = (function() { + v1beta1.ListPolicyTagsResponse = (function() { /** - * Properties of a BigQueryDateShardedSpec. + * Properties of a ListPolicyTagsResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IBigQueryDateShardedSpec - * @property {string|null} [dataset] BigQueryDateShardedSpec dataset - * @property {string|null} [tablePrefix] BigQueryDateShardedSpec tablePrefix - * @property {number|Long|null} [shardCount] BigQueryDateShardedSpec shardCount + * @interface IListPolicyTagsResponse + * @property {Array.|null} [policyTags] ListPolicyTagsResponse policyTags + * @property {string|null} [nextPageToken] ListPolicyTagsResponse nextPageToken */ /** - * Constructs a new BigQueryDateShardedSpec. + * Constructs a new ListPolicyTagsResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a BigQueryDateShardedSpec. - * @implements IBigQueryDateShardedSpec + * @classdesc Represents a ListPolicyTagsResponse. + * @implements IListPolicyTagsResponse * @constructor - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse=} [properties] Properties to set */ - function BigQueryDateShardedSpec(properties) { + function ListPolicyTagsResponse(properties) { + this.policyTags = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9206,101 +14700,91 @@ } /** - * BigQueryDateShardedSpec dataset. - * @member {string} dataset - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.dataset = ""; - - /** - * BigQueryDateShardedSpec tablePrefix. - * @member {string} tablePrefix - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * ListPolicyTagsResponse policyTags. + * @member {Array.} policyTags + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @instance */ - BigQueryDateShardedSpec.prototype.tablePrefix = ""; + ListPolicyTagsResponse.prototype.policyTags = $util.emptyArray; /** - * BigQueryDateShardedSpec shardCount. - * @member {number|Long} shardCount - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * ListPolicyTagsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @instance */ - BigQueryDateShardedSpec.prototype.shardCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListPolicyTagsResponse.prototype.nextPageToken = ""; /** - * Creates a new BigQueryDateShardedSpec instance using the specified properties. + * Creates a new ListPolicyTagsResponse instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec instance + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse instance */ - BigQueryDateShardedSpec.create = function create(properties) { - return new BigQueryDateShardedSpec(properties); + ListPolicyTagsResponse.create = function create(properties) { + return new ListPolicyTagsResponse(properties); }; /** - * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. + * Encodes the specified ListPolicyTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse} message ListPolicyTagsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDateShardedSpec.encode = function encode(message, writer) { + ListPolicyTagsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataset != null && message.hasOwnProperty("dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tablePrefix); - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.shardCount); + if (message.policyTags != null && message.policyTags.length) + for (var i = 0; i < message.policyTags.length; ++i) + $root.google.cloud.datacatalog.v1beta1.PolicyTag.encode(message.policyTags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. + * Encodes the specified ListPolicyTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse} message ListPolicyTagsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDateShardedSpec.encodeDelimited = function encodeDelimited(message, writer) { + ListPolicyTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. + * Decodes a ListPolicyTagsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDateShardedSpec.decode = function decode(reader, length) { + ListPolicyTagsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.dataset = reader.string(); + if (!(message.policyTags && message.policyTags.length)) + message.policyTags = []; + message.policyTags.push($root.google.cloud.datacatalog.v1beta1.PolicyTag.decode(reader, reader.uint32())); break; case 2: - message.tablePrefix = reader.string(); - break; - case 3: - message.shardCount = reader.int64(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -9311,143 +14795,133 @@ }; /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. + * Decodes a ListPolicyTagsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDateShardedSpec.decodeDelimited = function decodeDelimited(reader) { + ListPolicyTagsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDateShardedSpec message. + * Verifies a ListPolicyTagsResponse message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDateShardedSpec.verify = function verify(message) { + ListPolicyTagsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - if (!$util.isString(message.tablePrefix)) - return "tablePrefix: string expected"; - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - if (!$util.isInteger(message.shardCount) && !(message.shardCount && $util.isInteger(message.shardCount.low) && $util.isInteger(message.shardCount.high))) - return "shardCount: integer|Long expected"; + if (message.policyTags != null && message.hasOwnProperty("policyTags")) { + if (!Array.isArray(message.policyTags)) + return "policyTags: array expected"; + for (var i = 0; i < message.policyTags.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.PolicyTag.verify(message.policyTags[i]); + if (error) + return "policyTags." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ListPolicyTagsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec + * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse */ - BigQueryDateShardedSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec) + ListPolicyTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.tablePrefix != null) - message.tablePrefix = String(object.tablePrefix); - if (object.shardCount != null) - if ($util.Long) - (message.shardCount = $util.Long.fromValue(object.shardCount)).unsigned = false; - else if (typeof object.shardCount === "string") - message.shardCount = parseInt(object.shardCount, 10); - else if (typeof object.shardCount === "number") - message.shardCount = object.shardCount; - else if (typeof object.shardCount === "object") - message.shardCount = new $util.LongBits(object.shardCount.low >>> 0, object.shardCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse(); + if (object.policyTags) { + if (!Array.isArray(object.policyTags)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.policyTags: array expected"); + message.policyTags = []; + for (var i = 0; i < object.policyTags.length; ++i) { + if (typeof object.policyTags[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.policyTags: object expected"); + message.policyTags[i] = $root.google.cloud.datacatalog.v1beta1.PolicyTag.fromObject(object.policyTags[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. + * Creates a plain object from a ListPolicyTagsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @static - * @param {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} message BigQueryDateShardedSpec + * @param {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} message ListPolicyTagsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDateShardedSpec.toObject = function toObject(message, options) { + ListPolicyTagsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.dataset = ""; - object.tablePrefix = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.shardCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.shardCount = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) + object.policyTags = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.policyTags && message.policyTags.length) { + object.policyTags = []; + for (var j = 0; j < message.policyTags.length; ++j) + object.policyTags[j] = $root.google.cloud.datacatalog.v1beta1.PolicyTag.toObject(message.policyTags[j], options); } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - object.tablePrefix = message.tablePrefix; - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - if (typeof message.shardCount === "number") - object.shardCount = options.longs === String ? String(message.shardCount) : message.shardCount; - else - object.shardCount = options.longs === String ? $util.Long.prototype.toString.call(message.shardCount) : options.longs === Number ? new $util.LongBits(message.shardCount.low >>> 0, message.shardCount.high >>> 0).toNumber() : message.shardCount; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this BigQueryDateShardedSpec to JSON. + * Converts this ListPolicyTagsResponse to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse * @instance * @returns {Object.} JSON object */ - BigQueryDateShardedSpec.prototype.toJSON = function toJSON() { + ListPolicyTagsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryDateShardedSpec; + return ListPolicyTagsResponse; })(); - v1beta1.Tag = (function() { + v1beta1.GetPolicyTagRequest = (function() { /** - * Properties of a Tag. + * Properties of a GetPolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITag - * @property {string|null} [name] Tag name - * @property {string|null} [template] Tag template - * @property {string|null} [templateDisplayName] Tag templateDisplayName - * @property {string|null} [column] Tag column - * @property {Object.|null} [fields] Tag fields + * @interface IGetPolicyTagRequest + * @property {string|null} [name] GetPolicyTagRequest name */ /** - * Constructs a new Tag. + * Constructs a new GetPolicyTagRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a Tag. - * @implements ITag + * @classdesc Represents a GetPolicyTagRequest. + * @implements IGetPolicyTagRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITag=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest=} [properties] Properties to set */ - function Tag(properties) { - this.fields = {}; + function GetPolicyTagRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9455,150 +14929,76 @@ } /** - * Tag name. + * GetPolicyTagRequest name. * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.name = ""; - - /** - * Tag template. - * @member {string} template - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.template = ""; - - /** - * Tag templateDisplayName. - * @member {string} templateDisplayName - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.templateDisplayName = ""; - - /** - * Tag column. - * @member {string} column - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.column = ""; - - /** - * Tag fields. - * @member {Object.} fields - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.fields = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Tag scope. - * @member {"column"|undefined} scope - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @instance */ - Object.defineProperty(Tag.prototype, "scope", { - get: $util.oneOfGetter($oneOfFields = ["column"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetPolicyTagRequest.prototype.name = ""; /** - * Creates a new Tag instance using the specified properties. + * Creates a new GetPolicyTagRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag instance + * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest instance */ - Tag.create = function create(properties) { - return new Tag(properties); + GetPolicyTagRequest.create = function create(properties) { + return new GetPolicyTagRequest(properties); }; /** - * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. + * Encodes the specified GetPolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITag} message Tag message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} message GetPolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tag.encode = function encode(message, writer) { + GetPolicyTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.template != null && message.hasOwnProperty("template")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.template); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1beta1.TagField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.column != null && message.hasOwnProperty("column")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.column); - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.templateDisplayName); return writer; }; /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. + * Encodes the specified GetPolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITag} message Tag message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} message GetPolicyTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tag.encodeDelimited = function encodeDelimited(message, writer) { + GetPolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Tag message from the specified reader or buffer. + * Decodes a GetPolicyTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag + * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Tag.decode = function decode(reader, length) { + GetPolicyTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Tag(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.template = reader.string(); - break; - case 5: - message.templateDisplayName = reader.string(); - break; - case 4: - message.column = reader.string(); - break; - case 3: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.cloud.datacatalog.v1beta1.TagField.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -9608,305 +15008,303 @@ }; /** - * Decodes a Tag message from the specified reader or buffer, length delimited. + * Decodes a GetPolicyTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag + * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Tag.decodeDelimited = function decodeDelimited(reader) { + GetPolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Tag message. + * Verifies a GetPolicyTagRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Tag.verify = function verify(message) { + GetPolicyTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.template != null && message.hasOwnProperty("template")) - if (!$util.isString(message.template)) - return "template: string expected"; - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - if (!$util.isString(message.templateDisplayName)) - return "templateDisplayName: string expected"; - if (message.column != null && message.hasOwnProperty("column")) { - properties.scope = 1; - if (!$util.isString(message.column)) - return "column: string expected"; - } - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.TagField.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } return null; }; /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * Creates a GetPolicyTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag + * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest */ - Tag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Tag) + GetPolicyTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Tag(); + var message = new $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest(); if (object.name != null) message.name = String(object.name); - if (object.template != null) - message.template = String(object.template); - if (object.templateDisplayName != null) - message.templateDisplayName = String(object.templateDisplayName); - if (object.column != null) - message.column = String(object.column); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Tag.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Tag.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.datacatalog.v1beta1.TagField.fromObject(object.fields[keys[i]]); - } - } return message; }; /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. + * Creates a plain object from a GetPolicyTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @static - * @param {google.cloud.datacatalog.v1beta1.Tag} message Tag + * @param {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} message GetPolicyTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Tag.toObject = function toObject(message, options) { + GetPolicyTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.template = ""; - object.templateDisplayName = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.template != null && message.hasOwnProperty("template")) - object.template = message.template; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1beta1.TagField.toObject(message.fields[keys2[j]], options); - } - if (message.column != null && message.hasOwnProperty("column")) { - object.column = message.column; - if (options.oneofs) - object.scope = "column"; - } - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - object.templateDisplayName = message.templateDisplayName; return object; }; /** - * Converts this Tag to JSON. + * Converts this GetPolicyTagRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Tag + * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest * @instance * @returns {Object.} JSON object */ - Tag.prototype.toJSON = function toJSON() { + GetPolicyTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Tag; + return GetPolicyTagRequest; })(); - v1beta1.TagField = (function() { + v1beta1.PolicyTagManagerSerialization = (function() { /** - * Properties of a TagField. + * Constructs a new PolicyTagManagerSerialization service. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITagField - * @property {string|null} [displayName] TagField displayName - * @property {number|null} [doubleValue] TagField doubleValue - * @property {string|null} [stringValue] TagField stringValue - * @property {boolean|null} [boolValue] TagField boolValue - * @property {google.protobuf.ITimestamp|null} [timestampValue] TagField timestampValue - * @property {google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null} [enumValue] TagField enumValue + * @classdesc Represents a PolicyTagManagerSerialization + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function PolicyTagManagerSerialization(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (PolicyTagManagerSerialization.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PolicyTagManagerSerialization; /** - * Constructs a new TagField. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TagField. - * @implements ITagField - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITagField=} [properties] Properties to set + * Creates new PolicyTagManagerSerialization service using the specified rpc implementation. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {PolicyTagManagerSerialization} RPC service. Useful where requests and/or responses are streamed. */ - function TagField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + PolicyTagManagerSerialization.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * TagField displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization#importTaxonomies}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization + * @typedef ImportTaxonomiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} [response] ImportTaxonomiesResponse */ - TagField.prototype.displayName = ""; /** - * TagField doubleValue. - * @member {number} doubleValue - * @memberof google.cloud.datacatalog.v1beta1.TagField + * Calls ImportTaxonomies. + * @function importTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization * @instance + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} request ImportTaxonomiesRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomiesCallback} callback Node-style callback called with the error, if any, and ImportTaxonomiesResponse + * @returns {undefined} + * @variation 1 */ - TagField.prototype.doubleValue = 0; + Object.defineProperty(PolicyTagManagerSerialization.prototype.importTaxonomies = function importTaxonomies(request, callback) { + return this.rpcCall(importTaxonomies, $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest, $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse, request, callback); + }, "name", { value: "ImportTaxonomies" }); /** - * TagField stringValue. - * @member {string} stringValue - * @memberof google.cloud.datacatalog.v1beta1.TagField + * Calls ImportTaxonomies. + * @function importTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization * @instance + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} request ImportTaxonomiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TagField.prototype.stringValue = ""; /** - * TagField boolValue. - * @member {boolean} boolValue - * @memberof google.cloud.datacatalog.v1beta1.TagField + * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization#exportTaxonomies}. + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization + * @typedef ExportTaxonomiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} [response] ExportTaxonomiesResponse + */ + + /** + * Calls ExportTaxonomies. + * @function exportTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization * @instance + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} request ExportTaxonomiesRequest message or plain object + * @param {google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomiesCallback} callback Node-style callback called with the error, if any, and ExportTaxonomiesResponse + * @returns {undefined} + * @variation 1 */ - TagField.prototype.boolValue = false; + Object.defineProperty(PolicyTagManagerSerialization.prototype.exportTaxonomies = function exportTaxonomies(request, callback) { + return this.rpcCall(exportTaxonomies, $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest, $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse, request, callback); + }, "name", { value: "ExportTaxonomies" }); /** - * TagField timestampValue. - * @member {google.protobuf.ITimestamp|null|undefined} timestampValue - * @memberof google.cloud.datacatalog.v1beta1.TagField + * Calls ExportTaxonomies. + * @function exportTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization * @instance + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} request ExportTaxonomiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TagField.prototype.timestampValue = null; + + return PolicyTagManagerSerialization; + })(); + + v1beta1.SerializedTaxonomy = (function() { /** - * TagField enumValue. - * @member {google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null|undefined} enumValue - * @memberof google.cloud.datacatalog.v1beta1.TagField + * Properties of a SerializedTaxonomy. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISerializedTaxonomy + * @property {string|null} [displayName] SerializedTaxonomy displayName + * @property {string|null} [description] SerializedTaxonomy description + * @property {Array.|null} [policyTags] SerializedTaxonomy policyTags + */ + + /** + * Constructs a new SerializedTaxonomy. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a SerializedTaxonomy. + * @implements ISerializedTaxonomy + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy=} [properties] Properties to set + */ + function SerializedTaxonomy(properties) { + this.policyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SerializedTaxonomy displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @instance */ - TagField.prototype.enumValue = null; + SerializedTaxonomy.prototype.displayName = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * SerializedTaxonomy description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy + * @instance + */ + SerializedTaxonomy.prototype.description = ""; /** - * TagField kind. - * @member {"doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"|undefined} kind - * @memberof google.cloud.datacatalog.v1beta1.TagField + * SerializedTaxonomy policyTags. + * @member {Array.} policyTags + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @instance */ - Object.defineProperty(TagField.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["doubleValue", "stringValue", "boolValue", "timestampValue", "enumValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + SerializedTaxonomy.prototype.policyTags = $util.emptyArray; /** - * Creates a new TagField instance using the specified properties. + * Creates a new SerializedTaxonomy instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.ITagField=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField instance + * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy instance */ - TagField.create = function create(properties) { - return new TagField(properties); + SerializedTaxonomy.create = function create(properties) { + return new SerializedTaxonomy(properties); }; /** - * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. + * Encodes the specified SerializedTaxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.ITagField} message TagField message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy} message SerializedTaxonomy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagField.encode = function encode(message, writer) { + SerializedTaxonomy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) - $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.enumValue != null && message.hasOwnProperty("enumValue")) - $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.encode(message.enumValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.policyTags != null && message.policyTags.length) + for (var i = 0; i < message.policyTags.length; ++i) + $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.encode(message.policyTags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. + * Encodes the specified SerializedTaxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.ITagField} message TagField message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy} message SerializedTaxonomy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagField.encodeDelimited = function encodeDelimited(message, writer) { + SerializedTaxonomy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TagField message from the specified reader or buffer. + * Decodes a SerializedTaxonomy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField + * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagField.decode = function decode(reader, length) { + SerializedTaxonomy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagField(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9914,19 +15312,12 @@ message.displayName = reader.string(); break; case 2: - message.doubleValue = reader.double(); + message.description = reader.string(); break; case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.decode(reader, reader.uint32()); + if (!(message.policyTags && message.policyTags.length)) + message.policyTags = []; + message.policyTags.push($root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -9937,378 +15328,397 @@ }; /** - * Decodes a TagField message from the specified reader or buffer, length delimited. + * Decodes a SerializedTaxonomy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField + * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagField.decodeDelimited = function decodeDelimited(reader) { + SerializedTaxonomy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TagField message. + * Verifies a SerializedTaxonomy message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TagField.verify = function verify(message) { + SerializedTaxonomy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - properties.kind = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); - if (error) - return "timestampValue." + error; - } - } - if (message.enumValue != null && message.hasOwnProperty("enumValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify(message.enumValue); + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.policyTags != null && message.hasOwnProperty("policyTags")) { + if (!Array.isArray(message.policyTags)) + return "policyTags: array expected"; + for (var i = 0; i < message.policyTags.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify(message.policyTags[i]); if (error) - return "enumValue." + error; + return "policyTags." + error; } } return null; }; /** - * Creates a TagField message from a plain object. Also converts values to their respective internal types. + * Creates a SerializedTaxonomy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField + * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy */ - TagField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagField) + SerializedTaxonomy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagField(); + var message = new $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy(); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.timestampValue != null) { - if (typeof object.timestampValue !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagField.timestampValue: object expected"); - message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); - } - if (object.enumValue != null) { - if (typeof object.enumValue !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagField.enumValue: object expected"); - message.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.fromObject(object.enumValue); + if (object.description != null) + message.description = String(object.description); + if (object.policyTags) { + if (!Array.isArray(object.policyTags)) + throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedTaxonomy.policyTags: array expected"); + message.policyTags = []; + for (var i = 0; i < object.policyTags.length; ++i) { + if (typeof object.policyTags[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedTaxonomy.policyTags: object expected"); + message.policyTags[i] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.fromObject(object.policyTags[i]); + } } return message; }; /** - * Creates a plain object from a TagField message. Also converts values to other types if specified. + * Creates a plain object from a SerializedTaxonomy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @static - * @param {google.cloud.datacatalog.v1beta1.TagField} message TagField + * @param {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} message SerializedTaxonomy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TagField.toObject = function toObject(message, options) { + SerializedTaxonomy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.kind = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); - if (options.oneofs) - object.kind = "timestampValue"; - } - if (message.enumValue != null && message.hasOwnProperty("enumValue")) { - object.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.toObject(message.enumValue, options); - if (options.oneofs) - object.kind = "enumValue"; + if (options.arrays || options.defaults) + object.policyTags = []; + if (options.defaults) { + object.displayName = ""; + object.description = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.policyTags && message.policyTags.length) { + object.policyTags = []; + for (var j = 0; j < message.policyTags.length; ++j) + object.policyTags[j] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.toObject(message.policyTags[j], options); } return object; }; /** - * Converts this TagField to JSON. + * Converts this SerializedTaxonomy to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagField + * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy * @instance * @returns {Object.} JSON object */ - TagField.prototype.toJSON = function toJSON() { + SerializedTaxonomy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TagField.EnumValue = (function() { + return SerializedTaxonomy; + })(); - /** - * Properties of an EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @interface IEnumValue - * @property {string|null} [displayName] EnumValue displayName - */ + v1beta1.SerializedPolicyTag = (function() { - /** - * Constructs a new EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue=} [properties] Properties to set - */ - function EnumValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a SerializedPolicyTag. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface ISerializedPolicyTag + * @property {string|null} [displayName] SerializedPolicyTag displayName + * @property {string|null} [description] SerializedPolicyTag description + * @property {Array.|null} [childPolicyTags] SerializedPolicyTag childPolicyTags + */ - /** - * EnumValue displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @instance - */ - EnumValue.prototype.displayName = ""; + /** + * Constructs a new SerializedPolicyTag. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents a SerializedPolicyTag. + * @implements ISerializedPolicyTag + * @constructor + * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag=} [properties] Properties to set + */ + function SerializedPolicyTag(properties) { + this.childPolicyTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; + /** + * SerializedPolicyTag displayName. + * @member {string} displayName + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @instance + */ + SerializedPolicyTag.prototype.displayName = ""; - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - return writer; - }; + /** + * SerializedPolicyTag description. + * @member {string} description + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @instance + */ + SerializedPolicyTag.prototype.description = ""; - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SerializedPolicyTag childPolicyTags. + * @member {Array.} childPolicyTags + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @instance + */ + SerializedPolicyTag.prototype.childPolicyTags = $util.emptyArray; - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new SerializedPolicyTag instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag instance + */ + SerializedPolicyTag.create = function create(properties) { + return new SerializedPolicyTag(properties); + }; - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified SerializedPolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag} message SerializedPolicyTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SerializedPolicyTag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.childPolicyTags != null && message.childPolicyTags.length) + for (var i = 0; i < message.childPolicyTags.length; ++i) + $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.encode(message.childPolicyTags[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Verifies an EnumValue message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; + /** + * Encodes the specified SerializedPolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag} message SerializedPolicyTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SerializedPolicyTag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; + /** + * Decodes a SerializedPolicyTag message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SerializedPolicyTag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.childPolicyTags && message.childPolicyTags.length)) + message.childPolicyTags = []; + message.childPolicyTags.push($root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SerializedPolicyTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SerializedPolicyTag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SerializedPolicyTag message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SerializedPolicyTag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.childPolicyTags != null && message.hasOwnProperty("childPolicyTags")) { + if (!Array.isArray(message.childPolicyTags)) + return "childPolicyTags: array expected"; + for (var i = 0; i < message.childPolicyTags.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify(message.childPolicyTags[i]); + if (error) + return "childPolicyTags." + error; + } + } + return null; + }; - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.EnumValue} message EnumValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + /** + * Creates a SerializedPolicyTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag + */ + SerializedPolicyTag.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag) return object; - }; + var message = new $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.childPolicyTags) { + if (!Array.isArray(object.childPolicyTags)) + throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedPolicyTag.childPolicyTags: array expected"); + message.childPolicyTags = []; + for (var i = 0; i < object.childPolicyTags.length; ++i) { + if (typeof object.childPolicyTags[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedPolicyTag.childPolicyTags: object expected"); + message.childPolicyTags[i] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.fromObject(object.childPolicyTags[i]); + } + } + return message; + }; - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @instance - * @returns {Object.} JSON object - */ - EnumValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a SerializedPolicyTag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @static + * @param {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} message SerializedPolicyTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SerializedPolicyTag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.childPolicyTags = []; + if (options.defaults) { + object.displayName = ""; + object.description = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.childPolicyTags && message.childPolicyTags.length) { + object.childPolicyTags = []; + for (var j = 0; j < message.childPolicyTags.length; ++j) + object.childPolicyTags[j] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.toObject(message.childPolicyTags[j], options); + } + return object; + }; - return EnumValue; - })(); + /** + * Converts this SerializedPolicyTag to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag + * @instance + * @returns {Object.} JSON object + */ + SerializedPolicyTag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return TagField; + return SerializedPolicyTag; })(); - v1beta1.TagTemplate = (function() { + v1beta1.ImportTaxonomiesRequest = (function() { /** - * Properties of a TagTemplate. + * Properties of an ImportTaxonomiesRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITagTemplate - * @property {string|null} [name] TagTemplate name - * @property {string|null} [displayName] TagTemplate displayName - * @property {Object.|null} [fields] TagTemplate fields + * @interface IImportTaxonomiesRequest + * @property {string|null} [parent] ImportTaxonomiesRequest parent + * @property {google.cloud.datacatalog.v1beta1.IInlineSource|null} [inlineSource] ImportTaxonomiesRequest inlineSource */ /** - * Constructs a new TagTemplate. + * Constructs a new ImportTaxonomiesRequest. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TagTemplate. - * @implements ITagTemplate + * @classdesc Represents an ImportTaxonomiesRequest. + * @implements IImportTaxonomiesRequest * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest=} [properties] Properties to set */ - function TagTemplate(properties) { - this.fields = {}; + function ImportTaxonomiesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10316,109 +15726,102 @@ } /** - * TagTemplate name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * ImportTaxonomiesRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @instance */ - TagTemplate.prototype.name = ""; + ImportTaxonomiesRequest.prototype.parent = ""; /** - * TagTemplate displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * ImportTaxonomiesRequest inlineSource. + * @member {google.cloud.datacatalog.v1beta1.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @instance */ - TagTemplate.prototype.displayName = ""; + ImportTaxonomiesRequest.prototype.inlineSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TagTemplate fields. - * @member {Object.} fields - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * ImportTaxonomiesRequest source. + * @member {"inlineSource"|undefined} source + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @instance */ - TagTemplate.prototype.fields = $util.emptyObject; + Object.defineProperty(ImportTaxonomiesRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TagTemplate instance using the specified properties. + * Creates a new ImportTaxonomiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate instance + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest instance */ - TagTemplate.create = function create(properties) { - return new TagTemplate(properties); + ImportTaxonomiesRequest.create = function create(properties) { + return new ImportTaxonomiesRequest(properties); }; /** - * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. + * Encodes the specified ImportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate} message TagTemplate message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} message ImportTaxonomiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagTemplate.encode = function encode(message, writer) { + ImportTaxonomiesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.fields != null && message.hasOwnProperty("fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) + $root.google.cloud.datacatalog.v1beta1.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. + * Encodes the specified ImportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate} message TagTemplate message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} message ImportTaxonomiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagTemplate.encodeDelimited = function encodeDelimited(message, writer) { + ImportTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TagTemplate message from the specified reader or buffer. + * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagTemplate.decode = function decode(reader, length) { + ImportTaxonomiesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagTemplate(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 3: - reader.skip().pos++; - if (message.fields === $util.emptyObject) - message.fields = {}; - key = reader.string(); - reader.pos++; - message.fields[key] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); + message.inlineSource = $root.google.cloud.datacatalog.v1beta1.InlineSource.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10429,248 +15832,206 @@ }; /** - * Decodes a TagTemplate message from the specified reader or buffer, length delimited. + * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagTemplate.decodeDelimited = function decodeDelimited(reader) { + ImportTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TagTemplate message. + * Verifies an ImportTaxonomiesRequest message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TagTemplate.verify = function verify(message) { + ImportTaxonomiesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.fields[key[i]]); + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.datacatalog.v1beta1.InlineSource.verify(message.inlineSource); if (error) - return "fields." + error; + return "inlineSource." + error; } } return null; }; /** - * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. + * Creates an ImportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest */ - TagTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagTemplate) + ImportTaxonomiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagTemplate(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplate.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplate.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.fields[keys[i]]); - } + var message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.datacatalog.v1beta1.InlineSource.fromObject(object.inlineSource); } return message; }; /** - * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. + * Creates a plain object from an ImportTaxonomiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @static - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} message TagTemplate + * @param {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} message ImportTaxonomiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TagTemplate.toObject = function toObject(message, options) { + ImportTaxonomiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.fields[keys2[j]], options); + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.datacatalog.v1beta1.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; } return object; }; /** - * Converts this TagTemplate to JSON. + * Converts this ImportTaxonomiesRequest to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest * @instance * @returns {Object.} JSON object */ - TagTemplate.prototype.toJSON = function toJSON() { + ImportTaxonomiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TagTemplate; + return ImportTaxonomiesRequest; })(); - v1beta1.TagTemplateField = (function() { + v1beta1.InlineSource = (function() { /** - * Properties of a TagTemplateField. + * Properties of an InlineSource. * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITagTemplateField - * @property {string|null} [name] TagTemplateField name - * @property {string|null} [displayName] TagTemplateField displayName - * @property {google.cloud.datacatalog.v1beta1.IFieldType|null} [type] TagTemplateField type + * @interface IInlineSource + * @property {Array.|null} [taxonomies] InlineSource taxonomies */ /** - * Constructs a new TagTemplateField. + * Constructs a new InlineSource. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TagTemplateField. - * @implements ITagTemplateField + * @classdesc Represents an InlineSource. + * @implements IInlineSource * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField=} [properties] Properties to set - */ - function TagTemplateField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagTemplateField name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.name = ""; - - /** - * TagTemplateField displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance + * @param {google.cloud.datacatalog.v1beta1.IInlineSource=} [properties] Properties to set */ - TagTemplateField.prototype.displayName = ""; + function InlineSource(properties) { + this.taxonomies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * TagTemplateField type. - * @member {google.cloud.datacatalog.v1beta1.IFieldType|null|undefined} type - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * InlineSource taxonomies. + * @member {Array.} taxonomies + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @instance */ - TagTemplateField.prototype.type = null; + InlineSource.prototype.taxonomies = $util.emptyArray; /** - * Creates a new TagTemplateField instance using the specified properties. + * Creates a new InlineSource instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField instance + * @param {google.cloud.datacatalog.v1beta1.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource instance */ - TagTemplateField.create = function create(properties) { - return new TagTemplateField(properties); + InlineSource.create = function create(properties) { + return new InlineSource(properties); }; /** - * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField} message TagTemplateField message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagTemplateField.encode = function encode(message, writer) { + InlineSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.type != null && message.hasOwnProperty("type")) - $root.google.cloud.datacatalog.v1beta1.FieldType.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.taxonomies != null && message.taxonomies.length) + for (var i = 0; i < message.taxonomies.length; ++i) + $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField} message TagTemplateField message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagTemplateField.encodeDelimited = function encodeDelimited(message, writer) { + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TagTemplateField message from the specified reader or buffer. + * Decodes an InlineSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField + * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagTemplateField.decode = function decode(reader, length) { + InlineSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagTemplateField(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.InlineSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - message.name = reader.string(); - break; case 1: - message.displayName = reader.string(); - break; - case 2: - message.type = $root.google.cloud.datacatalog.v1beta1.FieldType.decode(reader, reader.uint32()); + if (!(message.taxonomies && message.taxonomies.length)) + message.taxonomies = []; + message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -10681,130 +16042,125 @@ }; /** - * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. + * Decodes an InlineSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField + * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagTemplateField.decodeDelimited = function decodeDelimited(reader) { + InlineSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TagTemplateField message. + * Verifies an InlineSource message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TagTemplateField.verify = function verify(message) { + InlineSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.cloud.datacatalog.v1beta1.FieldType.verify(message.type); - if (error) - return "type." + error; + if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { + if (!Array.isArray(message.taxonomies)) + return "taxonomies: array expected"; + for (var i = 0; i < message.taxonomies.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify(message.taxonomies[i]); + if (error) + return "taxonomies." + error; + } } return null; }; /** - * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField + * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource */ - TagTemplateField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagTemplateField) + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.InlineSource) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagTemplateField(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplateField.type: object expected"); - message.type = $root.google.cloud.datacatalog.v1beta1.FieldType.fromObject(object.type); + var message = new $root.google.cloud.datacatalog.v1beta1.InlineSource(); + if (object.taxonomies) { + if (!Array.isArray(object.taxonomies)) + throw TypeError(".google.cloud.datacatalog.v1beta1.InlineSource.taxonomies: array expected"); + message.taxonomies = []; + for (var i = 0; i < object.taxonomies.length; ++i) { + if (typeof object.taxonomies[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.InlineSource.taxonomies: object expected"); + message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.fromObject(object.taxonomies[i]); + } } return message; }; /** - * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @static - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} message TagTemplateField + * @param {google.cloud.datacatalog.v1beta1.InlineSource} message InlineSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TagTemplateField.toObject = function toObject(message, options) { + InlineSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayName = ""; - object.type = null; - object.name = ""; + if (options.arrays || options.defaults) + object.taxonomies = []; + if (message.taxonomies && message.taxonomies.length) { + object.taxonomies = []; + for (var j = 0; j < message.taxonomies.length; ++j) + object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.toObject(message.taxonomies[j], options); } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.cloud.datacatalog.v1beta1.FieldType.toObject(message.type, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this TagTemplateField to JSON. + * Converts this InlineSource to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField + * @memberof google.cloud.datacatalog.v1beta1.InlineSource * @instance * @returns {Object.} JSON object */ - TagTemplateField.prototype.toJSON = function toJSON() { + InlineSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TagTemplateField; + return InlineSource; })(); - v1beta1.FieldType = (function() { + v1beta1.ImportTaxonomiesResponse = (function() { /** - * Properties of a FieldType. + * Properties of an ImportTaxonomiesResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @interface IFieldType - * @property {google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null} [primitiveType] FieldType primitiveType - * @property {google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null} [enumType] FieldType enumType + * @interface IImportTaxonomiesResponse + * @property {Array.|null} [taxonomies] ImportTaxonomiesResponse taxonomies */ /** - * Constructs a new FieldType. + * Constructs a new ImportTaxonomiesResponse. * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a FieldType. - * @implements IFieldType + * @classdesc Represents an ImportTaxonomiesResponse. + * @implements IImportTaxonomiesResponse * @constructor - * @param {google.cloud.datacatalog.v1beta1.IFieldType=} [properties] Properties to set + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse=} [properties] Properties to set */ - function FieldType(properties) { + function ImportTaxonomiesResponse(properties) { + this.taxonomies = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10812,102 +16168,78 @@ } /** - * FieldType primitiveType. - * @member {google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType} primitiveType - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @instance - */ - FieldType.prototype.primitiveType = 0; - - /** - * FieldType enumType. - * @member {google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null|undefined} enumType - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @instance - */ - FieldType.prototype.enumType = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FieldType typeDecl. - * @member {"primitiveType"|"enumType"|undefined} typeDecl - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * ImportTaxonomiesResponse taxonomies. + * @member {Array.} taxonomies + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @instance */ - Object.defineProperty(FieldType.prototype, "typeDecl", { - get: $util.oneOfGetter($oneOfFields = ["primitiveType", "enumType"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; /** - * Creates a new FieldType instance using the specified properties. + * Creates a new ImportTaxonomiesResponse instance using the specified properties. * @function create - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.IFieldType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType instance + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse instance */ - FieldType.create = function create(properties) { - return new FieldType(properties); + ImportTaxonomiesResponse.create = function create(properties) { + return new ImportTaxonomiesResponse(properties); }; /** - * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. + * Encodes the specified ImportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.IFieldType} message FieldType message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse} message ImportTaxonomiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldType.encode = function encode(message, writer) { + ImportTaxonomiesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primitiveType); - if (message.enumType != null && message.hasOwnProperty("enumType")) - $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.encode(message.enumType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.taxonomies != null && message.taxonomies.length) + for (var i = 0; i < message.taxonomies.length; ++i) + $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. + * Encodes the specified ImportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.IFieldType} message FieldType message or plain object to encode + * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse} message ImportTaxonomiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldType.encodeDelimited = function encodeDelimited(message, writer) { + ImportTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldType message from the specified reader or buffer. + * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldType.decode = function decode(reader, length) { + ImportTaxonomiesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.primitiveType = reader.int32(); - break; - case 2: - message.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.decode(reader, reader.uint32()); + if (!(message.taxonomies && message.taxonomies.length)) + message.taxonomies = []; + message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -10918,554 +16250,579 @@ }; /** - * Decodes a FieldType message from the specified reader or buffer, length delimited. + * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldType.decodeDelimited = function decodeDelimited(reader) { + ImportTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldType message. + * Verifies an ImportTaxonomiesResponse message. * @function verify - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldType.verify = function verify(message) { + ImportTaxonomiesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { - properties.typeDecl = 1; - switch (message.primitiveType) { - default: - return "primitiveType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (properties.typeDecl === 1) - return "typeDecl: multiple values"; - properties.typeDecl = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify(message.enumType); + if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { + if (!Array.isArray(message.taxonomies)) + return "taxonomies: array expected"; + for (var i = 0; i < message.taxonomies.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomies[i]); if (error) - return "enumType." + error; + return "taxonomies." + error; } } return null; }; /** - * Creates a FieldType message from a plain object. Also converts values to their respective internal types. + * Creates an ImportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType + * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse */ - FieldType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType) + ImportTaxonomiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse) return object; - var message = new $root.google.cloud.datacatalog.v1beta1.FieldType(); - switch (object.primitiveType) { - case "PRIMITIVE_TYPE_UNSPECIFIED": - case 0: - message.primitiveType = 0; - break; - case "DOUBLE": - case 1: - message.primitiveType = 1; - break; - case "STRING": - case 2: - message.primitiveType = 2; - break; - case "BOOL": - case 3: - message.primitiveType = 3; - break; - case "TIMESTAMP": - case 4: - message.primitiveType = 4; - break; - } - if (object.enumType != null) { - if (typeof object.enumType !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.enumType: object expected"); - message.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.fromObject(object.enumType); + var message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse(); + if (object.taxonomies) { + if (!Array.isArray(object.taxonomies)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.taxonomies: array expected"); + message.taxonomies = []; + for (var i = 0; i < object.taxonomies.length; ++i) { + if (typeof object.taxonomies[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.taxonomies: object expected"); + message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomies[i]); + } } return message; }; /** - * Creates a plain object from a FieldType message. Also converts values to other types if specified. + * Creates a plain object from an ImportTaxonomiesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType} message FieldType + * @param {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} message ImportTaxonomiesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldType.toObject = function toObject(message, options) { + ImportTaxonomiesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { - object.primitiveType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType[message.primitiveType] : message.primitiveType; - if (options.oneofs) - object.typeDecl = "primitiveType"; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - object.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.toObject(message.enumType, options); - if (options.oneofs) - object.typeDecl = "enumType"; + if (options.arrays || options.defaults) + object.taxonomies = []; + if (message.taxonomies && message.taxonomies.length) { + object.taxonomies = []; + for (var j = 0; j < message.taxonomies.length; ++j) + object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomies[j], options); } return object; }; /** - * Converts this FieldType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.FieldType + * Converts this ImportTaxonomiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse + * @instance + * @returns {Object.} JSON object + */ + ImportTaxonomiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportTaxonomiesResponse; + })(); + + v1beta1.ExportTaxonomiesRequest = (function() { + + /** + * Properties of an ExportTaxonomiesRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IExportTaxonomiesRequest + * @property {string|null} [parent] ExportTaxonomiesRequest parent + * @property {Array.|null} [taxonomies] ExportTaxonomiesRequest taxonomies + * @property {boolean|null} [serializedTaxonomies] ExportTaxonomiesRequest serializedTaxonomies + */ + + /** + * Constructs a new ExportTaxonomiesRequest. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents an ExportTaxonomiesRequest. + * @implements IExportTaxonomiesRequest + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest=} [properties] Properties to set + */ + function ExportTaxonomiesRequest(properties) { + this.taxonomies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportTaxonomiesRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest * @instance - * @returns {Object.} JSON object */ - FieldType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - FieldType.EnumType = (function() { - - /** - * Properties of an EnumType. - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @interface IEnumType - * @property {Array.|null} [allowedValues] EnumType allowedValues - */ - - /** - * Constructs a new EnumType. - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @classdesc Represents an EnumType. - * @implements IEnumType - * @constructor - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType=} [properties] Properties to set - */ - function EnumType(properties) { - this.allowedValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumType allowedValues. - * @member {Array.} allowedValues - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @instance - */ - EnumType.prototype.allowedValues = $util.emptyArray; + ExportTaxonomiesRequest.prototype.parent = ""; - /** - * Creates a new EnumType instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType instance - */ - EnumType.create = function create(properties) { - return new EnumType(properties); - }; + /** + * ExportTaxonomiesRequest taxonomies. + * @member {Array.} taxonomies + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @instance + */ + ExportTaxonomiesRequest.prototype.taxonomies = $util.emptyArray; - /** - * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType} message EnumType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedValues != null && message.allowedValues.length) - for (var i = 0; i < message.allowedValues.length; ++i) - $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.encode(message.allowedValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * ExportTaxonomiesRequest serializedTaxonomies. + * @member {boolean} serializedTaxonomies + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @instance + */ + ExportTaxonomiesRequest.prototype.serializedTaxonomies = false; - /** - * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType} message EnumType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes an EnumType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.allowedValues && message.allowedValues.length)) - message.allowedValues = []; - message.allowedValues.push($root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ExportTaxonomiesRequest destination. + * @member {"serializedTaxonomies"|undefined} destination + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @instance + */ + Object.defineProperty(ExportTaxonomiesRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["serializedTaxonomies"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes an EnumType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ExportTaxonomiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest instance + */ + ExportTaxonomiesRequest.create = function create(properties) { + return new ExportTaxonomiesRequest(properties); + }; - /** - * Verifies an EnumType message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { - if (!Array.isArray(message.allowedValues)) - return "allowedValues: array expected"; - for (var i = 0; i < message.allowedValues.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify(message.allowedValues[i]); - if (error) - return "allowedValues." + error; - } - } - return null; - }; + /** + * Encodes the specified ExportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} message ExportTaxonomiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTaxonomiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.taxonomies != null && message.taxonomies.length) + for (var i = 0; i < message.taxonomies.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taxonomies[i]); + if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.serializedTaxonomies); + return writer; + }; - /** - * Creates an EnumType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType - */ - EnumType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType(); - if (object.allowedValues) { - if (!Array.isArray(object.allowedValues)) - throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowedValues: array expected"); - message.allowedValues = []; - for (var i = 0; i < object.allowedValues.length; ++i) { - if (typeof object.allowedValues[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowedValues: object expected"); - message.allowedValues[i] = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.fromObject(object.allowedValues[i]); - } - } - return message; - }; + /** + * Encodes the specified ExportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} message ExportTaxonomiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an EnumType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType} message EnumType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedValues = []; - if (message.allowedValues && message.allowedValues.length) { - object.allowedValues = []; - for (var j = 0; j < message.allowedValues.length; ++j) - object.allowedValues[j] = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.toObject(message.allowedValues[j], options); + /** + * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTaxonomiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + if (!(message.taxonomies && message.taxonomies.length)) + message.taxonomies = []; + message.taxonomies.push(reader.string()); + break; + case 3: + message.serializedTaxonomies = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } - return object; - }; + } + return message; + }; - /** - * Converts this EnumType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @instance - * @returns {Object.} JSON object - */ - EnumType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - EnumType.EnumValue = (function() { + /** + * Verifies an ExportTaxonomiesRequest message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTaxonomiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { + if (!Array.isArray(message.taxonomies)) + return "taxonomies: array expected"; + for (var i = 0; i < message.taxonomies.length; ++i) + if (!$util.isString(message.taxonomies[i])) + return "taxonomies: string[] expected"; + } + if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) { + properties.destination = 1; + if (typeof message.serializedTaxonomies !== "boolean") + return "serializedTaxonomies: boolean expected"; + } + return null; + }; - /** - * Properties of an EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @interface IEnumValue - * @property {string|null} [displayName] EnumValue displayName - */ + /** + * Creates an ExportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest + */ + ExportTaxonomiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taxonomies) { + if (!Array.isArray(object.taxonomies)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.taxonomies: array expected"); + message.taxonomies = []; + for (var i = 0; i < object.taxonomies.length; ++i) + message.taxonomies[i] = String(object.taxonomies[i]); + } + if (object.serializedTaxonomies != null) + message.serializedTaxonomies = Boolean(object.serializedTaxonomies); + return message; + }; - /** - * Constructs a new EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue=} [properties] Properties to set - */ - function EnumValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from an ExportTaxonomiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @static + * @param {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} message ExportTaxonomiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTaxonomiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.taxonomies = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taxonomies && message.taxonomies.length) { + object.taxonomies = []; + for (var j = 0; j < message.taxonomies.length; ++j) + object.taxonomies[j] = message.taxonomies[j]; + } + if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) { + object.serializedTaxonomies = message.serializedTaxonomies; + if (options.oneofs) + object.destination = "serializedTaxonomies"; + } + return object; + }; - /** - * EnumValue displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @instance - */ - EnumValue.prototype.displayName = ""; + /** + * Converts this ExportTaxonomiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + * @instance + * @returns {Object.} JSON object + */ + ExportTaxonomiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; + return ExportTaxonomiesRequest; + })(); - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - return writer; - }; + v1beta1.ExportTaxonomiesResponse = (function() { - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an ExportTaxonomiesResponse. + * @memberof google.cloud.datacatalog.v1beta1 + * @interface IExportTaxonomiesResponse + * @property {Array.|null} [taxonomies] ExportTaxonomiesResponse taxonomies + */ - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new ExportTaxonomiesResponse. + * @memberof google.cloud.datacatalog.v1beta1 + * @classdesc Represents an ExportTaxonomiesResponse. + * @implements IExportTaxonomiesResponse + * @constructor + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse=} [properties] Properties to set + */ + function ExportTaxonomiesResponse(properties) { + this.taxonomies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ExportTaxonomiesResponse taxonomies. + * @member {Array.} taxonomies + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @instance + */ + ExportTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - /** - * Verifies an EnumValue message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; + /** + * Creates a new ExportTaxonomiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse instance + */ + ExportTaxonomiesResponse.create = function create(properties) { + return new ExportTaxonomiesResponse(properties); + }; - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; + /** + * Encodes the specified ExportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse} message ExportTaxonomiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTaxonomiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.taxonomies != null && message.taxonomies.length) + for (var i = 0; i < message.taxonomies.length; ++i) + $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse} message ExportTaxonomiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} message EnumValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; + /** + * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTaxonomiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.taxonomies && message.taxonomies.length)) + message.taxonomies = []; + message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @instance - * @returns {Object.} JSON object - */ - EnumValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return EnumValue; - })(); + /** + * Verifies an ExportTaxonomiesResponse message. + * @function verify + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTaxonomiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { + if (!Array.isArray(message.taxonomies)) + return "taxonomies: array expected"; + for (var i = 0; i < message.taxonomies.length; ++i) { + var error = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify(message.taxonomies[i]); + if (error) + return "taxonomies." + error; + } + } + return null; + }; - return EnumType; - })(); + /** + * Creates an ExportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse + */ + ExportTaxonomiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse) + return object; + var message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse(); + if (object.taxonomies) { + if (!Array.isArray(object.taxonomies)) + throw TypeError(".google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.taxonomies: array expected"); + message.taxonomies = []; + for (var i = 0; i < object.taxonomies.length; ++i) { + if (typeof object.taxonomies[i] !== "object") + throw TypeError(".google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.taxonomies: object expected"); + message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.fromObject(object.taxonomies[i]); + } + } + return message; + }; /** - * PrimitiveType enum. - * @name google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType - * @enum {string} - * @property {number} PRIMITIVE_TYPE_UNSPECIFIED=0 PRIMITIVE_TYPE_UNSPECIFIED value - * @property {number} DOUBLE=1 DOUBLE value - * @property {number} STRING=2 STRING value - * @property {number} BOOL=3 BOOL value - * @property {number} TIMESTAMP=4 TIMESTAMP value + * Creates a plain object from an ExportTaxonomiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @static + * @param {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} message ExportTaxonomiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FieldType.PrimitiveType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIMITIVE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOUBLE"] = 1; - values[valuesById[2] = "STRING"] = 2; - values[valuesById[3] = "BOOL"] = 3; - values[valuesById[4] = "TIMESTAMP"] = 4; - return values; - })(); + ExportTaxonomiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.taxonomies = []; + if (message.taxonomies && message.taxonomies.length) { + object.taxonomies = []; + for (var j = 0; j < message.taxonomies.length; ++j) + object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.toObject(message.taxonomies[j], options); + } + return object; + }; - return FieldType; + /** + * Converts this ExportTaxonomiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + * @instance + * @returns {Object.} JSON object + */ + ExportTaxonomiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExportTaxonomiesResponse; })(); return v1beta1; @@ -11486,26 +16843,52 @@ */ var api = {}; - api.Http = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new Http. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11513,91 +16896,143 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && message.hasOwnProperty("history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && message.hasOwnProperty("plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && message.hasOwnProperty("singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -11608,597 +17043,407 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value */ - HttpRule.prototype.patch = ""; + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - HttpRule.prototype.body = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - HttpRule.prototype.responseBody = ""; + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12206,88 +17451,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -12298,142 +17546,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {string} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12441,117 +17690,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = ""; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = ""; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -12562,180 +17903,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; } + } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12743,88 +18144,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -12835,96 +18236,96 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return CustomHttpPattern; })(); return api; @@ -17098,6 +22499,7 @@ * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace * @property {string|null} [rubyPackage] FileOptions rubyPackage * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ /** @@ -17110,6 +22512,7 @@ */ function FileOptions(properties) { this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17284,6 +22687,14 @@ */ FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** * Creates a new FileOptions instance using the specified properties. * @function create @@ -17351,6 +22762,9 @@ if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; @@ -17450,6 +22864,11 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -17560,6 +22979,15 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } return null; }; @@ -17637,6 +23065,16 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } return message; }; @@ -17653,8 +23091,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } if (options.defaults) { object.javaPackage = ""; object.javaOuterClassname = ""; @@ -17722,6 +23162,11 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } return object; }; diff --git a/packages/google-cloud-datacatalog/protos/protos.json b/packages/google-cloud-datacatalog/protos/protos.json index f2b172b08e5..41f514eb64c 100644 --- a/packages/google-cloud-datacatalog/protos/protos.json +++ b/packages/google-cloud-datacatalog/protos/protos.json @@ -11,9 +11,437 @@ "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog", "java_multiple_files": true, - "java_package": "com.google.cloud.datacatalog" + "java_package": "com.google.cloud.datacatalog.v1beta1", + "java_outer_classname": "PolicyTagManagerSerializationProto" }, "nested": { + "Tag": { + "options": { + "(google.api.resource).type": "datacatalog.googleapis.com/Tag", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" + }, + "oneofs": { + "scope": { + "oneof": [ + "column" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "template": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "templateDisplayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "column": { + "type": "string", + "id": 4 + }, + "fields": { + "keyType": "string", + "type": "TagField", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TagField": { + "oneofs": { + "kind": { + "oneof": [ + "doubleValue", + "stringValue", + "boolValue", + "timestampValue", + "enumValue" + ] + } + }, + "fields": { + "displayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "doubleValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "timestampValue": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "enumValue": { + "type": "EnumValue", + "id": 6 + } + }, + "nested": { + "EnumValue": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + } + } + } + } + }, + "TagTemplate": { + "options": { + "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "fields": { + "keyType": "string", + "type": "TagTemplateField", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TagTemplateField": { + "options": { + "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplateField", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" + }, + "fields": { + "name": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "FieldType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FieldType": { + "oneofs": { + "typeDecl": { + "oneof": [ + "primitiveType", + "enumType" + ] + } + }, + "fields": { + "primitiveType": { + "type": "PrimitiveType", + "id": 1 + }, + "enumType": { + "type": "EnumType", + "id": 2 + } + }, + "nested": { + "EnumType": { + "fields": { + "allowedValues": { + "rule": "repeated", + "type": "EnumValue", + "id": 1 + } + }, + "nested": { + "EnumValue": { + "fields": { + "displayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "PrimitiveType": { + "values": { + "PRIMITIVE_TYPE_UNSPECIFIED": 0, + "DOUBLE": 1, + "STRING": 2, + "BOOL": 3, + "TIMESTAMP": 4 + } + } + } + }, + "SystemTimestamps": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GcsFilesetSpec": { + "fields": { + "filePatterns": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleGcsFileSpecs": { + "rule": "repeated", + "type": "GcsFileSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GcsFileSpec": { + "fields": { + "filePath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gcsTimestamps": { + "type": "SystemTimestamps", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sizeBytes": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Schema": { + "fields": { + "columns": { + "rule": "repeated", + "type": "ColumnSchema", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ColumnSchema": { + "fields": { + "column": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subcolumns": { + "rule": "repeated", + "type": "ColumnSchema", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchCatalogResult": { + "fields": { + "searchResultType": { + "type": "SearchResultType", + "id": 1 + }, + "searchResultSubtype": { + "type": "string", + "id": 2 + }, + "relativeResourceName": { + "type": "string", + "id": 3 + }, + "linkedResource": { + "type": "string", + "id": 4 + } + } + }, + "SearchResultType": { + "values": { + "SEARCH_RESULT_TYPE_UNSPECIFIED": 0, + "ENTRY": 1, + "TAG_TEMPLATE": 2, + "ENTRY_GROUP": 3 + } + }, + "BigQueryTableSpec": { + "oneofs": { + "typeSpec": { + "oneof": [ + "viewSpec", + "tableSpec" + ] + } + }, + "fields": { + "tableSourceType": { + "type": "TableSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "viewSpec": { + "type": "ViewSpec", + "id": 2 + }, + "tableSpec": { + "type": "TableSpec", + "id": 3 + } + } + }, + "TableSourceType": { + "values": { + "TABLE_SOURCE_TYPE_UNSPECIFIED": 0, + "BIGQUERY_VIEW": 2, + "BIGQUERY_TABLE": 5 + } + }, + "ViewSpec": { + "fields": { + "viewQuery": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "TableSpec": { + "fields": { + "groupedEntry": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" + } + } + } + }, + "BigQueryDateShardedSpec": { + "fields": { + "dataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" + } + }, + "tablePrefix": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "shardCount": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "DataCatalog": { "options": { "(google.api.default_host)": "datacatalog.googleapis.com", @@ -776,430 +1204,526 @@ } } }, - "GcsFilesetSpec": { - "fields": { - "filePatterns": { - "rule": "repeated", - "type": "string", - "id": 1, + "PolicyTagManager": { + "options": { + "(google.api.default_host)": "datacatalog.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateTaxonomy": { + "requestType": "CreateTaxonomyRequest", + "responseType": "Taxonomy", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/taxonomies", + "(google.api.http).body": "taxonomy", + "(google.api.method_signature)": "parent,taxonomy" } }, - "sampleGcsFileSpecs": { - "rule": "repeated", - "type": "GcsFileSpec", - "id": 2, + "DeleteTaxonomy": { + "requestType": "DeleteTaxonomyRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/taxonomies/*}", + "(google.api.method_signature)": "name" } - } - } - }, - "GcsFileSpec": { - "fields": { - "filePath": { - "type": "string", - "id": 1, + }, + "UpdateTaxonomy": { + "requestType": "UpdateTaxonomyRequest", + "responseType": "Taxonomy", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).patch": "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}", + "(google.api.http).body": "taxonomy", + "(google.api.method_signature)": "taxonomy" } }, - "gcsTimestamps": { - "type": "SystemTimestamps", - "id": 2, + "ListTaxonomies": { + "requestType": "ListTaxonomiesRequest", + "responseType": "ListTaxonomiesResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/taxonomies", + "(google.api.method_signature)": "parent" } }, - "sizeBytes": { - "type": "int64", - "id": 4, + "GetTaxonomy": { + "requestType": "GetTaxonomyRequest", + "responseType": "Taxonomy", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/taxonomies/*}", + "(google.api.method_signature)": "name" } - } - } - }, - "SystemTimestamps": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 + "CreatePolicyTag": { + "requestType": "CreatePolicyTagRequest", + "responseType": "PolicyTag", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", + "(google.api.http).body": "policy_tag", + "(google.api.method_signature)": "parent,policy_tag" + } }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 3, + "DeletePolicyTag": { + "requestType": "DeletePolicyTagRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}", + "(google.api.method_signature)": "name" + } + }, + "UpdatePolicyTag": { + "requestType": "UpdatePolicyTagRequest", + "responseType": "PolicyTag", + "options": { + "(google.api.http).patch": "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}", + "(google.api.http).body": "policy_tag", + "(google.api.method_signature)": "policy_tag" + } + }, + "ListPolicyTags": { + "requestType": "ListPolicyTagsRequest", + "responseType": "ListPolicyTagsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", + "(google.api.method_signature)": "parent" + } + }, + "GetPolicyTag": { + "requestType": "GetPolicyTagRequest", + "responseType": "PolicyTag", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}", + "(google.api.method_signature)": "name" + } + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy", + "(google.api.http).additional_bindings.body": "*" + } + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*" + } + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*" } } } }, - "Schema": { + "Taxonomy": { + "options": { + "(google.api.resource).type": "datacatalog.googleapis.com/Taxonomy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}" + }, "fields": { - "columns": { - "rule": "repeated", - "type": "ColumnSchema", + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "activatedPolicyTypes": { + "rule": "repeated", + "type": "PolicyType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PolicyType": { + "values": { + "POLICY_TYPE_UNSPECIFIED": 0, + "FINE_GRAINED_ACCESS_CONTROL": 1 + } } } }, - "ColumnSchema": { + "PolicyTag": { + "options": { + "(google.api.resource).type": "datacatalog.googleapis.com/PolicyTag", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" + }, "fields": { - "column": { + "name": { "type": "string", - "id": 6, + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "type": { + "displayName": { "type": "string", - "id": 1, + "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "description": { + "description": { + "type": "string", + "id": 3 + }, + "parentPolicyTag": { + "type": "string", + "id": 4 + }, + "childPolicyTags": { + "rule": "repeated", "type": "string", - "id": 2, + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } - }, - "mode": { + } + } + }, + "CreateTaxonomyRequest": { + "fields": { + "parent": { "type": "string", - "id": 3, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" } }, - "subcolumns": { - "rule": "repeated", - "type": "ColumnSchema", - "id": 7, + "taxonomy": { + "type": "Taxonomy", + "id": 2 + } + } + }, + "DeleteTaxonomyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" } } } }, - "SearchCatalogResult": { + "UpdateTaxonomyRequest": { "fields": { - "searchResultType": { - "type": "SearchResultType", + "taxonomy": { + "type": "Taxonomy", "id": 1 }, - "searchResultSubtype": { - "type": "string", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 2 - }, - "relativeResourceName": { - "type": "string", - "id": 3 - }, - "linkedResource": { - "type": "string", - "id": 4 } } }, - "SearchResultType": { - "values": { - "SEARCH_RESULT_TYPE_UNSPECIFIED": 0, - "ENTRY": 1, - "TAG_TEMPLATE": 2, - "ENTRY_GROUP": 3 - } - }, - "BigQueryTableSpec": { - "oneofs": { - "typeSpec": { - "oneof": [ - "viewSpec", - "tableSpec" - ] - } - }, + "ListTaxonomiesRequest": { "fields": { - "tableSourceType": { - "type": "TableSourceType", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" } }, - "viewSpec": { - "type": "ViewSpec", + "pageSize": { + "type": "int32", "id": 2 }, - "tableSpec": { - "type": "TableSpec", + "pageToken": { + "type": "string", "id": 3 } } }, - "TableSourceType": { - "values": { - "TABLE_SOURCE_TYPE_UNSPECIFIED": 0, - "BIGQUERY_VIEW": 2, - "BIGQUERY_TABLE": 5 + "ListTaxonomiesResponse": { + "fields": { + "taxonomies": { + "rule": "repeated", + "type": "Taxonomy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "ViewSpec": { + "GetTaxonomyRequest": { "fields": { - "viewQuery": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" } } } }, - "TableSpec": { + "CreatePolicyTagRequest": { "fields": { - "groupedEntry": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/PolicyTag" } + }, + "policyTag": { + "type": "PolicyTag", + "id": 2 } } }, - "BigQueryDateShardedSpec": { + "DeletePolicyTagRequest": { "fields": { - "dataset": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" } + } + } + }, + "UpdatePolicyTagRequest": { + "fields": { + "policyTag": { + "type": "PolicyTag", + "id": 1 }, - "tablePrefix": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListPolicyTagsRequest": { + "fields": { + "parent": { "type": "string", - "id": 2, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/PolicyTag" } }, - "shardCount": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 } } }, - "Tag": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Tag", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }, - "oneofs": { - "scope": { - "oneof": [ - "column" - ] - } - }, + "ListPolicyTagsResponse": { "fields": { - "name": { - "type": "string", + "policyTags": { + "rule": "repeated", + "type": "PolicyTag", "id": 1 }, - "template": { + "nextPageToken": { "type": "string", - "id": 2, + "id": 2 + } + } + }, + "GetPolicyTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" } - }, - "templateDisplayName": { - "type": "string", - "id": 5, + } + } + }, + "PolicyTagManagerSerialization": { + "options": { + "(google.api.default_host)": "datacatalog.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ImportTaxonomies": { + "requestType": "ImportTaxonomiesRequest", + "responseType": "ImportTaxonomiesResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import", + "(google.api.http).body": "*" } }, - "column": { - "type": "string", - "id": 4 - }, - "fields": { - "keyType": "string", - "type": "TagField", - "id": 3, + "ExportTaxonomies": { + "requestType": "ExportTaxonomiesRequest", + "responseType": "ExportTaxonomiesResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" } } } }, - "TagField": { - "oneofs": { - "kind": { - "oneof": [ - "doubleValue", - "stringValue", - "boolValue", - "timestampValue", - "enumValue" - ] - } - }, + "SerializedTaxonomy": { "fields": { "displayName": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "doubleValue": { - "type": "double", + "description": { + "type": "string", "id": 2 }, - "stringValue": { - "type": "string", + "policyTags": { + "rule": "repeated", + "type": "SerializedPolicyTag", "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "timestampValue": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "enumValue": { - "type": "EnumValue", - "id": 6 - } - }, - "nested": { - "EnumValue": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - } - } } } }, - "TagTemplate": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplate", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }, + "SerializedPolicyTag": { "fields": { - "name": { - "type": "string", - "id": 1 - }, "displayName": { "type": "string", - "id": 2 - }, - "fields": { - "keyType": "string", - "type": "TagTemplateField", - "id": 3, + "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "description": { + "type": "string", + "id": 3 + }, + "childPolicyTags": { + "rule": "repeated", + "type": "SerializedPolicyTag", + "id": 4 } } }, - "TagTemplateField": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplateField", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" + "ImportTaxonomiesRequest": { + "oneofs": { + "source": { + "oneof": [ + "inlineSource" + ] + } }, "fields": { - "name": { + "parent": { "type": "string", - "id": 6, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" } }, - "displayName": { - "type": "string", - "id": 1 - }, - "type": { - "type": "FieldType", - "id": 2, + "inlineSource": { + "type": "InlineSource", + "id": 2 + } + } + }, + "InlineSource": { + "fields": { + "taxonomies": { + "rule": "repeated", + "type": "SerializedTaxonomy", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "FieldType": { + "ImportTaxonomiesResponse": { + "fields": { + "taxonomies": { + "rule": "repeated", + "type": "Taxonomy", + "id": 1 + } + } + }, + "ExportTaxonomiesRequest": { "oneofs": { - "typeDecl": { + "destination": { "oneof": [ - "primitiveType", - "enumType" + "serializedTaxonomies" ] } }, "fields": { - "primitiveType": { - "type": "PrimitiveType", - "id": 1 - }, - "enumType": { - "type": "EnumType", - "id": 2 - } - }, - "nested": { - "EnumType": { - "fields": { - "allowedValues": { - "rule": "repeated", - "type": "EnumValue", - "id": 1 - } - }, - "nested": { - "EnumValue": { - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" } }, - "PrimitiveType": { - "values": { - "PRIMITIVE_TYPE_UNSPECIFIED": 0, - "DOUBLE": 1, - "STRING": 2, - "BOOL": 3, - "TIMESTAMP": 4 + "taxonomies": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" } + }, + "serializedTaxonomies": { + "type": "bool", + "id": 3 + } + } + }, + "ExportTaxonomiesResponse": { + "fields": { + "taxonomies": { + "rule": "repeated", + "type": "SerializedTaxonomy", + "id": 1 } } } @@ -1213,12 +1737,94 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "ClientProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true }, "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -1321,74 +1927,6 @@ "type": "string", "id": 1050, "extend": "google.protobuf.ServiceOptions" - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } } } }, @@ -2357,11 +2895,18 @@ "fields": { "resource": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } }, "policy": { "type": "Policy", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -2369,10 +2914,14 @@ "fields": { "resource": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } }, "options": { - "type": "google.iam.v1.GetPolicyOptions", + "type": "GetPolicyOptions", "id": 2 } } @@ -2381,12 +2930,19 @@ "fields": { "resource": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } }, "permissions": { "rule": "repeated", "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, diff --git a/packages/google-cloud-datacatalog/src/index.js b/packages/google-cloud-datacatalog/src/index.js deleted file mode 100644 index 9720019f1be..00000000000 --- a/packages/google-cloud-datacatalog/src/index.js +++ /dev/null @@ -1,92 +0,0 @@ -// 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. - -/** - * @namespace google - */ -/** - * @namespace google.iam.v1 - */ -/** - * @namespace google.protobuf - */ -/** - * @namespace google.iam.v1 - */ -/** - * @namespace google.type - */ - -/** - * @namespace google.cloud - */ -/** - * @namespace google.cloud.datacatalog - */ -/** - * @namespace google.cloud.datacatalog.v1beta1 - */ - -'use strict'; - -// Import the clients for each version supported by this package. -const gapic = Object.freeze({ - v1beta1: require('./v1beta1'), -}); - -/** - * The `@google-cloud/datacatalog` package has the following named exports: - * - * - `DataCatalogClient` - Reference to - * {@link v1beta1.DataCatalogClient} - * - `v1beta1` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `DataCatalogClient` - Reference to - * {@link v1beta1.DataCatalogClient} - * - * @module {object} @google-cloud/datacatalog - * @alias nodejs-datacatalog - * - * @example Install the client library with npm: - * npm install --save @google-cloud/datacatalog - * - * @example Import the client library: - * const datacatalog = require('@google-cloud/datacatalog'); - * - * @example Create a client that uses Application Default Credentials (ADC): - * const client = new datacatalog.DataCatalogClient(); - * - * @example Create a client with explicit credentials: - * const client = new datacatalog.DataCatalogClient({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json', - * }); - */ - -/** - * @type {object} - * @property {constructor} DataCatalogClient - * Reference to {@link v1beta1.DataCatalogClient} - */ -module.exports = gapic.v1beta1; - -/** - * @type {object} - * @property {constructor} DataCatalogClient - * Reference to {@link v1beta1.DataCatalogClient} - */ -module.exports.v1beta1 = gapic.v1beta1; - -// Alias `module.exports` as `module.exports.default`, for future-proofing. -module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-datacatalog/src/index.ts b/packages/google-cloud-datacatalog/src/index.ts new file mode 100644 index 00000000000..57709e5b0ed --- /dev/null +++ b/packages/google-cloud-datacatalog/src/index.ts @@ -0,0 +1,37 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1beta1 from './v1beta1'; +const DataCatalogClient = v1beta1.DataCatalogClient; +const PolicyTagManagerClient = v1beta1.PolicyTagManagerClient; +const PolicyTagManagerSerializationClient = + v1beta1.PolicyTagManagerSerializationClient; +export { + v1beta1, + DataCatalogClient, + PolicyTagManagerClient, + PolicyTagManagerSerializationClient, +}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default { + v1beta1, + DataCatalogClient, + PolicyTagManagerClient, + PolicyTagManagerSerializationClient, +}; diff --git a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js deleted file mode 100644 index d224b4643e5..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.js +++ /dev/null @@ -1,2519 +0,0 @@ -// 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. - -'use strict'; - -const gapicConfig = require('./data_catalog_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * Data Catalog API service allows clients to discover, understand, and manage - * their data. - * - * @class - * @memberof v1beta1 - */ -class DataCatalogClient { - /** - * Construct an instance of DataCatalogClient. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this._pathTemplates = { - entryPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - fieldPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - locationPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - tagPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this._descriptors.page = { - searchCatalog: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'results' - ), - listTags: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'tags' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1beta1.DataCatalog', - gapicConfig, - opts.clientConfig, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this._innerApiCalls = {}; - - // Put together the "service stub" for - // google.cloud.datacatalog.v1beta1.DataCatalog. - const dataCatalogStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.cloud.datacatalog.v1beta1.DataCatalog') - : protos.google.cloud.datacatalog.v1beta1.DataCatalog, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const dataCatalogStubMethods = [ - 'searchCatalog', - 'createEntryGroup', - 'getEntryGroup', - 'deleteEntryGroup', - 'createEntry', - 'updateEntry', - 'deleteEntry', - 'getEntry', - 'lookupEntry', - 'createTagTemplate', - 'getTagTemplate', - 'updateTagTemplate', - 'deleteTagTemplate', - 'createTagTemplateField', - 'updateTagTemplateField', - 'renameTagTemplateField', - 'deleteTagTemplateField', - 'createTag', - 'updateTag', - 'deleteTag', - 'listTags', - 'setIamPolicy', - 'getIamPolicy', - 'testIamPermissions', - ]; - for (const methodName of dataCatalogStubMethods) { - const innerCallPromise = dataCatalogStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Searches Data Catalog for multiple resources like entries, tags that - * match a query. - * - * This is a custom method - * (https://cloud.google.com/apis/design/custom_methods) and does not return - * 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) for more information. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.scope - * Required. The scope of this search request. - * - * This object should have the same structure as [Scope]{@link google.cloud.datacatalog.v1beta1.Scope} - * @param {string} request.query - * Required. The query string in search query syntax. The query must be - * non-empty. - * - * Query strings can be simple as "x" or more qualified as: - * - * * name:x - * * column:x - * * description:y - * - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {string} [request.orderBy] - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * - * * `relevance`, only supports desecending - * * `last_access_timestamp [asc|desc]`, defaults to descending if not - * specified - * * `last_modified_timestamp [asc|desc]`, defaults to descending if not - * specified - * - * If not specified, defaults to `relevance` descending. - * @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. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [SearchCatalogResponse]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [SearchCatalogResponse]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const scope = {}; - * const query = ''; - * const request = { - * scope: scope, - * query: query, - * }; - * - * client.searchCatalog(request) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const scope = {}; - * const query = ''; - * const request = { - * scope: scope, - * query: query, - * }; - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.searchCatalog(nextRequest, options).then(callback); - * } - * } - * client.searchCatalog(request, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - searchCatalog(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.searchCatalog(request, options, callback); - } - - /** - * Equivalent to {@link searchCatalog}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link searchCatalog} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.scope - * Required. The scope of this search request. - * - * This object should have the same structure as [Scope]{@link google.cloud.datacatalog.v1beta1.Scope} - * @param {string} request.query - * Required. The query string in search query syntax. The query must be - * non-empty. - * - * Query strings can be simple as "x" or more qualified as: - * - * * name:x - * * column:x - * * description:y - * - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {string} [request.orderBy] - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * - * * `relevance`, only supports desecending - * * `last_access_timestamp [asc|desc]`, defaults to descending if not - * specified - * * `last_modified_timestamp [asc|desc]`, defaults to descending if not - * specified - * - * If not specified, defaults to `relevance` descending. - * @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. - * @returns {Stream} - * An object stream which emits an object representing [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult} on 'data' event. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const scope = {}; - * const query = ''; - * const request = { - * scope: scope, - * query: query, - * }; - * client.searchCatalogStream(request) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - searchCatalogStream(request, options) { - options = options || {}; - - return this._descriptors.page.searchCatalog.createStream( - this._innerApiCalls.searchCatalog, - request, - options - ); - } - - /** - * Alpha feature. - * Creates an EntryGroup. - * The user should enable the Data Catalog API in the project identified by - * the `parent` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project this entry group is in. Example: - * - * * projects/{project_id}/locations/{location} - * - * Note that this EntryGroup and its child resources may not actually be - * stored in the location in this name. - * @param {string} request.entryGroupId - * Required. The id of the entry group to create. - * @param {Object} request.entryGroup - * The entry group to create. Defaults to an empty entry group. - * - * This object should have the same structure as [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const entryGroupId = ''; - * const entryGroup = {}; - * const request = { - * parent: formattedParent, - * entryGroupId: entryGroupId, - * entryGroup: entryGroup, - * }; - * client.createEntryGroup(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createEntryGroup(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.createEntryGroup(request, options, callback); - } - - /** - * Alpha feature. - * Gets an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - * @param {Object} [request.readMask] - * The fields to return. If not set or empty, all fields are returned. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.entryGroupPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * client.getEntryGroup({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getEntryGroup(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.getEntryGroup(request, options, callback); - } - - /** - * Alpha feature. - * Deletes an EntryGroup. Only entry groups that do not contain entries can be - * deleted. The user should enable the Data Catalog API in the project - * identified by the `name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - * @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. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.entryGroupPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * client.deleteEntryGroup({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteEntryGroup(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.deleteEntryGroup(request, options, callback); - } - - /** - * Alpha feature. - * Creates an entry. Currently only entries of 'FILESET' type can be created. - * The user should enable the Data Catalog API in the project identified by - * the `parent` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the entry group this entry is in. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * - * Note that this Entry and its child resources may not actually be stored in - * the location in this name. - * @param {string} request.entryId - * Required. The id of the entry to create. - * @param {Object} request.entry - * Required. The entry to create. - * - * This object should have the same structure as [Entry]{@link google.cloud.datacatalog.v1beta1.Entry} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.entryGroupPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * const entryId = ''; - * const entry = {}; - * const request = { - * parent: formattedParent, - * entryId: entryId, - * entry: entry, - * }; - * client.createEntry(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createEntry(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.createEntry(request, options, callback); - } - - /** - * Updates an existing entry. - * The user should enable the Data Catalog API in the project identified by - * the `entry.name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.entry - * Required. The updated entry. The "name" field must be set. - * - * This object should have the same structure as [Entry]{@link google.cloud.datacatalog.v1beta1.Entry} - * @param {Object} [request.updateMask] - * The fields to update on the entry. If absent or empty, all modifiable - * fields are updated. - * - * The following fields are modifiable: - * * For entries with type `DATA_STREAM`: - * * `schema` - * * For entries with type `FILESET` - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const entry = {}; - * client.updateEntry({entry: entry}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateEntry(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.updateEntry(request, options, callback); - } - - /** - * Alpha feature. - * Deletes an existing entry. Only entries created through - * CreateEntry - * method can be deleted. - * The user should enable the Data Catalog API in the project identified by - * the `name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * @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. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * client.deleteEntry({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteEntry(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.deleteEntry(request, options, callback); - } - - /** - * Gets an entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * - * Entry groups are logical groupings of entries. Currently, users cannot - * create/modify entry groups. They are created by Data Catalog; they include - * `@bigquery` for all BigQuery entries, and `@pubsub` for all Cloud Pub/Sub - * entries. - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * client.getEntry({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getEntry(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.getEntry(request, options, callback); - } - - /** - * Get an entry by target resource name. This method allows clients to use - * the resource name from the source Google Cloud Platform service to get the - * Data Catalog Entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.linkedResource] - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name. - * Full names are case-sensitive. - * - * Examples: - * - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * * //pubsub.googleapis.com/projects/projectId/topics/topicId - * @param {string} [request.sqlResource] - * The SQL name of the entry. SQL names are case-sensitive. - * - * Examples: - * - * * `cloud_pubsub.project_id.topic_id` - * * ``pubsub.project_id.`topic.id.with.dots` `` - * * `bigquery.project_id.dataset_id.table_id` - * * `datacatalog.project_id.location_id.entry_group_id.entry_id` - * - * `*_id`s shoud satisfy the standard SQL rules for identifiers. - * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * - * client.lookupEntry({}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - lookupEntry(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.lookupEntry(request, options, callback); - } - - /** - * Creates a tag template. The user should enable the Data Catalog API in - * the project identified by the `parent` parameter (see [Data Catalog - * Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more - * information). - * - * @param {Object} request - * 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} - * - * 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 - * Required. The tag template to create. - * - * This object should have the same structure as [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - * const tagTemplateId = ''; - * const tagTemplate = {}; - * const request = { - * parent: formattedParent, - * tagTemplateId: tagTemplateId, - * tagTemplate: tagTemplate, - * }; - * client.createTagTemplate(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createTagTemplate(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.createTagTemplate(request, options, callback); - } - - /** - * Gets a tag template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * client.getTagTemplate({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getTagTemplate(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.getTagTemplate(request, options, callback); - } - - /** - * Updates a tag template. This method cannot be used to update the fields of - * a template. The tag template fields are represented as separate resources - * and should be updated using their own create/update/delete methods. - * The user should enable the Data Catalog API in the project identified by - * the `tag_template.name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.tagTemplate - * Required. The template to update. The "name" field must be set. - * - * This object should have the same structure as [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate} - * @param {Object} [request.updateMask] - * The field mask specifies the parts of the template to overwrite. - * - * Allowed fields: - * - * * `display_name` - * - * If absent or empty, all of the allowed fields above will be updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const tagTemplate = {}; - * client.updateTagTemplate({tagTemplate: tagTemplate}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateTagTemplate(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.updateTagTemplate(request, options, callback); - } - - /** - * Deletes a tag template and all tags using the template. - * The user should enable the Data Catalog API in the project identified by - * the `name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template to delete. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * @param {boolean} request.force - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of any possible tags using this template. - * `force = false` will be supported in the future. - * @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. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * const force = false; - * const request = { - * name: formattedName, - * force: force, - * }; - * client.deleteTagTemplate(request).catch(err => { - * console.error(err); - * }); - */ - deleteTagTemplate(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.deleteTagTemplate(request, options, callback); - } - - /** - * Creates a field in a tag template. The user should enable the Data Catalog - * API in the project identified by the `parent` parameter (see - * [Data Catalog Resource - * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more - * information). - * - * @param {Object} request - * The request object that will be sent. - * @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 - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * @param {Object} request.tagTemplateField - * Required. The tag template field to create. - * - * This object should have the same structure as [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * const tagTemplateFieldId = ''; - * const tagTemplateField = {}; - * const request = { - * parent: formattedParent, - * tagTemplateFieldId: tagTemplateFieldId, - * tagTemplateField: tagTemplateField, - * }; - * client.createTagTemplateField(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createTagTemplateField(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.createTagTemplateField( - request, - options, - callback - ); - } - - /** - * Updates a field in a tag template. This method cannot be used to update the - * field type. The user should enable the Data Catalog API in the project - * identified by the `name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * @param {Object} request.tagTemplateField - * Required. The template to update. - * - * This object should have the same structure as [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField} - * @param {Object} [request.updateMask] - * The field mask specifies the parts of the template to be updated. - * Allowed fields: - * - * * `display_name` - * * `type.enum_type` - * - * If `update_mask` is not set or empty, all of the allowed fields above will - * be updated. - * - * When updating an enum type, the provided values will be merged with the - * existing values. Therefore, enum values can only be added, existing enum - * values cannot be deleted nor renamed. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - * const tagTemplateField = {}; - * const request = { - * name: formattedName, - * tagTemplateField: tagTemplateField, - * }; - * client.updateTagTemplateField(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateTagTemplateField(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.updateTagTemplateField( - request, - options, - callback - ); - } - - /** - * Renames a field in a tag template. The user should enable the Data Catalog - * API in the project identified by the `name` parameter (see [Data Catalog - * Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more - * information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * @param {string} request.newTagTemplateFieldId - * Required. The new ID of this tag template field. For example, - * `my_new_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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - * const newTagTemplateFieldId = ''; - * const request = { - * name: formattedName, - * newTagTemplateFieldId: newTagTemplateFieldId, - * }; - * client.renameTagTemplateField(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - renameTagTemplateField(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.renameTagTemplateField( - request, - options, - callback - ); - } - - /** - * Deletes a field in a tag template and all uses of that field. - * The user should enable the Data Catalog API in the project identified by - * the `name` parameter (see [Data Catalog Resource Project] - * (/data-catalog/docs/concepts/resource-project) for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field to delete. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * @param {boolean} request.force - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of this field from any tags using this field. - * `force = false` will be supported in the future. - * @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. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.fieldPath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]', '[FIELD]'); - * const force = false; - * const request = { - * name: formattedName, - * force: force, - * }; - * client.deleteTagTemplateField(request).catch(err => { - * console.error(err); - * }); - */ - deleteTagTemplateField(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.deleteTagTemplateField( - request, - options, - callback - ); - } - - /** - * Creates a tag on an Entry. - * Note: The project identified by the `parent` parameter for the - * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) - * and the - * [tag - * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) - * used to create the tag must be from the same organization. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. 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. - * - * This object should have the same structure as [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * const tag = {}; - * const request = { - * parent: formattedParent, - * tag: tag, - * }; - * client.createTag(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createTag(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.createTag(request, options, callback); - } - - /** - * Updates an existing tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.tag - * Required. The updated tag. The "name" field must be set. - * - * This object should have the same structure as [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} - * @param {Object} [request.updateMask] - * The fields to update on the Tag. If absent or empty, all modifiable fields - * are updated. Currently the only modifiable field is the field `fields`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const tag = {}; - * client.updateTag({tag: tag}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateTag(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.updateTag(request, options, callback); - } - - /** - * Deletes a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag to delete. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - * @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. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.tagPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]', '[TAG]'); - * client.deleteTag({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteTag(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.deleteTag(request, options, callback); - } - - /** - * Lists the tags on an Entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the Data Catalog resource to list the tags of. The - * resource could be an Entry. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @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. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListTagsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListTagsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * - * client.listTags({parent: formattedParent}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listTags(nextRequest, options).then(callback); - * } - * } - * client.listTags({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listTags(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.listTags(request, options, callback); - } - - /** - * Equivalent to {@link listTags}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listTags} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the Data Catalog resource to list the tags of. The - * resource could be an Entry. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @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. - * @returns {Stream} - * An object stream which emits an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} on 'data' event. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.entryPath('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * client.listTagsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listTagsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listTags.createStream( - this._innerApiCalls.listTags, - request, - options - ); - } - - /** - * Sets the access control policy for a resource. Replaces any existing - * policy. - * Supported resources are: - * - Tag templates. - * - Entries. - * - Entry groups. - * Note, this method cannot be used to manage policies for BigQuery, Cloud - * Pub/Sub and any external Google Cloud Platform resources synced to Cloud - * Data Catalog. - * - * Callers must have following Google IAM permission - * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - * templates. - * - `datacatalog.entries.setIamPolicy` to set policies on entries. - * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * 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 - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * const policy = {}; - * const request = { - * resource: formattedResource, - * policy: policy, - * }; - * client.setIamPolicy(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - setIamPolicy(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.setIamPolicy(request, options, callback); - } - - /** - * Gets the access control policy for a resource. A `NOT_FOUND` error - * is returned if the resource does not exist. An empty policy is returned - * if the resource exists but does not have a policy set on it. - * - * Supported resources are: - * - Tag templates. - * - Entries. - * - Entry groups. - * Note, this method cannot be used to manage policies for BigQuery, Cloud - * Pub/Sub and any external Google Cloud Platform resources synced to Cloud - * Data Catalog. - * - * Callers must have following Google IAM permission - * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - * templates. - * - `datacatalog.entries.getIamPolicy` to get policies on entries. - * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * client.getIamPolicy({resource: formattedResource}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getIamPolicy(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.getIamPolicy(request, options, callback); - } - - /** - * Returns the caller's permissions on a resource. - * If the resource does not exist, an empty set of permissions is returned - * (We don't return a `NOT_FOUND` error). - * - * Supported resources are: - * - Tag templates. - * - Entries. - * - Entry groups. - * Note, this method cannot be used to manage policies for BigQuery, Cloud - * Pub/Sub and any external Google Cloud Platform resources synced to Cloud - * Data Catalog. - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * 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 - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const datacatalog = require('@google-cloud/datacatalog'); - * - * const client = new datacatalog.v1beta1.DataCatalogClient({ - * // optional auth parameters. - * }); - * - * const formattedResource = client.tagTemplatePath('[PROJECT]', '[LOCATION]', '[TAG_TEMPLATE]'); - * const permissions = []; - * const request = { - * resource: formattedResource, - * permissions: permissions, - * }; - * client.testIamPermissions(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - testIamPermissions(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - 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, - }); - - return this._innerApiCalls.testIamPermissions(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} entryGroup - * @param {String} entry - * @returns {String} - */ - entryPath(project, location, entryGroup, entry) { - return this._pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Return a fully-qualified entry_group resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} entryGroup - * @returns {String} - */ - entryGroupPath(project, location, entryGroup) { - return this._pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Return a fully-qualified field resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} tagTemplate - * @param {String} field - * @returns {String} - */ - fieldPath(project, location, tagTemplate, field) { - return this._pathTemplates.fieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {String} project - * @param {String} location - * @returns {String} - */ - locationPath(project, location) { - return this._pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} entryGroup - * @param {String} entry - * @param {String} tag - * @returns {String} - */ - tagPath(project, location, entryGroup, entry, tag) { - return this._pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Return a fully-qualified tag_template resource name string. - * - * @param {String} project - * @param {String} location - * @param {String} tagTemplate - * @returns {String} - */ - tagTemplatePath(project, location, tagTemplate) { - return this._pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the entryName from a entry resource. - * - * @param {String} entryName - * A fully-qualified path representing a entry resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the entryName from a entry resource. - * - * @param {String} entryName - * A fully-qualified path representing a entry resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entryName from a entry resource. - * - * @param {String} entryName - * A fully-qualified path representing a entry resources. - * @returns {String} - A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entryName from a entry resource. - * - * @param {String} entryName - * A fully-qualified path representing a entry resources. - * @returns {String} - A string representing the entry. - */ - matchEntryFromEntryName(entryName) { - return this._pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Parse the entryGroupName from a entry_group resource. - * - * @param {String} entryGroupName - * A fully-qualified path representing a entry_group resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName) { - return this._pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the entryGroupName from a entry_group resource. - * - * @param {String} entryGroupName - * A fully-qualified path representing a entry_group resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName) { - return this._pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entryGroupName from a entry_group resource. - * - * @param {String} entryGroupName - * A fully-qualified path representing a entry_group resources. - * @returns {String} - A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName) { - return this._pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Parse the fieldName from a field resource. - * - * @param {String} fieldName - * A fully-qualified path representing a field resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate.match(fieldName).project; - } - - /** - * Parse the fieldName from a field resource. - * - * @param {String} fieldName - * A fully-qualified path representing a field resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate.match(fieldName).location; - } - - /** - * Parse the fieldName from a field resource. - * - * @param {String} fieldName - * A fully-qualified path representing a field resources. - * @returns {String} - A string representing the tag_template. - */ - matchTagTemplateFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate.match(fieldName).tag_template; - } - - /** - * Parse the fieldName from a field resource. - * - * @param {String} fieldName - * A fully-qualified path representing a field resources. - * @returns {String} - A string representing the field. - */ - matchFieldFromFieldName(fieldName) { - return this._pathTemplates.fieldPathTemplate.match(fieldName).field; - } - - /** - * Parse the locationName from a location resource. - * - * @param {String} locationName - * A fully-qualified path representing a location resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the locationName from a location resource. - * - * @param {String} locationName - * A fully-qualified path representing a location resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromLocationName(locationName) { - return this._pathTemplates.locationPathTemplate.match(locationName) - .location; - } - - /** - * Parse the tagName from a tag resource. - * - * @param {String} tagName - * A fully-qualified path representing a tag resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the tagName from a tag resource. - * - * @param {String} tagName - * A fully-qualified path representing a tag resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the tagName from a tag resource. - * - * @param {String} tagName - * A fully-qualified path representing a tag resources. - * @returns {String} - A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the tagName from a tag resource. - * - * @param {String} tagName - * A fully-qualified path representing a tag resources. - * @returns {String} - A string representing the entry. - */ - matchEntryFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tagName from a tag resource. - * - * @param {String} tagName - * A fully-qualified path representing a tag resources. - * @returns {String} - A string representing the tag. - */ - matchTagFromTagName(tagName) { - return this._pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Parse the tagTemplateName from a tag_template resource. - * - * @param {String} tagTemplateName - * A fully-qualified path representing a tag_template resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName) { - return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the tagTemplateName from a tag_template resource. - * - * @param {String} tagTemplateName - * A fully-qualified path representing a tag_template resources. - * @returns {String} - A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName) { - return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tagTemplateName from a tag_template resource. - * - * @param {String} tagTemplateName - * A fully-qualified path representing a tag_template resources. - * @returns {String} - A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName) { - return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } -} - -module.exports = DataCatalogClient; diff --git a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts new file mode 100644 index 00000000000..c9eb42e0f81 --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts @@ -0,0 +1,2701 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './data_catalog_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Data Catalog API service allows clients to discover, understand, and manage + * their data. + * @class + * @memberof v1beta1 + */ +export class DataCatalogClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _dataCatalogStub: Promise<{[name: string]: Function}>; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + + /** + * Construct an instance of DataCatalogClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof DataCatalogClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof DataCatalogClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + entryGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryGroups/{entry_group}' + ), + entryPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' + ), + tagTemplatePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' + ), + tagPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' + ), + tagTemplateFieldPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + searchCatalog: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'results' + ), + listTags: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tags' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.datacatalog.v1beta1.DataCatalog', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + + // Put together the "service stub" for + // google.cloud.datacatalog.v1beta1.DataCatalog. + this._dataCatalogStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.datacatalog.v1beta1.DataCatalog' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.datacatalog.v1beta1.DataCatalog, + opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataCatalogStubMethods = [ + 'searchCatalog', + 'createEntryGroup', + 'getEntryGroup', + 'deleteEntryGroup', + 'createEntry', + 'updateEntry', + 'deleteEntry', + 'getEntry', + 'lookupEntry', + 'createTagTemplate', + 'getTagTemplate', + 'updateTagTemplate', + 'deleteTagTemplate', + 'createTagTemplateField', + 'updateTagTemplateField', + 'renameTagTemplateField', + 'deleteTagTemplateField', + 'createTag', + 'updateTag', + 'deleteTag', + 'listTags', + 'setIamPolicy', + 'getIamPolicy', + 'testIamPermissions', + ]; + + for (const methodName of dataCatalogStubMethods) { + const innerCallPromise = this._dataCatalogStub.then( + stub => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'datacatalog.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + createEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest + | undefined + ), + {} | undefined + ] + >; + createEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest + | undefined, + {} | undefined + > + ): void; + /** + * Alpha feature. + * Creates an EntryGroup. + * The user should enable the Data Catalog API in the project identified by + * the `parent` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project this entry group is in. Example: + * + * * projects/{project_id}/locations/{location} + * + * Note that this EntryGroup and its child resources may not actually be + * stored in the location in this name. + * @param {string} request.entryGroupId + * Required. The id of the entry group to create. + * The id must begin with a letter or underscore, contain only English + * letters, numbers and underscores, and be at most 64 characters. + * @param {google.cloud.datacatalog.v1beta1.EntryGroup} request.entryGroup + * The entry group to create. Defaults to an empty entry group. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createEntryGroup(request, options, callback); + } + getEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest + | undefined + ), + {} | undefined + ] + >; + getEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest + | undefined, + {} | undefined + > + ): void; + /** + * Alpha feature. + * Gets an EntryGroup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @param {google.protobuf.FieldMask} request.readMask + * The fields to return. If not set or empty, all fields are returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntryGroup, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getEntryGroup(request, options, callback); + } + deleteEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest + | undefined + ), + {} | undefined + ] + >; + deleteEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest + | undefined, + {} | undefined + > + ): void; + /** + * Alpha feature. + * Deletes an EntryGroup. Only entry groups that do not contain entries can be + * deleted. The user should enable the Data Catalog API in the project + * identified by the `name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteEntryGroup( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deleteEntryGroup(request, options, callback); + } + createEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest + | undefined + ), + {} | undefined + ] + >; + createEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest + | undefined, + {} | undefined + > + ): void; + /** + * Alpha feature. + * Creates an entry. Currently only entries of 'FILESET' type can be created. + * The user should enable the Data Catalog API in the project identified by + * the `parent` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the entry group this entry is in. Example: + * + * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + * + * Note that this Entry and its child resources may not actually be stored in + * the location in this name. + * @param {string} request.entryId + * Required. The id of the entry to create. + * @param {google.cloud.datacatalog.v1beta1.Entry} request.entry + * Required. The entry to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createEntry(request, options, callback); + } + updateEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest + | undefined + ), + {} | undefined + ] + >; + updateEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates an existing entry. + * The user should enable the Data Catalog API in the project identified by + * the `entry.name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.Entry} request.entry + * Required. The updated entry. The "name" field must be set. + * @param {google.protobuf.FieldMask} request.updateMask + * The fields to update on the entry. If absent or empty, all modifiable + * fields are updated. + * + * The following fields are modifiable: + * * For entries with type `DATA_STREAM`: + * * `schema` + * * For entries with type `FILESET` + * * `schema` + * * `display_name` + * * `description` + * * `gcs_fileset_spec` + * * `gcs_fileset_spec.file_patterns` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.updateEntry(request, options, callback); + } + deleteEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest + | undefined + ), + {} | undefined + ] + >; + deleteEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest + | undefined, + {} | undefined + > + ): void; + /** + * Alpha feature. + * Deletes an existing entry. Only entries created through + * [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] + * method can be deleted. + * The user should enable the Data Catalog API in the project identified by + * the `name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the entry. Example: + * + * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deleteEntry(request, options, callback); + } + getEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest | undefined, + {} | undefined + ] + >; + getEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets an entry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the entry. Example: + * + * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * + * Entry groups are logical groupings of entries. Currently, users cannot + * create/modify entry groups. They are created by Data Catalog; they include + * `@bigquery` for all BigQuery entries, and `@pubsub` for all Cloud Pub/Sub + * entries. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getEntry(request, options, callback); + } + lookupEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest + | undefined + ), + {} | undefined + ] + >; + lookupEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest + | undefined, + {} | undefined + > + ): void; + /** + * Get an entry by target resource name. This method allows clients to use + * the resource name from the source Google Cloud Platform service to get the + * Data Catalog Entry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.linkedResource + * The full name of the Google Cloud Platform resource the Data Catalog + * entry represents. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name. + * Full names are case-sensitive. + * + * Examples: + * + * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + * * //pubsub.googleapis.com/projects/projectId/topics/topicId + * @param {string} request.sqlResource + * The SQL name of the entry. SQL names are case-sensitive. + * + * Examples: + * + * * `cloud_pubsub.project_id.topic_id` + * * ``pubsub.project_id.`topic.id.with.dots` `` + * * `bigquery.table.project_id.dataset_id.table_id` + * * `bigquery.dataset.project_id.dataset_id` + * * `datacatalog.project_id.location_id.entry_group_id.entry_id` + * + * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + lookupEntry( + request: protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + | protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IEntry, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.lookupEntry(request, options, callback); + } + createTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest + | undefined + ), + {} | undefined + ] + >; + createTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a tag template. The user should enable the Data Catalog API in + * the project identified by the `parent` parameter (see [Data Catalog + * Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more + * information). + * + * @param {Object} request + * 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} + * + * 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 {google.cloud.datacatalog.v1beta1.TagTemplate} request.tagTemplate + * Required. The tag template to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createTagTemplate(request, options, callback); + } + getTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest + | undefined + ), + {} | undefined + ] + >; + getTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a tag template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tag template. Example: + * + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getTagTemplate(request, options, callback); + } + updateTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest + | undefined + ), + {} | undefined + ] + >; + updateTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a tag template. This method cannot be used to update the fields of + * a template. The tag template fields are represented as separate resources + * and should be updated using their own create/update/delete methods. + * The user should enable the Data Catalog API in the project identified by + * the `tag_template.name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.TagTemplate} request.tagTemplate + * Required. The template to update. The "name" field must be set. + * @param {google.protobuf.FieldMask} request.updateMask + * The field mask specifies the parts of the template to overwrite. + * + * Allowed fields: + * + * * `display_name` + * + * If absent or empty, all of the allowed fields above will be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplate, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.updateTagTemplate(request, options, callback); + } + deleteTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest + | undefined + ), + {} | undefined + ] + >; + deleteTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a tag template and all tags using the template. + * The user should enable the Data Catalog API in the project identified by + * the `name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tag template to delete. Example: + * + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + * @param {boolean} request.force + * Required. Currently, this field must always be set to `true`. + * This confirms the deletion of any possible tags using this template. + * `force = false` will be supported in the future. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteTagTemplate( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deleteTagTemplate(request, options, callback); + } + createTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + >; + createTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a field in a tag template. The user should enable the Data Catalog + * API in the project identified by the `parent` parameter (see + * [Data Catalog Resource + * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more + * information). + * + * @param {Object} request + * The request object that will be sent. + * @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 + * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + * character long and at most 128 characters long. Field IDs must also be + * unique within their template. + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} request.tagTemplateField + * Required. The tag template field to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createTagTemplateField( + request, + options, + callback + ); + } + updateTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + >; + updateTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a field in a tag template. This method cannot be used to update the + * field type. The user should enable the Data Catalog API in the project + * identified by the `name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tag template field. Example: + * + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} request.tagTemplateField + * Required. The template to update. + * @param {google.protobuf.FieldMask} request.updateMask + * The field mask specifies the parts of the template to be updated. + * Allowed fields: + * + * * `display_name` + * * `type.enum_type` + * + * If `update_mask` is not set or empty, all of the allowed fields above will + * be updated. + * + * When updating an enum type, the provided values will be merged with the + * existing values. Therefore, enum values can only be added, existing enum + * values cannot be deleted nor renamed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.updateTagTemplateField( + request, + options, + callback + ); + } + renameTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + >; + renameTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): void; + /** + * Renames a field in a tag template. The user should enable the Data Catalog + * API in the project identified by the `name` parameter (see [Data Catalog + * Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more + * information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tag template. Example: + * + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param {string} request.newTagTemplateFieldId + * Required. The new ID of this tag template field. For example, `my_new_field`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + renameTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + | protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITagTemplateField, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.renameTagTemplateField( + request, + options, + callback + ); + } + deleteTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + >; + deleteTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a field in a tag template and all uses of that field. + * The user should enable the Data Catalog API in the project identified by + * the `name` parameter (see [Data Catalog Resource Project] + * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tag template field to delete. Example: + * + * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param {boolean} request.force + * Required. Currently, this field must always be set to `true`. + * This confirms the deletion of this field from any tags using this field. + * `force = false` will be supported in the future. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteTagTemplateField( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deleteTagTemplateField( + request, + options, + callback + ); + } + createTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest + | undefined + ), + {} | undefined + ] + >; + createTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + * Note: The project identified by the `parent` parameter for the + * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the + * [tag + * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be from the same organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. 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 {google.cloud.datacatalog.v1beta1.Tag} request.tag + * Required. The tag to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createTag(request, options, callback); + } + updateTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest + | undefined + ), + {} | undefined + ] + >; + updateTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates an existing tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.Tag} request.tag + * Required. The updated tag. The "name" field must be set. + * @param {google.protobuf.FieldMask} request.updateMask + * The fields to update on the Tag. If absent or empty, all modifiable fields + * are updated. Currently the only modifiable field is the field `fields`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.updateTag(request, options, callback); + } + deleteTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest + | undefined + ), + {} | undefined + ] + >; + deleteTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tag to delete. Example: + * + * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deleteTag(request, options, callback); + } + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Sets the access control policy for a resource. Replaces any existing + * policy. + * Supported resources are: + * - Tag templates. + * - Entries. + * - Entry groups. + * Note, this method cannot be used to manage policies for BigQuery, Cloud + * Pub/Sub and any external Google Cloud Platform resources synced to Cloud + * Data Catalog. + * + * Callers must have following Google IAM permission + * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + * templates. + * - `datacatalog.entries.setIamPolicy` to set policies on entries. + * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + * + * @param {Object} request + * The request object that will be sent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.setIamPolicy(request, options, callback); + } + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + >; + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets the access control policy for a resource. A `NOT_FOUND` error + * is returned if the resource does not exist. An empty policy is returned + * if the resource exists but does not have a policy set on it. + * + * Supported resources are: + * - Tag templates. + * - Entries. + * - Entry groups. + * Note, this method cannot be used to manage policies for BigQuery, Cloud + * Pub/Sub and any external Google Cloud Platform resources synced to Cloud + * Data Catalog. + * + * Callers must have following Google IAM permission + * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + * templates. + * - `datacatalog.entries.getIamPolicy` to get policies on entries. + * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + * + * @param {Object} request + * The request object that will be sent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getIamPolicy(request, options, callback); + } + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + > + ): void; + /** + * Returns the caller's permissions on a resource. + * If the resource does not exist, an empty set of permissions is returned + * (We don't return a `NOT_FOUND` error). + * + * Supported resources are: + * - Tag templates. + * - Entries. + * - Entry groups. + * Note, this method cannot be used to manage policies for BigQuery, Cloud + * Pub/Sub and any external Google Cloud Platform resources synced to Cloud + * Data Catalog. + * + * A caller is not required to have Google IAM permission to make this + * request. + * + * @param {Object} request + * The request object that will be sent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.testIamPermissions(request, options, callback); + } + + searchCatalog( + request: protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse + ] + >; + searchCatalog( + request: protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse + > + ): void; + /** + * Searches Data Catalog for multiple resources like entries, tags that + * match a query. + * + * This is a custom method + * (https://cloud.google.com/apis/design/custom_methods) and does not return + * 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) for more information. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} request.scope + * Required. The scope of this search request. + * @param {string} request.query + * Required. The query string in search query syntax. The query must be non-empty. + * + * Query strings can be simple as "x" or more qualified as: + * + * * name:x + * * column:x + * * description:y + * + * Note: Query tokens need to have a minimum of 3 characters for substring + * matching to work correctly. See [Data Catalog Search + * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information. + * @param {number} request.pageSize + * Number of results in the search page. If <=0 then defaults to 10. Max limit + * for page_size is 1000. Throws an invalid argument for page_size > 1000. + * @param {string} [request.pageToken] + * Optional. Pagination token returned in an earlier + * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which + * indicates that this is a continuation of a prior + * [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] + * call, and that the system should return the next page of data. If empty, + * the first page is returned. + * @param {string} request.orderBy + * Specifies the ordering of results, currently supported case-sensitive + * choices are: + * + * * `relevance`, only supports desecending + * * `last_access_timestamp [asc|desc]`, defaults to descending if not + * specified + * * `last_modified_timestamp [asc|desc]`, defaults to descending if not + * specified + * + * If not specified, defaults to `relevance` descending. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [SearchCatalogResponse]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [SearchCatalogResponse]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [SearchCatalogResponse]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + searchCatalog( + request: protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.searchCatalog(request, options, callback); + } + + /** + * Equivalent to {@link searchCatalog}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link searchCatalog} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} request.scope + * Required. The scope of this search request. + * @param {string} request.query + * Required. The query string in search query syntax. The query must be non-empty. + * + * Query strings can be simple as "x" or more qualified as: + * + * * name:x + * * column:x + * * description:y + * + * Note: Query tokens need to have a minimum of 3 characters for substring + * matching to work correctly. See [Data Catalog Search + * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information. + * @param {number} request.pageSize + * Number of results in the search page. If <=0 then defaults to 10. Max limit + * for page_size is 1000. Throws an invalid argument for page_size > 1000. + * @param {string} [request.pageToken] + * Optional. Pagination token returned in an earlier + * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which + * indicates that this is a continuation of a prior + * [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] + * call, and that the system should return the next page of data. If empty, + * the first page is returned. + * @param {string} request.orderBy + * Specifies the ordering of results, currently supported case-sensitive + * choices are: + * + * * `relevance`, only supports desecending + * * `last_access_timestamp [asc|desc]`, defaults to descending if not + * specified + * * `last_modified_timestamp [asc|desc]`, defaults to descending if not + * specified + * + * If not specified, defaults to `relevance` descending. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult} on 'data' event. + */ + searchCatalogStream( + request?: protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.searchCatalog.createStream( + this._innerApiCalls.searchCatalog as gax.GaxCall, + request, + callSettings + ); + } + listTags( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsResponse + ] + >; + listTags( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsResponse + > + ): void; + /** + * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the Data Catalog resource to list the tags of. The + * resource could be an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + * @param {number} request.pageSize + * The maximum number of tags to return. Default is 10. Max limit is 1000. + * @param {string} request.pageToken + * Token that specifies which page is requested. If empty, the first page is + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListTagsResponse}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ListTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListTagsResponse} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListTagsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listTags( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsResponse + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsResponse + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTagsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.listTags(request, options, callback); + } + + /** + * Equivalent to {@link listTags}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listTags} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the Data Catalog resource to list the tags of. The + * resource could be an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + * @param {number} request.pageSize + * The maximum number of tags to return. Default is 10. Max limit is 1000. + * @param {string} request.pageToken + * Token that specifies which page is requested. If empty, the first page is + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} on 'data' event. + */ + listTagsStream( + request?: protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listTags.createStream( + this._innerApiCalls.listTags as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + entrygroupPath(project: string, location: string) { + return this._pathTemplates.entrygroupPathTemplate.render({ + project, + location, + }); + } + matchProjectFromEntryGroupName(entrygroupName: string) { + return this._pathTemplates.entrygroupPathTemplate.match(entrygroupName) + .project; + } + matchLocationFromEntryGroupName(entrygroupName: string) { + return this._pathTemplates.entrygroupPathTemplate.match(entrygroupName) + .location; + } + entryPath(project: string, location: string, entry: string) { + return this._pathTemplates.entryPathTemplate.render({ + project, + location, + entry, + }); + } + matchProjectFromEntryName(entryName: string) { + return this._pathTemplates.entryPathTemplate.match(entryName).project; + } + matchLocationFromEntryName(entryName: string) { + return this._pathTemplates.entryPathTemplate.match(entryName).location; + } + matchEntryFromEntryName(entryName: string) { + return this._pathTemplates.entryPathTemplate.match(entryName).entry; + } + tagtemplatePath(project: string, location: string) { + return this._pathTemplates.tagtemplatePathTemplate.render({ + project, + location, + }); + } + matchProjectFromTagTemplateName(tagtemplateName: string) { + return this._pathTemplates.tagtemplatePathTemplate.match(tagtemplateName) + .project; + } + matchLocationFromTagTemplateName(tagtemplateName: string) { + return this._pathTemplates.tagtemplatePathTemplate.match(tagtemplateName) + .location; + } + tagPath(project: string, location: string, entry: string, tag: string) { + return this._pathTemplates.tagPathTemplate.render({ + project, + location, + entry, + tag, + }); + } + matchProjectFromTagName(tagName: string) { + return this._pathTemplates.tagPathTemplate.match(tagName).project; + } + matchLocationFromTagName(tagName: string) { + return this._pathTemplates.tagPathTemplate.match(tagName).location; + } + matchEntryFromTagName(tagName: string) { + return this._pathTemplates.tagPathTemplate.match(tagName).entry; + } + matchTagFromTagName(tagName: string) { + return this._pathTemplates.tagPathTemplate.match(tagName).tag; + } + tagtemplatefieldPath(project: string, location: string, field: string) { + return this._pathTemplates.tagtemplatefieldPathTemplate.render({ + project, + location, + field, + }); + } + matchProjectFromTagTemplateFieldName(tagtemplatefieldName: string) { + return this._pathTemplates.tagtemplatefieldPathTemplate.match( + tagtemplatefieldName + ).project; + } + matchLocationFromTagTemplateFieldName(tagtemplatefieldName: string) { + return this._pathTemplates.tagtemplatefieldPathTemplate.match( + tagtemplatefieldName + ).location; + } + matchFieldFromTagTemplateFieldName(tagtemplatefieldName: string) { + return this._pathTemplates.tagtemplatefieldPathTemplate.match( + tagtemplatefieldName + ).field; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this._dataCatalogStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client_config.json b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client_config.json index 518f801168d..24a0d9dde40 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client_config.json +++ b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client_config.json @@ -2,11 +2,11 @@ "interfaces": { "google.cloud.datacatalog.v1beta1.DataCatalog": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { @@ -14,7 +14,7 @@ "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, + "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 } diff --git a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_proto_list.json b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_proto_list.json index fe998c213ae..7dea8d511e4 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_proto_list.json +++ b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_proto_list.json @@ -1,3 +1,11 @@ [ - "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto" + "../../protos/google/cloud/datacatalog/v1beta1/tags.proto", + "../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto", + "../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto", + "../../protos/google/cloud/datacatalog/v1beta1/schema.proto", + "../../protos/google/cloud/datacatalog/v1beta1/search.proto", + "../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto", + "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto", + "../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto", + "../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto" ] 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 deleted file mode 100644 index 398a047ec1d..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_datacatalog.js +++ /dev/null @@ -1,793 +0,0 @@ -// 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. - -/** - * Request message for - * SearchCatalog. - * - * @property {Object} scope - * Required. The scope of this search request. - * - * This object should have the same structure as [Scope]{@link google.cloud.datacatalog.v1beta1.Scope} - * - * @property {string} query - * Required. The query string in search query syntax. The query must be - * non-empty. - * - * Query strings can be simple as "x" or more qualified as: - * - * * name:x - * * column:x - * * description:y - * - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information. - * - * @property {number} pageSize - * Number of results in the search page. If <=0 then defaults to 10. Max limit - * for page_size is 1000. Throws an invalid argument for page_size > 1000. - * - * @property {string} pageToken - * Optional. Pagination token returned in an earlier - * SearchCatalogResponse.next_page_token, - * which indicates that this is a continuation of a prior - * SearchCatalogRequest - * call, and that the system should return the next page of data. If empty, - * the first page is returned. - * - * @property {string} orderBy - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * - * * `relevance`, only supports desecending - * * `last_access_timestamp [asc|desc]`, defaults to descending if not - * specified - * * `last_modified_timestamp [asc|desc]`, defaults to descending if not - * specified - * - * If not specified, defaults to `relevance` descending. - * - * @typedef SearchCatalogRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.SearchCatalogRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const SearchCatalogRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * @property {string[]} includeOrgIds - * Data Catalog tries to automatically choose the right corpus of data to - * search through. You can ensure an organization is included by adding it - * to `include_org_ids`. You can ensure a project's org is included with - * `include_project_ids`. You must specify at least one organization - * using `include_org_ids` or `include_project_ids` in all search requests. - * - * List of organization IDs to search within. To find your organization ID, - * follow instructions in - * https://cloud.google.com/resource-manager/docs/creating-managing-organization. - * - * @property {string[]} includeProjectIds - * List of project IDs to search within. To learn more about the - * distinction between project names/IDs/numbers, go to - * https://cloud.google.com/docs/overview/#projects. - * - * @property {boolean} includeGcpPublicDatasets - * If `true`, include Google Cloud Platform (GCP) public datasets in the - * search results. Info on GCP public datasets is available at - * https://cloud.google.com/public-datasets/. By default, GCP public - * datasets are excluded. - * - * @typedef Scope - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ - Scope: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * Response message for - * SearchCatalog. - * - * @property {Object[]} results - * Search results. - * - * This object should have the same structure as [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult} - * - * @property {string} nextPageToken - * The token that can be used to retrieve the next page of results. - * - * @typedef SearchCatalogResponse - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.SearchCatalogResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const SearchCatalogResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * CreateEntryGroup. - * - * @property {string} parent - * Required. The name of the project this entry group is in. Example: - * - * * projects/{project_id}/locations/{location} - * - * Note that this EntryGroup and its child resources may not actually be - * stored in the location in this name. - * - * @property {string} entryGroupId - * Required. The id of the entry group to create. - * - * @property {Object} entryGroup - * The entry group to create. Defaults to an empty entry group. - * - * This object should have the same structure as [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup} - * - * @typedef CreateEntryGroupRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const CreateEntryGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * GetEntryGroup. - * - * @property {string} name - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - * - * @property {Object} readMask - * The fields to return. If not set or empty, all fields are returned. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef GetEntryGroupRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.GetEntryGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const GetEntryGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * DeleteEntryGroup. - * - * @property {string} name - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - * - * @typedef DeleteEntryGroupRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const DeleteEntryGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * CreateEntry. - * - * @property {string} parent - * Required. The name of the entry group this entry is in. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * - * Note that this Entry and its child resources may not actually be stored in - * the location in this name. - * - * @property {string} entryId - * Required. The id of the entry to create. - * - * @property {Object} entry - * Required. The entry to create. - * - * This object should have the same structure as [Entry]{@link google.cloud.datacatalog.v1beta1.Entry} - * - * @typedef CreateEntryRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.CreateEntryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const CreateEntryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * UpdateEntry. - * - * @property {Object} entry - * Required. The updated entry. The "name" field must be set. - * - * This object should have the same structure as [Entry]{@link google.cloud.datacatalog.v1beta1.Entry} - * - * @property {Object} updateMask - * The fields to update on the entry. If absent or empty, all modifiable - * fields are updated. - * - * The following fields are modifiable: - * * For entries with type `DATA_STREAM`: - * * `schema` - * * For entries with type `FILESET` - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateEntryRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.UpdateEntryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const UpdateEntryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * DeleteEntry. - * - * @property {string} name - * Required. The name of the entry. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * - * @typedef DeleteEntryRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.DeleteEntryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const DeleteEntryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * GetEntry. - * - * @property {string} name - * Required. The name of the entry. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * - * Entry groups are logical groupings of entries. Currently, users cannot - * create/modify entry groups. They are created by Data Catalog; they include - * `@bigquery` for all BigQuery entries, and `@pubsub` for all Cloud Pub/Sub - * entries. - * - * @typedef GetEntryRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.GetEntryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const GetEntryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * LookupEntry. - * - * @property {string} linkedResource - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name. - * Full names are case-sensitive. - * - * Examples: - * - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * * //pubsub.googleapis.com/projects/projectId/topics/topicId - * - * @property {string} sqlResource - * The SQL name of the entry. SQL names are case-sensitive. - * - * Examples: - * - * * `cloud_pubsub.project_id.topic_id` - * * ``pubsub.project_id.`topic.id.with.dots` `` - * * `bigquery.project_id.dataset_id.table_id` - * * `datacatalog.project_id.location_id.entry_group_id.entry_id` - * - * `*_id`s shoud satisfy the standard SQL rules for identifiers. - * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - * - * @typedef LookupEntryRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.LookupEntryRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const LookupEntryRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Entry Metadata. - * A Data Catalog Entry resource represents another resource in Google - * Cloud Platform, such as a BigQuery dataset or a Cloud Pub/Sub topic. - * Clients can use the `linked_resource` field in the Entry resource to refer to - * the original resource ID of the source system. - * - * An Entry resource contains resource details, such as its schema. An Entry can - * also be used to attach flexible metadata, such as a - * Tag. - * - * @property {string} name - * The Data Catalog resource name of the entry in URL format. 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 resource this metadata entry refers to. - * - * For Google Cloud Platform resources, `linked_resource` is the [full name of - * the - * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). - * For example, the `linked_resource` for a table resource from BigQuery is: - * - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * - * @property {number} type - * The type of the entry. - * - * The number should be among the values of [EntryType]{@link google.cloud.datacatalog.v1beta1.EntryType} - * - * @property {Object} gcsFilesetSpec - * Specification that applies to a Cloud Storage fileset. This is only valid - * on entries of type FILESET. - * - * This object should have the same structure as [GcsFilesetSpec]{@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec} - * - * @property {Object} bigqueryTableSpec - * Specification that applies to a BigQuery table. This is only valid on - * entries of type `TABLE`. - * - * This object should have the same structure as [BigQueryTableSpec]{@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec} - * - * @property {Object} bigqueryDateShardedSpec - * Specification for a group of BigQuery tables with name pattern - * `[prefix]YYYYMMDD`. Context: - * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. - * - * This object should have the same structure as [BigQueryDateShardedSpec]{@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} - * - * @property {string} displayName - * Display information such as title and description. A short name to identify - * the entry, for example, "Analytics Data - Jan 2011". Default value is an - * empty string. - * - * @property {string} description - * Entry description, which can consist of several sentences or paragraphs - * that describe entry contents. Default value is an empty string. - * - * @property {Object} schema - * Schema of the entry. An entry might not have any schema attached to it. - * - * This object should have the same structure as [Schema]{@link google.cloud.datacatalog.v1beta1.Schema} - * - * @property {Object} sourceSystemTimestamps - * Output only. Timestamps about the underlying Google Cloud Platform - * resource, not about this Data Catalog Entry. - * - * This object should have the same structure as [SystemTimestamps]{@link google.cloud.datacatalog.v1beta1.SystemTimestamps} - * - * @typedef Entry - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.Entry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const Entry = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * EntryGroup Metadata. - * An EntryGroup resource represents a logical grouping of zero or more - * Data Catalog Entry resources. - * - * @property {string} name - * The resource name of the entry group in URL format. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * - * Note that this EntryGroup and its child resources may not actually be - * stored in the location in this name. - * - * @property {string} displayName - * A short name to identify the entry group, for example, - * "analytics data - jan 2011". Default value is an empty string. - * - * @property {string} description - * Entry group description, which can consist of several sentences or - * paragraphs that describe entry group contents. Default value is an empty - * string. - * - * @property {Object} dataCatalogTimestamps - * Output only. Timestamps about this EntryGroup. Default value is empty - * timestamps. - * - * This object should have the same structure as [SystemTimestamps]{@link google.cloud.datacatalog.v1beta1.SystemTimestamps} - * - * @typedef EntryGroup - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.EntryGroup definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const EntryGroup = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * CreateTagTemplate. - * - * @property {string} parent - * Required. The name of the project and the location this template is in. - * Example: - * - * * projects/{project_id}/locations/{location} - * - * 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. - * - * @property {Object} tagTemplate - * Required. The tag template to create. - * - * This object should have the same structure as [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate} - * - * @typedef CreateTagTemplateRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const CreateTagTemplateRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * GetTagTemplate. - * - * @property {string} name - * Required. The name of the tag template. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * - * @typedef GetTagTemplateRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.GetTagTemplateRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const GetTagTemplateRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * UpdateTagTemplate. - * - * @property {Object} tagTemplate - * Required. The template to update. The "name" field must be set. - * - * This object should have the same structure as [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate} - * - * @property {Object} updateMask - * The field mask specifies the parts of the template to overwrite. - * - * Allowed fields: - * - * * `display_name` - * - * If absent or empty, all of the allowed fields above will be updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateTagTemplateRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const UpdateTagTemplateRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * DeleteTagTemplate. - * - * @property {string} name - * Required. The name of the tag template to delete. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * - * @property {boolean} force - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of any possible tags using this template. - * `force = false` will be supported in the future. - * - * @typedef DeleteTagTemplateRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const DeleteTagTemplateRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * CreateTag. - * - * @property {string} parent - * Required. 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. - * - * This object should have the same structure as [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} - * - * @typedef CreateTagRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.CreateTagRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const CreateTagRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * UpdateTag. - * - * @property {Object} tag - * Required. The updated tag. The "name" field must be set. - * - * This object should have the same structure as [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} - * - * @property {Object} updateMask - * The fields to update on the Tag. If absent or empty, all modifiable fields - * are updated. Currently the only modifiable field is the field `fields`. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateTagRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.UpdateTagRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const UpdateTagRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * DeleteTag. - * - * @property {string} name - * Required. The name of the tag to delete. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - * - * @typedef DeleteTagRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.DeleteTagRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const DeleteTagRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * CreateTagTemplateField. - * - * @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. - * Field ids can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * - * @property {Object} tagTemplateField - * Required. The tag template field to create. - * - * This object should have the same structure as [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField} - * - * @typedef CreateTagTemplateFieldRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const CreateTagTemplateFieldRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * UpdateTagTemplateField. - * - * @property {string} name - * Required. The name of the tag template field. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * - * @property {Object} tagTemplateField - * Required. The template to update. - * - * This object should have the same structure as [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField} - * - * @property {Object} updateMask - * The field mask specifies the parts of the template to be updated. - * Allowed fields: - * - * * `display_name` - * * `type.enum_type` - * - * If `update_mask` is not set or empty, all of the allowed fields above will - * be updated. - * - * When updating an enum type, the provided values will be merged with the - * existing values. Therefore, enum values can only be added, existing enum - * values cannot be deleted nor renamed. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateTagTemplateFieldRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const UpdateTagTemplateFieldRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * RenameTagTemplateField. - * - * @property {string} name - * Required. The name of the tag template. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * - * @property {string} newTagTemplateFieldId - * Required. The new ID of this tag template field. For example, - * `my_new_field`. - * - * @typedef RenameTagTemplateFieldRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const RenameTagTemplateFieldRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * DeleteTagTemplateField. - * - * @property {string} name - * Required. The name of the tag template field to delete. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * - * @property {boolean} force - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of this field from any tags using this field. - * `force = false` will be supported in the future. - * - * @typedef DeleteTagTemplateFieldRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const DeleteTagTemplateFieldRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for - * ListTags. - * - * @property {string} parent - * Required. The name of the Data Catalog resource to list the tags of. The - * resource could be an Entry. - * - * @property {number} pageSize - * The maximum number of tags to return. Default is 10. Max limit is 1000. - * - * @property {string} pageToken - * Token that specifies which page is requested. If empty, the first page is - * returned. - * - * @typedef ListTagsRequest - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.ListTagsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const ListTagsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for - * ListTags. - * - * @property {Object[]} tags - * Tag details. - * - * This object should have the same structure as [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} - * - * @property {string} nextPageToken - * Token to retrieve the next page of results. It is set to empty if no items - * remain in results. - * - * @typedef ListTagsResponse - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.ListTagsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/datacatalog.proto} - */ -const ListTagsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Entry resources in Data Catalog can be of different types e.g. a BigQuery - * Table entry is of type `TABLE`. This enum describes all the possible types - * Data Catalog contains. - * - * @enum {number} - * @memberof google.cloud.datacatalog.v1beta1 - */ -const EntryType = { - - /** - * Default unknown type - */ - ENTRY_TYPE_UNSPECIFIED: 0, - - /** - * Output only. The type of entry that has a GoogleSQL schema, including - * logical views. - */ - TABLE: 2, - - /** - * Output only. An entry type which is used for streaming entries. Example: - * Cloud Pub/Sub topic. - */ - DATA_STREAM: 3, - - /** - * Alpha feature. An entry type which is a set of files or objects. Example: - * Cloud Storage fileset. - */ - FILESET: 4 -}; \ No newline at end of file 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 deleted file mode 100644 index 780c8b6baf0..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_gcs_fileset_spec.js +++ /dev/null @@ -1,67 +0,0 @@ -// 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. - -/** - * Describes a Cloud Storage fileset entry. - * - * @property {string[]} filePatterns - * Required. Patterns to identify a set of files in Google Cloud Storage. - * - * Examples of valid file_patterns: - * - * * `gs://bucket_name/*`: matches all files in `bucket_name` - * * `gs://bucket_name/file*`: matches files prefixed by `file` in - * `bucket_name` - * * `gs://bucket_name/a/* /b`: matches all files in `bucket_name` that match - * `a/* /b` pattern, such as `a/c/b`, `a/d/b` - * * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - * - * @property {Object[]} sampleGcsFileSpecs - * Output only. Sample files contained in this fileset, not all files - * contained in this fileset are represented here. - * - * This object should have the same structure as [GcsFileSpec]{@link google.cloud.datacatalog.v1beta1.GcsFileSpec} - * - * @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. -}; - -/** - * Specifications of a single file in GCS. - * - * @property {string} filePath - * Required. The full file path. Example: `gs://bucket_name/a/b.txt`. - * - * @property {Object} gcsTimestamps - * Output only. Timestamps about the GCS file. - * - * This object should have the same structure as [SystemTimestamps]{@link google.cloud.datacatalog.v1beta1.SystemTimestamps} - * - * @property {number} sizeBytes - * Output only. The size of the file, in bytes. - * - * @typedef GcsFileSpec - * @memberof google.cloud.datacatalog.v1beta1 - - */ -const GcsFileSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_schema.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_schema.js deleted file mode 100644 index 6c3606941c2..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_schema.js +++ /dev/null @@ -1,65 +0,0 @@ -// 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 a schema (e.g. BigQuery, GoogleSQL, Avro schema). - * - * @property {Object[]} columns - * Required. Schema of columns. A maximum of 10,000 columns and sub-columns - * can be specified. - * - * This object should have the same structure as [ColumnSchema]{@link google.cloud.datacatalog.v1beta1.ColumnSchema} - * - * @typedef Schema - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.Schema definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/schema.proto} - */ -const Schema = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Representation of a column within a schema. Columns could be nested inside - * other columns. - * - * @property {string} column - * Required. Name of the column. - * - * @property {string} type - * Required. Type of the column. - * - * @property {string} description - * Optional. Description of the column. Default value is an empty string. - * - * @property {string} mode - * Optional. A column's mode indicates whether the values in this column are - * required, nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are - * supported. Default mode is `NULLABLE`. - * - * @property {Object[]} subcolumns - * Optional. Schema of sub-columns. A column can have zero or more - * sub-columns. - * - * This object should have the same structure as [ColumnSchema]{@link google.cloud.datacatalog.v1beta1.ColumnSchema} - * - * @typedef ColumnSchema - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.ColumnSchema definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/schema.proto} - */ -const ColumnSchema = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_search.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_search.js deleted file mode 100644 index aa7cb37c0fb..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_search.js +++ /dev/null @@ -1,83 +0,0 @@ -// 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. - -/** - * A result that appears in the response of a search request. Each result - * captures details of one entry that matches the search. - * - * @property {number} searchResultType - * Type of the search result. This field can be used to determine which Get - * method to call to fetch the full resource. - * - * The number should be among the values of [SearchResultType]{@link google.cloud.datacatalog.v1beta1.SearchResultType} - * - * @property {string} searchResultSubtype - * Sub-type of the search result. This is a dot-delimited description of the - * resource's full type, and is the same as the value callers would provide in - * the "type" search facet. Examples: `entry.table`, `entry.dataStream`, - * `tagTemplate`. - * - * @property {string} relativeResourceName - * The relative resource name of the resource in URL format. - * Examples: - * - * * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` - * * `projects/{project_id}/tagTemplates/{tag_template_id}` - * - * @property {string} linkedResource - * The full name of the cloud resource the entry belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name. - * Example: - * - * * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` - * - * @typedef SearchCatalogResult - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.SearchCatalogResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/search.proto} - */ -const SearchCatalogResult = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The different types of resources that can be returned in search. - * - * @enum {number} - * @memberof google.cloud.datacatalog.v1beta1 - */ -const SearchResultType = { - - /** - * Default unknown type. - */ - SEARCH_RESULT_TYPE_UNSPECIFIED: 0, - - /** - * An Entry. - */ - ENTRY: 1, - - /** - * A TagTemplate. - */ - TAG_TEMPLATE: 2, - - /** - * An EntryGroup. - */ - ENTRY_GROUP: 3 -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_table_spec.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_table_spec.js deleted file mode 100644 index 2fdb6828a56..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_table_spec.js +++ /dev/null @@ -1,127 +0,0 @@ -// 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. - -/** - * Describes a BigQuery table. - * - * @property {number} tableSourceType - * Output only. The table source type. - * - * The number should be among the values of [TableSourceType]{@link google.cloud.datacatalog.v1beta1.TableSourceType} - * - * @property {Object} viewSpec - * Table view specification. This field should only be populated if - * `table_source_type` is `BIGQUERY_VIEW`. - * - * This object should have the same structure as [ViewSpec]{@link google.cloud.datacatalog.v1beta1.ViewSpec} - * - * @property {Object} tableSpec - * Spec of a BigQuery table. This field should only be populated if - * `table_source_type` is `BIGQUERY_TABLE`. - * - * This object should have the same structure as [TableSpec]{@link google.cloud.datacatalog.v1beta1.TableSpec} - * - * @typedef BigQueryTableSpec - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.BigQueryTableSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/table_spec.proto} - */ -const BigQueryTableSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Table view specification. - * - * @property {string} viewQuery - * Output only. The query that defines the table view. - * - * @typedef ViewSpec - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.ViewSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/table_spec.proto} - */ -const ViewSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Normal BigQuery table spec. - * - * @property {string} groupedEntry - * Output only. If the table is a dated shard, i.e., with name pattern - * `[prefix]YYYYMMDD`, `grouped_entry` is the Data Catalog resource name of - * the date sharded grouped entry, for example, - * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - * Otherwise, `grouped_entry` is empty. - * - * @typedef TableSpec - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.TableSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/table_spec.proto} - */ -const TableSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. - * Context: - * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding - * - * @property {string} dataset - * Output only. The Data Catalog resource name of the dataset entry the - * current table belongs to, for example, - * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - * - * @property {string} tablePrefix - * Output only. The table name prefix of the shards. The name of any given - * shard is - * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the - * `table_prefix` is `MyTable`. - * - * @property {number} shardCount - * Output only. Total number of shards. - * - * @typedef BigQueryDateShardedSpec - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/table_spec.proto} - */ -const BigQueryDateShardedSpec = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Table source type. - * - * @enum {number} - * @memberof google.cloud.datacatalog.v1beta1 - */ -const TableSourceType = { - - /** - * Default unknown type. - */ - TABLE_SOURCE_TYPE_UNSPECIFIED: 0, - - /** - * Table view. - */ - BIGQUERY_VIEW: 2, - - /** - * BigQuery native table. - */ - BIGQUERY_TABLE: 5 -}; \ No newline at end of file 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 deleted file mode 100644 index 2baf18ee53c..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_tags.js +++ /dev/null @@ -1,255 +0,0 @@ -// 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. - -/** - * Tags are used to attach custom metadata to Data Catalog resources. Tags - * conform to the specifications within their tag template. - * - * @property {string} name - * The resource name of the tag in URL format. Example: - * - * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - * - * 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. - * Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * - * This field cannot be modified after creation. - * - * @property {string} templateDisplayName - * Output only. The display name of the tag template. - * - * @property {string} column - * Resources like Entry can have schemas associated with them. This scope - * allows users to attach tags to an individual column based on that schema. - * - * For attaching a tag to a nested column, use `.` to separate the column - * names. Example: - * - * * `outer_column.inner_column` - * - * @property {Object.} fields - * Required. This maps the ID of a tag field to the value of and additional - * information about that field. Valid field IDs are defined by the tag's - * template. A tag must have at least 1 field and at most 500 fields. - * - * @typedef Tag - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.Tag definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ -const Tag = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains the value and supporting information for a field within - * a Tag. - * - * @property {string} displayName - * Output only. The display name of this field. - * - * @property {number} doubleValue - * Holds the value for a tag field with double type. - * - * @property {string} stringValue - * Holds the value for a tag field with string type. - * - * @property {boolean} boolValue - * Holds the value for a tag field with boolean type. - * - * @property {Object} timestampValue - * Holds the value for a tag field with timestamp type. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} enumValue - * Holds the value for a tag field with enum type. This value must be - * one of the allowed values in the definition of this enum. - * - * This object should have the same structure as [EnumValue]{@link google.cloud.datacatalog.v1beta1.EnumValue} - * - * @typedef TagField - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.TagField definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ -const TagField = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Holds an enum value. - * - * @property {string} displayName - * The display name of the enum value. - * - * @typedef EnumValue - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.TagField.EnumValue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ - EnumValue: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * A tag template 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 - * The resource name of the tag template in URL format. 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 - * The display name for this template. Defaults to an empty string. - * - * @property {Object.} fields - * Required. Map of tag template field IDs to the settings for the field. - * 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 underscore. - * - * @typedef TagTemplate - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.TagTemplate definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ -const TagTemplate = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The template for an individual field within a tag template. - * - * @property {string} name - * Output only. The resource name of the tag template field in URL format. - * Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - * - * Note that this TagTemplateField may not actually be stored in the location - * in this name. - * - * @property {string} displayName - * The display name for this field. Defaults to an empty string. - * - * @property {Object} type - * Required. The type of value this tag field can contain. - * - * This object should have the same structure as [FieldType]{@link google.cloud.datacatalog.v1beta1.FieldType} - * - * @typedef TagTemplateField - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.TagTemplateField definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ -const TagTemplateField = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * @property {number} primitiveType - * Represents primitive types - string, bool etc. - * - * The number should be among the values of [PrimitiveType]{@link google.cloud.datacatalog.v1beta1.PrimitiveType} - * - * @property {Object} enumType - * Represents an enum type. - * - * This object should have the same structure as [EnumType]{@link google.cloud.datacatalog.v1beta1.EnumType} - * - * @typedef FieldType - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.FieldType definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ -const FieldType = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * @property {Object[]} allowedValues - * Required on create; optional on update. The set of allowed values for - * this enum. This set must not be empty, the display names of the values in - * this set must not be empty and the display names of the values must be - * case-insensitively unique within this set. Currently, enum values can - * only be added to the list of allowed values. Deletion and renaming of - * enum values are not supported. Can have up to 500 allowed values. - * - * This object should have the same structure as [EnumValue]{@link google.cloud.datacatalog.v1beta1.EnumValue} - * - * @typedef EnumType - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.FieldType.EnumType definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ - EnumType: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * @property {string} displayName - * Required. The display name of the enum value. Must not be an empty - * string. - * - * @typedef EnumValue - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/tags.proto} - */ - EnumValue: { - // This is for documentation. Actual contents will be loaded by gRPC. - } - }, - - /** - * @enum {number} - * @memberof google.cloud.datacatalog.v1beta1 - */ - PrimitiveType: { - - /** - * This is the default invalid value for a type. - */ - PRIMITIVE_TYPE_UNSPECIFIED: 0, - - /** - * A double precision number. - */ - DOUBLE: 1, - - /** - * An UTF-8 string. - */ - STRING: 2, - - /** - * A boolean value. - */ - BOOL: 3, - - /** - * A timestamp. - */ - TIMESTAMP: 4 - } -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_timestamps.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_timestamps.js deleted file mode 100644 index 21ad92ada50..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/cloud/datacatalog/v1beta1/doc_timestamps.js +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -/** - * Timestamps about this resource according to a particular system. - * - * @property {Object} createTime - * The creation time of the resource within the given system. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * The last-modified time of the resource within the given system. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} expireTime - * Output only. The expiration time of the resource within the given system. - * Currently only apllicable to BigQuery resources. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef SystemTimestamps - * @memberof google.cloud.datacatalog.v1beta1 - * @see [google.cloud.datacatalog.v1beta1.SystemTimestamps definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/datacatalog/v1beta1/timestamps.proto} - */ -const SystemTimestamps = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file 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 deleted file mode 100644 index 15b6fb823d4..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_iam_policy.js +++ /dev/null @@ -1,96 +0,0 @@ -// 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. - -/** - * Request message for `SetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being specified. - * 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 - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * - * @typedef SetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const SetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `GetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * - * @typedef GetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const GetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `TestIamPermissions` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy detail is being requested. - * 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 - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * - * @typedef TestIamPermissionsRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for `TestIamPermissions` method. - * - * @property {string[]} permissions - * A subset of `TestPermissionsRequest.permissions` that the caller is - * allowed. - * - * @typedef TestIamPermissionsResponse - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_options.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_options.js deleted file mode 100644 index b725d806cce..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_options.js +++ /dev/null @@ -1,37 +0,0 @@ -// 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. - -/** - * Encapsulates settings provided to GetIamPolicy. - * - * @property {number} requestedPolicyVersion - * Optional. The policy format version to be returned. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Requests for policies with any conditional bindings must specify version 3. - * Policies without any conditional bindings may specify any valid value or - * leave the field unset. - * - * @typedef GetPolicyOptions - * @memberof google.iam.v1 - * @see [google.iam.v1.GetPolicyOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/options.proto} - */ -const GetPolicyOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file 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 deleted file mode 100644 index 57db8df60b1..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/iam/v1/doc_policy.js +++ /dev/null @@ -1,166 +0,0 @@ -// 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. - -/** - * Defines an Identity and Access Management (IAM) policy. It is used to - * specify access control policies for Cloud Platform resources. - * - * - * A `Policy` is a collection of `bindings`. A `binding` binds one or more - * `members` to a single `role`. Members can be user accounts, service accounts, - * Google groups, and domains (such as G Suite). A `role` is a named list of - * permissions (defined by IAM or configured by users). A `binding` can - * optionally specify a `condition`, which is a logic expression that further - * constrains the role binding based on attributes about the request and/or - * target resource. - * - * **JSON Example** - * - * { - * "bindings": [ - * { - * "role": "roles/resourcemanager.organizationAdmin", - * "members": [ - * "user:mike@example.com", - * "group:admins@example.com", - * "domain:google.com", - * "serviceAccount:my-project-id@appspot.gserviceaccount.com" - * ] - * }, - * { - * "role": "roles/resourcemanager.organizationViewer", - * "members": ["user:eve@example.com"], - * "condition": { - * "title": "expirable access", - * "description": "Does not grant access after Sep 2020", - * "expression": "request.time < - * timestamp('2020-10-01T00:00:00.000Z')", - * } - * } - * ] - * } - * - * **YAML Example** - * - * bindings: - * - members: - * - user:mike@example.com - * - group:admins@example.com - * - domain:google.com - * - serviceAccount:my-project-id@appspot.gserviceaccount.com - * role: roles/resourcemanager.organizationAdmin - * - members: - * - user:eve@example.com - * role: roles/resourcemanager.organizationViewer - * condition: - * title: expirable access - * description: Does not grant access after Sep 2020 - * expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - * - * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam/docs). - * - * @property {number} version - * Specifies the format of the policy. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Operations affecting conditional bindings must specify version 3. This can - * be either setting a conditional policy, modifying a conditional binding, - * or removing a conditional binding from the stored conditional policy. - * Operations on non-conditional policies may specify any valid value or - * leave the field unset. - * - * If no etag is provided in the call to `setIamPolicy`, any version - * compliance checks on the incoming and/or stored policy is skipped. - * - * @property {Object[]} bindings - * Associates a list of `members` to a `role`. Optionally may specify a - * `condition` that determines when binding is in effect. - * `bindings` with no members will result in an error. - * - * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} - * - * @property {Buffer} etag - * `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a policy from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform policy updates in order to avoid race - * conditions: An `etag` is returned in the response to `getIamPolicy`, and - * systems are expected to put that etag in the request to `setIamPolicy` to - * ensure that their change will be applied to the same version of the policy. - * - * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten. Due to blind-set semantics of an etag-less policy, - * 'setIamPolicy' will not fail even if either of incoming or stored policy - * does not meet the version requirements. - * - * @typedef Policy - * @memberof google.iam.v1 - * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Policy = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Associates `members` with a `role`. - * - * @property {string} role - * Role that is assigned to `members`. - * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * - * @property {string[]} members - * Specifies the identities requesting access for a Cloud Platform resource. - * `members` can have the following values: - * - * * `allUsers`: A special identifier that represents anyone who is - * on the internet; with or without a Google account. - * - * * `allAuthenticatedUsers`: A special identifier that represents anyone - * 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@example.com` . - * - * - * * `serviceAccount:{emailid}`: An email address that represents a service - * account. For example, `my-other-app@appspot.gserviceaccount.com`. - * - * * `group:{emailid}`: An email address that represents a Google group. - * For example, `admins@example.com`. - * - * - * * `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} - */ -const Binding = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +0,0 @@ -// 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. - -/** - * 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 JSON representation for `Empty` is empty JSON object `{}`. - * @typedef Empty - * @memberof google.protobuf - * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} - */ -const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// 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. - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, new values will - * be appended to the existing repeated field in the target resource. Note that - * a repeated field is only allowed in the last position of a `paths` string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then new value will be merged into the existing sub-message - * in the target resource. - * - * For example, given the target message: - * - * f { - * b { - * d: 1 - * x: 2 - * } - * c: [1] - * } - * - * And an update message: - * - * f { - * b { - * d: 10 - * } - * c: [2] - * } - * - * then if the field mask is: - * - * paths: ["f.b", "f.c"] - * - * then the result will be: - * - * f { - * b { - * d: 10 - * x: 2 - * } - * c: [1, 2] - * } - * - * An implementation may provide options to override this default behavior for - * repeated and message fields. - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - * - * ## Field Mask Verification - * - * The implementation of any API method which has a FieldMask type field in the - * request should verify the included field paths, and return an - * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. - * - * @property {string[]} paths - * The set of field mask paths. - * - * @typedef FieldMask - * @memberof google.protobuf - * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} - */ -const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index 3bc1e986897..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,119 +0,0 @@ -// 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. - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - * - * @property {number} seconds - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * - * @property {number} nanos - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * - * @typedef Timestamp - * @memberof google.protobuf - * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ -const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file 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 deleted file mode 100644 index 421a7ee9e6a..00000000000 --- a/packages/google-cloud-datacatalog/src/v1beta1/doc/google/type/doc_expr.js +++ /dev/null @@ -1,51 +0,0 @@ -// 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/src/browser.js b/packages/google-cloud-datacatalog/src/v1beta1/index.ts similarity index 58% rename from packages/google-cloud-datacatalog/src/browser.js rename to packages/google-cloud-datacatalog/src/v1beta1/index.ts index ddbcd7ecb9a..4c67918ace2 100644 --- a/packages/google-cloud-datacatalog/src/browser.js +++ b/packages/google-cloud-datacatalog/src/v1beta1/index.ts @@ -11,11 +11,11 @@ // 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -// Set a flag that we are running in a browser bundle. -global.isBrowser = true; - -// Re-export all exports from ./index.js. -module.exports = require('./index'); +export {DataCatalogClient} from './data_catalog_client'; +export {PolicyTagManagerClient} from './policy_tag_manager_client'; +export {PolicyTagManagerSerializationClient} from './policy_tag_manager_serialization_client'; diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts new file mode 100644 index 00000000000..b8820e19594 --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts @@ -0,0 +1,1471 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './policy_tag_manager_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The policy tag manager API service allows clients to manage their taxonomies + * and policy tags. + * @class + * @memberof v1beta1 + */ +export class PolicyTagManagerClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _policyTagManagerStub: Promise<{[name: string]: Function}>; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + + /** + * Construct an instance of PolicyTagManagerClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof PolicyTagManagerClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof PolicyTagManagerClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + taxonomyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' + ), + policyTagPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this._descriptors.page = { + listTaxonomies: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'taxonomies' + ), + listPolicyTags: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'policy_tags' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.datacatalog.v1beta1.PolicyTagManager', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + + // Put together the "service stub" for + // google.cloud.datacatalog.v1beta1.PolicyTagManager. + this._policyTagManagerStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.datacatalog.v1beta1.PolicyTagManager' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.datacatalog.v1beta1.PolicyTagManager, + opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const policyTagManagerStubMethods = [ + 'createTaxonomy', + 'deleteTaxonomy', + 'updateTaxonomy', + 'listTaxonomies', + 'getTaxonomy', + 'createPolicyTag', + 'deletePolicyTag', + 'updatePolicyTag', + 'listPolicyTags', + 'getPolicyTag', + 'getIamPolicy', + 'setIamPolicy', + 'testIamPermissions', + ]; + + for (const methodName of policyTagManagerStubMethods) { + const innerCallPromise = this._policyTagManagerStub.then( + stub => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'datacatalog.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + createTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest + | undefined + ), + {} | undefined + ] + >; + createTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a taxonomy in the specified project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project that the taxonomy will belong to. + * @param {google.cloud.datacatalog.v1beta1.Taxonomy} request.taxonomy + * The taxonomy to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createTaxonomy(request, options, callback); + } + deleteTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest + | undefined + ), + {} | undefined + ] + >; + deleteTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a taxonomy. This operation will also delete all + * policy tags in this taxonomy along with their associated policies. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the taxonomy to be deleted. All policy tags in + * this taxonomy will also be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deleteTaxonomy(request, options, callback); + } + updateTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest + | undefined + ), + {} | undefined + ] + >; + updateTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a taxonomy. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.Taxonomy} request.taxonomy + * The taxonomy to update. Only description, display_name, and activated + * policy types can be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + taxonomy_name: request.taxonomy!.name || '', + }); + return this._innerApiCalls.updateTaxonomy(request, options, callback); + } + getTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest + | undefined + ), + {} | undefined + ] + >; + getTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a taxonomy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the requested taxonomy. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getTaxonomy( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getTaxonomy(request, options, callback); + } + createPolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest + | undefined + ), + {} | undefined + ] + >; + createPolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a policy tag in the specified taxonomy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the taxonomy that the policy tag will belong to. + * @param {google.cloud.datacatalog.v1beta1.PolicyTag} request.policyTag + * The policy tag to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createPolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.createPolicyTag(request, options, callback); + } + deletePolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest + | undefined + ), + {} | undefined + ] + >; + deletePolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a policy tag. Also deletes all of its descendant policy tags. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the policy tag to be deleted. All of its descendant + * policy tags will also be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deletePolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.deletePolicyTag(request, options, callback); + } + updatePolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest + | undefined + ), + {} | undefined + ] + >; + updatePolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a policy tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.datacatalog.v1beta1.PolicyTag} request.policyTag + * The policy tag to update. Only the description, display_name, and + * parent_policy_tag fields can be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. Only display_name, description and + * parent_policy_tag can be updated and thus can be listed in the mask. If + * update_mask is not provided, all allowed fields (i.e. display_name, + * description and parent) will be updated. For more information including the + * `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updatePolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + policy_tag_name: request.policyTag!.name || '', + }); + return this._innerApiCalls.updatePolicyTag(request, options, callback); + } + getPolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest + | undefined + ), + {} | undefined + ] + >; + getPolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a policy tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the requested policy tag. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getPolicyTag( + request: protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + | protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getPolicyTag(request, options, callback); + } + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + >; + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets the IAM policy for a taxonomy or a policy tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: protosTypes.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.getIamPolicy(request, options, callback); + } + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Sets the IAM policy for a taxonomy or a policy tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: protosTypes.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.IPolicy, + protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.setIamPolicy(request, options, callback); + } + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + > + ): void; + /** + * Returns the permissions that a caller has on the specified taxonomy or + * policy tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + testIamPermissions( + request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.iam.v1.ITestIamPermissionsResponse, + protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.testIamPermissions(request, options, callback); + } + + listTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse + ] + >; + listTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse + > + ): void; + /** + * Lists all taxonomies in a project in a particular location that the caller + * has permission to view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project to list the taxonomies of. + * @param {number} request.pageSize + * The maximum number of items to return. Must be a value between 1 and 1000. + * If not set, defaults to 50. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ListTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.ITaxonomy[], + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.listTaxonomies(request, options, callback); + } + + /** + * Equivalent to {@link listTaxonomies}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listTaxonomies} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project to list the taxonomies of. + * @param {number} request.pageSize + * The maximum number of items to return. Must be a value between 1 and 1000. + * If not set, defaults to 50. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. If + * not set, defaults to an empty string. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy} on 'data' event. + */ + listTaxonomiesStream( + request?: protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listTaxonomies.createStream( + this._innerApiCalls.listTaxonomies as gax.GaxCall, + request, + callSettings + ); + } + listPolicyTags( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse + ] + >; + listPolicyTags( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse + > + ): void; + /** + * Lists all policy tags in a taxonomy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the taxonomy to list the policy tags of. + * @param {number} request.pageSize + * The maximum number of items to return. Must be a value between 1 and 1000. + * If not set, defaults to 50. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. If + * not set, defaults to an empty string. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListPolicyTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ListPolicyTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListPolicyTagsResponse]{@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listPolicyTags( + request: protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IPolicyTag[], + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, + protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.listPolicyTags(request, options, callback); + } + + /** + * Equivalent to {@link listPolicyTags}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listPolicyTags} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the taxonomy to list the policy tags of. + * @param {number} request.pageSize + * The maximum number of items to return. Must be a value between 1 and 1000. + * If not set, defaults to 50. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. If + * not set, defaults to an empty string. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag} on 'data' event. + */ + listPolicyTagsStream( + request?: protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listPolicyTags.createStream( + this._innerApiCalls.listPolicyTags as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + taxonomyPath(project: string, location: string, taxonomy: string) { + return this._pathTemplates.taxonomyPathTemplate.render({ + project, + location, + taxonomy, + }); + } + matchProjectFromTaxonomyName(taxonomyName: string) { + return this._pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; + } + matchLocationFromTaxonomyName(taxonomyName: string) { + return this._pathTemplates.taxonomyPathTemplate.match(taxonomyName) + .location; + } + matchTaxonomyFromTaxonomyName(taxonomyName: string) { + return this._pathTemplates.taxonomyPathTemplate.match(taxonomyName) + .taxonomy; + } + policytagPath(project: string, location: string, taxonomy: string) { + return this._pathTemplates.policytagPathTemplate.render({ + project, + location, + taxonomy, + }); + } + matchProjectFromPolicyTagName(policytagName: string) { + return this._pathTemplates.policytagPathTemplate.match(policytagName) + .project; + } + matchLocationFromPolicyTagName(policytagName: string) { + return this._pathTemplates.policytagPathTemplate.match(policytagName) + .location; + } + matchTaxonomyFromPolicyTagName(policytagName: string) { + return this._pathTemplates.policytagPathTemplate.match(policytagName) + .taxonomy; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this._policyTagManagerStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client_config.json b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client_config.json new file mode 100644 index 00000000000..23dfc3b4a4f --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client_config.json @@ -0,0 +1,78 @@ +{ + "interfaces": { + "google.cloud.datacatalog.v1beta1.PolicyTagManager": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTaxonomies": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreatePolicyTag": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePolicyTag": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdatePolicyTag": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListPolicyTags": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPolicyTag": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_proto_list.json b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_proto_list.json new file mode 100644 index 00000000000..7dea8d511e4 --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_proto_list.json @@ -0,0 +1,11 @@ +[ + "../../protos/google/cloud/datacatalog/v1beta1/tags.proto", + "../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto", + "../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto", + "../../protos/google/cloud/datacatalog/v1beta1/schema.proto", + "../../protos/google/cloud/datacatalog/v1beta1/search.proto", + "../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto", + "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto", + "../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto", + "../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto" +] diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts new file mode 100644 index 00000000000..7645878b204 --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts @@ -0,0 +1,478 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; +import * as path from 'path'; + +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './policy_tag_manager_serialization_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Policy tag manager serialization API service allows clients to manipulate + * their taxonomies and policy tags data with serialized format. + * @class + * @memberof v1beta1 + */ +export class PolicyTagManagerSerializationClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _policyTagManagerSerializationStub: Promise<{ + [name: string]: Function; + }>; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + + /** + * Construct an instance of PolicyTagManagerSerializationClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this + .constructor as typeof PolicyTagManagerSerializationClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this + .constructor as typeof PolicyTagManagerSerializationClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this._pathTemplates = { + taxonomyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this._innerApiCalls = {}; + + // Put together the "service stub" for + // google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization. + this._policyTagManagerSerializationStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization' + ) + : // tslint:disable-next-line no-any + (protos as any).google.cloud.datacatalog.v1beta1 + .PolicyTagManagerSerialization, + opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const policyTagManagerSerializationStubMethods = [ + 'importTaxonomies', + 'exportTaxonomies', + ]; + + for (const methodName of policyTagManagerSerializationStubMethods) { + const innerCallPromise = this._policyTagManagerSerializationStub.then( + stub => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'datacatalog.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'datacatalog.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + importTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest + | undefined + ), + {} | undefined + ] + >; + importTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, + | protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest + | undefined, + {} | undefined + > + ): void; + /** + * Imports all taxonomies and their policy tags to a project as new + * taxonomies. + * + * This method provides a bulk taxonomy / policy tag creation using nested + * proto structure. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of project that the newly created taxonomies will + * belong to. + * @param {google.cloud.datacatalog.v1beta1.InlineSource} request.inlineSource + * Inline source used for taxonomies import + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ImportTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + importTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, + | protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, + | protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.importTaxonomies(request, options, callback); + } + exportTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest + | undefined + ), + {} | undefined + ] + >; + exportTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, + | protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest + | undefined, + {} | undefined + > + ): void; + /** + * Exports all taxonomies and their policy tags in a project. + * + * This method generates SerializedTaxonomy protos with nested policy tags + * that can be used as an input for future ImportTaxonomies calls. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project that taxonomies to be exported + * will share. + * @param {string[]} request.taxonomies + * Required. Resource names of the taxonomies to be exported. + * @param {boolean} request.serializedTaxonomies + * Export taxonomies as serialized taxonomies. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ExportTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + exportTaxonomies( + request: protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, + | protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, + | protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, + ( + | protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + 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 || '', + }); + return this._innerApiCalls.exportTaxonomies(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + taxonomyPath(project: string, location: string, taxonomy: string) { + return this._pathTemplates.taxonomyPathTemplate.render({ + project, + location, + taxonomy, + }); + } + matchProjectFromTaxonomyName(taxonomyName: string) { + return this._pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; + } + matchLocationFromTaxonomyName(taxonomyName: string) { + return this._pathTemplates.taxonomyPathTemplate.match(taxonomyName) + .location; + } + matchTaxonomyFromTaxonomyName(taxonomyName: string) { + return this._pathTemplates.taxonomyPathTemplate.match(taxonomyName) + .taxonomy; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this._policyTagManagerSerializationStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client_config.json b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client_config.json new file mode 100644 index 00000000000..1b9eecaceac --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ImportTaxonomies": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExportTaxonomies": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_proto_list.json b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_proto_list.json new file mode 100644 index 00000000000..7dea8d511e4 --- /dev/null +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_proto_list.json @@ -0,0 +1,11 @@ +[ + "../../protos/google/cloud/datacatalog/v1beta1/tags.proto", + "../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto", + "../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto", + "../../protos/google/cloud/datacatalog/v1beta1/schema.proto", + "../../protos/google/cloud/datacatalog/v1beta1/search.proto", + "../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto", + "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto", + "../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto", + "../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto" +] diff --git a/packages/google-cloud-datacatalog/synth.metadata b/packages/google-cloud-datacatalog/synth.metadata index da8efa9ca48..f2c09e7aadc 100644 --- a/packages/google-cloud-datacatalog/synth.metadata +++ b/packages/google-cloud-datacatalog/synth.metadata @@ -1,19 +1,12 @@ { - "updateTime": "2019-11-09T12:12:09.084785Z", + "updateTime": "2019-11-20T23:32:02.897435Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "0.41.1", - "dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "34e661f58d58fa57da8ed113a3d8bb3de26b307d", - "internalRef": "279417429" + "sha": "d47e1b4485b3effbb2298eb10dd13a544c0f66dc", + "internalRef": "281594037" } }, { @@ -30,9 +23,8 @@ "source": "googleapis", "apiName": "datacatalog", "apiVersion": "v1beta1", - "language": "nodejs", - "generator": "gapic", - "config": "google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } ] diff --git a/packages/google-cloud-datacatalog/synth.py b/packages/google-cloud-datacatalog/synth.py index 9ad92eaad45..1a421e889c5 100644 --- a/packages/google-cloud-datacatalog/synth.py +++ b/packages/google-cloud-datacatalog/synth.py @@ -22,51 +22,34 @@ logging.basicConfig(level=logging.DEBUG) # Run the gapic generator -gapic = gcp.GAPICGenerator() +gapic = gcp.GAPICMicrogenerator() +name = 'datacatalog' versions = ['v1beta1'] for version in versions: - library = gapic.node_library( - 'datacatalog', + library = gapic.typescript_library( + name, version, - config_path='v1beta1/artman_datacatalog_v1beta1.yaml', - private=False, + proto_path=f'google/cloud/{name}/{version}', + generator_args={ + 'grpc-service-config': f'google/cloud/{name}/{version}/{name}_grpc_service_config.json', + 'package-name': f'@google-cloud/{name}' + } ) s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +templates = common_templates.node_library(source_location='build/src') 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""" -""") +# Fix broken links to cloud.google.com documentation +s.replace('src/v1beta1/*.ts', '/data-catalog/docs/', 'https://cloud.google.com/data-catalog/docs/') # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npx', 'compileProtos', 'src']) + +# Fix broken links to cloud.google.com documentation +s.replace('protos/protos.js', '/data-catalog/docs/', 'https://cloud.google.com/data-catalog/docs/') + diff --git a/packages/google-cloud-datacatalog/system-test/.eslintrc.yml b/packages/google-cloud-datacatalog/system-test/.eslintrc.yml index becdbd1640b..dc5d9b0171b 100644 --- a/packages/google-cloud-datacatalog/system-test/.eslintrc.yml +++ b/packages/google-cloud-datacatalog/system-test/.eslintrc.yml @@ -1,5 +1,4 @@ --- env: mocha: true -rules: - no-console: off \ No newline at end of file + diff --git a/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..d55eedb04f0 --- /dev/null +++ b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const datacatalog = require('@google-cloud/datacatalog'); + +function main() { + const dataCatalogClient = new datacatalog.DataCatalogClient(); + const policyTagManagerClient = new datacatalog.PolicyTagManagerClient(); + const policyTagManagerSerializationClient = new datacatalog.PolicyTagManagerSerializationClient(); +} + +main(); diff --git a/packages/google-cloud-datacatalog/src/v1beta1/index.js b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts similarity index 51% rename from packages/google-cloud-datacatalog/src/v1beta1/index.js rename to packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts index f496cd89bcf..0b91c0475ab 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/index.js +++ b/packages/google-cloud-datacatalog/system-test/fixtures/sample/src/index.ts @@ -11,9 +11,17 @@ // 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; +import {DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient} from '@google-cloud/datacatalog'; -const DataCatalogClient = require('./data_catalog_client'); +function main() { + const dataCatalogClient = new DataCatalogClient(); + const policyTagManagerClient = new PolicyTagManagerClient(); + const policyTagManagerSerializationClient = new PolicyTagManagerSerializationClient(); +} -module.exports.DataCatalogClient = DataCatalogClient; +main(); diff --git a/packages/google-cloud-datacatalog/system-test/install.ts b/packages/google-cloud-datacatalog/system-test/install.ts new file mode 100644 index 00000000000..2736aee84f7 --- /dev/null +++ b/packages/google-cloud-datacatalog/system-test/install.ts @@ -0,0 +1,50 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; + +describe('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); + + it('should have correct type signature for javascript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); +}); diff --git a/packages/google-cloud-datacatalog/system-test/no-test.js b/packages/google-cloud-datacatalog/system-test/no-test.js deleted file mode 100644 index ed54b008e0c..00000000000 --- a/packages/google-cloud-datacatalog/system-test/no-test.js +++ /dev/null @@ -1 +0,0 @@ -console.log('no tests yet'); diff --git a/packages/google-cloud-datacatalog/test/gapic-v1beta1.js b/packages/google-cloud-datacatalog/test/gapic-data_catalog-v1beta1.ts similarity index 54% rename from packages/google-cloud-datacatalog/test/gapic-v1beta1.js rename to packages/google-cloud-datacatalog/test/gapic-data_catalog-v1beta1.ts index 93bf0be642c..e6d2aa24e25 100644 --- a/packages/google-cloud-datacatalog/test/gapic-v1beta1.js +++ b/packages/google-cloud-datacatalog/test/gapic-data_catalog-v1beta1.ts @@ -11,151 +11,93 @@ // 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** -'use strict'; - -const assert = require('assert'); - +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; const datacatalogModule = require('../src'); const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} describe('DataCatalogClient', () => { it('has servicePath', () => { const servicePath = datacatalogModule.v1beta1.DataCatalogClient.servicePath; assert(servicePath); }); - it('has apiEndpoint', () => { const apiEndpoint = datacatalogModule.v1beta1.DataCatalogClient.apiEndpoint; assert(apiEndpoint); }); - it('has port', () => { const port = datacatalogModule.v1beta1.DataCatalogClient.port; assert(port); assert(typeof port === 'number'); }); - - it('should create a client with no options', () => { + it('should create a client with no option', () => { const client = new datacatalogModule.v1beta1.DataCatalogClient(); assert(client); }); - - it('should create a client with gRPC fallback', () => { + it('should create a client with gRPC option', () => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ fallback: true, }); assert(client); }); - - describe('searchCatalog', () => { - it('invokes searchCatalog without error', done => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const scope = {}; - const query = 'query107944136'; - const request = { - scope: scope, - query: query, - }; - - // Mock response - const nextPageToken = ''; - const resultsElement = {}; - const results = [resultsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - results: results, - }; - - // Mock Grpc layer - client._innerApiCalls.searchCatalog = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.results); - }; - - client.searchCatalog(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.results); - done(); - }); - }); - - it('invokes searchCatalog with error', done => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const scope = {}; - const query = 'query107944136'; - const request = { - scope: scope, - query: query, - }; - - // Mock Grpc layer - client._innerApiCalls.searchCatalog = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.searchCatalog(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createEntryGroup', () => { it('invokes createEntryGroup without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const entryGroupId = 'entryGroupId-43122680'; - const entryGroup = {}; - const request = { - parent: formattedParent, - entryGroupId: entryGroupId, - entryGroup: entryGroup, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest = {}; // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createEntryGroup = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.createEntryGroup(request, (err, response) => { + client.createEntryGroup(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -167,67 +109,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const entryGroupId = 'entryGroupId-43122680'; - const entryGroup = {}; - const request = { - parent: formattedParent, - entryGroupId: entryGroupId, - entryGroup: entryGroup, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createEntryGroup = mockSimpleGrpcMethod( request, null, error ); - - client.createEntryGroup(request, (err, response) => { - assert(err instanceof Error); + client.createEntryGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('getEntryGroup', () => { it('invokes getEntryGroup without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryGroupPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]' - ); - const request = { - name: formattedName, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest = {}; // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name2, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.getEntryGroup = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.getEntryGroup(request, (err, response) => { + client.getEntryGroup(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -239,55 +155,43 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryGroupPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.getEntryGroup = mockSimpleGrpcMethod( request, null, error ); - - client.getEntryGroup(request, (err, response) => { - assert(err instanceof Error); + client.getEntryGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteEntryGroup', () => { it('invokes deleteEntryGroup without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryGroupPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]' + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteEntryGroup = mockSimpleGrpcMethod( + request, + expectedResponse, + null ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteEntryGroup = mockSimpleGrpcMethod(request); - - client.deleteEntryGroup(request, err => { + client.deleteEntryGroup(request, (err: {}, response: {}) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); @@ -297,72 +201,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryGroupPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.deleteEntryGroup = mockSimpleGrpcMethod( request, null, error ); - - client.deleteEntryGroup(request, err => { - assert(err instanceof Error); + client.deleteEntryGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('createEntry', () => { it('invokes createEntry without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.entryGroupPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]' - ); - const entryId = 'entryId-2093663224'; - const entry = {}; - const request = { - parent: formattedParent, - entryId: entryId, - entry: entry, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest = {}; // Mock response - const name = 'name3373707'; - const linkedResource = 'linkedResource1544625012'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name, - linkedResource: linkedResource, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createEntry = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.createEntry(request, (err, response) => { + client.createEntry(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -374,69 +247,43 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.entryGroupPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]' - ); - const entryId = 'entryId-2093663224'; - const entry = {}; - const request = { - parent: formattedParent, - entryId: entryId, - entry: entry, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateEntryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createEntry = mockSimpleGrpcMethod( request, null, error ); - - client.createEntry(request, (err, response) => { - assert(err instanceof Error); + client.createEntry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('updateEntry', () => { it('invokes updateEntry without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const entry = {}; - const request = { - entry: entry, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest = {}; + request.entry = {}; + request.entry.name = ''; // Mock response - const name = 'name3373707'; - const linkedResource = 'linkedResource1544625012'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name, - linkedResource: linkedResource, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateEntry = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.updateEntry(request, (err, response) => { + client.updateEntry(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -448,52 +295,45 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const entry = {}; - const request = { - entry: entry, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest = {}; + request.entry = {}; + request.entry.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateEntry = mockSimpleGrpcMethod( request, null, error ); - - client.updateEntry(request, (err, response) => { - assert(err instanceof Error); + client.updateEntry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteEntry', () => { it('invokes deleteEntry without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteEntry = mockSimpleGrpcMethod( + request, + expectedResponse, + null ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteEntry = mockSimpleGrpcMethod(request); - - client.deleteEntry(request, err => { + client.deleteEntry(request, (err: {}, response: {}) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); @@ -503,70 +343,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.deleteEntry = mockSimpleGrpcMethod( request, null, error ); - - client.deleteEntry(request, err => { - assert(err instanceof Error); + client.deleteEntry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('getEntry', () => { it('invokes getEntry without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const request = { - name: formattedName, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest = {}; // Mock response - const name2 = 'name2-1052831874'; - const linkedResource = 'linkedResource1544625012'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name2, - linkedResource: linkedResource, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.getEntry = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.getEntry(request, (err, response) => { + client.getEntry(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -578,63 +389,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetEntryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.getEntry = mockSimpleGrpcMethod( request, null, error ); - - client.getEntry(request, (err, response) => { - assert(err instanceof Error); + client.getEntry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('lookupEntry', () => { it('invokes lookupEntry without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const request = {}; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest = {}; // Mock response - const name = 'name3373707'; - const linkedResource = 'linkedResource1544625012'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name, - linkedResource: linkedResource, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.lookupEntry = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.lookupEntry(request, (err, response) => { + client.lookupEntry(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -646,58 +435,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const request = {}; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.ILookupEntryRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.lookupEntry = mockSimpleGrpcMethod( request, null, error ); - - client.lookupEntry(request, (err, response) => { - assert(err instanceof Error); + client.lookupEntry(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('createTagTemplate', () => { it('invokes createTagTemplate without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const tagTemplateId = 'tagTemplateId-2020335141'; - const tagTemplate = {}; - const request = { - parent: formattedParent, - tagTemplateId: tagTemplateId, - tagTemplate: tagTemplate, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest = {}; // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name, - displayName: displayName, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createTagTemplate = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.createTagTemplate(request, (err, response) => { + client.createTagTemplate(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -709,65 +481,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const tagTemplateId = 'tagTemplateId-2020335141'; - const tagTemplate = {}; - const request = { - parent: formattedParent, - tagTemplateId: tagTemplateId, - tagTemplate: tagTemplate, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createTagTemplate = mockSimpleGrpcMethod( request, null, error ); - - client.createTagTemplate(request, (err, response) => { - assert(err instanceof Error); + client.createTagTemplate(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('getTagTemplate', () => { it('invokes getTagTemplate without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const request = { - name: formattedName, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest = {}; // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - displayName: displayName, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.getTagTemplate = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.getTagTemplate(request, (err, response) => { + client.getTagTemplate(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -779,61 +527,43 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.getTagTemplate = mockSimpleGrpcMethod( request, null, error ); - - client.getTagTemplate(request, (err, response) => { - assert(err instanceof Error); + client.getTagTemplate(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('updateTagTemplate', () => { it('invokes updateTagTemplate without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const tagTemplate = {}; - const request = { - tagTemplate: tagTemplate, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest = {}; + request.tagTemplate = {}; + request.tagTemplate.name = ''; // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name, - displayName: displayName, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateTagTemplate = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.updateTagTemplate(request, (err, response) => { + client.updateTagTemplate(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -845,53 +575,45 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const tagTemplate = {}; - const request = { - tagTemplate: tagTemplate, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest = {}; + request.tagTemplate = {}; + request.tagTemplate.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateTagTemplate = mockSimpleGrpcMethod( request, null, error ); - - client.updateTagTemplate(request, (err, response) => { - assert(err instanceof Error); + client.updateTagTemplate(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteTagTemplate', () => { it('invokes deleteTagTemplate without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteTagTemplate = mockSimpleGrpcMethod( + request, + expectedResponse, + null ); - const force = false; - const request = { - name: formattedName, - force: force, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteTagTemplate = mockSimpleGrpcMethod(request); - - client.deleteTagTemplate(request, err => { + client.deleteTagTemplate(request, (err: {}, response: {}) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); @@ -901,70 +623,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const force = false; - const request = { - name: formattedName, - force: force, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.deleteTagTemplate = mockSimpleGrpcMethod( request, null, error ); - - client.deleteTagTemplate(request, err => { - assert(err instanceof Error); + client.deleteTagTemplate(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('createTagTemplateField', () => { it('invokes createTagTemplateField without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const tagTemplateFieldId = 'tagTemplateFieldId-92144832'; - const tagTemplateField = {}; - const request = { - parent: formattedParent, - tagTemplateFieldId: tagTemplateFieldId, - tagTemplateField: tagTemplateField, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest = {}; // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name, - displayName: displayName, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createTagTemplateField = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.createTagTemplateField(request, (err, response) => { + client.createTagTemplateField(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -976,72 +669,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const tagTemplateFieldId = 'tagTemplateFieldId-92144832'; - const tagTemplateField = {}; - const request = { - parent: formattedParent, - tagTemplateFieldId: tagTemplateFieldId, - tagTemplateField: tagTemplateField, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createTagTemplateField = mockSimpleGrpcMethod( request, null, error ); - - client.createTagTemplateField(request, (err, response) => { - assert(err instanceof Error); + client.createTagTemplateField(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('updateTagTemplateField', () => { it('invokes updateTagTemplateField without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.fieldPath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - const tagTemplateField = {}; - const request = { - name: formattedName, - tagTemplateField: tagTemplateField, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest = {}; // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - displayName: displayName, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateTagTemplateField = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.updateTagTemplateField(request, (err, response) => { + client.updateTagTemplateField(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -1053,71 +715,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.fieldPath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - const tagTemplateField = {}; - const request = { - name: formattedName, - tagTemplateField: tagTemplateField, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateTagTemplateField = mockSimpleGrpcMethod( request, null, error ); - - client.updateTagTemplateField(request, (err, response) => { - assert(err instanceof Error); + client.updateTagTemplateField(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('renameTagTemplateField', () => { it('invokes renameTagTemplateField without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.fieldPath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - const newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; - const request = { - name: formattedName, - newTagTemplateFieldId: newTagTemplateFieldId, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest = {}; // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - displayName: displayName, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.renameTagTemplateField = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.renameTagTemplateField(request, (err, response) => { + client.renameTagTemplateField(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -1129,63 +761,43 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.fieldPath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - const newTagTemplateFieldId = 'newTagTemplateFieldId-1668354591'; - const request = { - name: formattedName, - newTagTemplateFieldId: newTagTemplateFieldId, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.renameTagTemplateField = mockSimpleGrpcMethod( request, null, error ); - - client.renameTagTemplateField(request, (err, response) => { - assert(err instanceof Error); + client.renameTagTemplateField(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteTagTemplateField', () => { it('invokes deleteTagTemplateField without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.fieldPath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - const force = false; - const request = { - name: formattedName, - force: force, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.deleteTagTemplateField = mockSimpleGrpcMethod( - request + request, + expectedResponse, + null ); - - client.deleteTagTemplateField(request, err => { + client.deleteTagTemplateField(request, (err: {}, response: {}) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); @@ -1195,74 +807,41 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.fieldPath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]', - '[FIELD]' - ); - const force = false; - const request = { - name: formattedName, - force: force, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.deleteTagTemplateField = mockSimpleGrpcMethod( request, null, error ); - - client.deleteTagTemplateField(request, err => { - assert(err instanceof Error); + client.deleteTagTemplateField(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('createTag', () => { it('invokes createTag without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const tag = {}; - const request = { - parent: formattedParent, - tag: tag, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest = {}; // Mock response - const name = 'name3373707'; - const template = 'template-1321546630'; - const templateDisplayName = 'templateDisplayName-532252787'; - const column = 'column-1354837162'; - const expectedResponse = { - name: name, - template: template, - templateDisplayName: templateDisplayName, - column: column, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createTag = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.createTag(request, (err, response) => { + client.createTag(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -1274,68 +853,43 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const tag = {}; - const request = { - parent: formattedParent, - tag: tag, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.createTag = mockSimpleGrpcMethod( request, null, error ); - - client.createTag(request, (err, response) => { - assert(err instanceof Error); + client.createTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('updateTag', () => { it('invokes updateTag without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const tag = {}; - const request = { - tag: tag, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest = {}; + request.tag = {}; + request.tag.name = ''; // Mock response - const name = 'name3373707'; - const template = 'template-1321546630'; - const templateDisplayName = 'templateDisplayName-532252787'; - const column = 'column-1354837162'; - const expectedResponse = { - name: name, - template: template, - templateDisplayName: templateDisplayName, - column: column, - }; - - // Mock Grpc layer + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateTag = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.updateTag(request, (err, response) => { + client.updateTag(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); @@ -1347,53 +901,45 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const tag = {}; - const request = { - tag: tag, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTagRequest = {}; + request.tag = {}; + request.tag.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.updateTag = mockSimpleGrpcMethod( request, null, error ); - - client.updateTag(request, (err, response) => { - assert(err instanceof Error); + client.updateTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteTag', () => { it('invokes deleteTag without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.tagPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]', - '[TAG]' + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteTag = mockSimpleGrpcMethod( + request, + expectedResponse, + null ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteTag = mockSimpleGrpcMethod(request); - - client.deleteTag(request, err => { + client.deleteTag(request, (err: {}, response: {}) => { assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); @@ -1403,330 +949,274 @@ describe('DataCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedName = client.tagPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]', - '[TAG]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer client._innerApiCalls.deleteTag = mockSimpleGrpcMethod( request, null, error ); - - client.deleteTag(request, err => { - assert(err instanceof Error); + client.deleteTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - - describe('listTags', () => { - it('invokes listTags without error', done => { + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const request = { - parent: formattedParent, - }; - + const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; // Mock response - const nextPageToken = ''; - const tagsElement = {}; - const tags = [tagsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - tags: tags, - }; - - // Mock Grpc layer - client._innerApiCalls.listTags = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.tags); - }; - - client.listTags(request, (err, response) => { + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.setIamPolicy(request, (err: {}, response: {}) => { assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.tags); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes listTags with error', done => { + it('invokes setIamPolicy with error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedParent = client.entryPath( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listTags = mockSimpleGrpcMethod( + const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( request, null, error ); - - client.listTags(request, (err, response) => { - assert(err instanceof Error); + client.setIamPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', done => { + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedResource = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const policy = {}; - const request = { - resource: formattedResource, - policy: policy, - }; - + const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; // Mock response - const version = 351608024; - const etag = '21'; - const expectedResponse = { - version: version, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.setIamPolicy(request, (err, response) => { + client.getIamPolicy(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes setIamPolicy with error', done => { + it('invokes getIamPolicy with error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedResource = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const policy = {}; - const request = { - resource: formattedResource, - policy: policy, - }; - - // Mock Grpc layer - client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( request, null, error ); - - client.setIamPolicy(request, (err, response) => { - assert(err instanceof Error); + client.getIamPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', done => { + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedResource = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const request = { - resource: formattedResource, - }; - + const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; // Mock response - const version = 351608024; - const etag = '21'; - const expectedResponse = { - version: version, - etag: etag, - }; - - // Mock Grpc layer - client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( request, - expectedResponse + expectedResponse, + null ); - - client.getIamPolicy(request, (err, response) => { + client.testIamPermissions(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes getIamPolicy with error', done => { + it('invokes testIamPermissions with error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedResource = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const request = { - resource: formattedResource, - }; - - // Mock Grpc layer - client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( request, null, error ); - - client.getIamPolicy(request, (err, response) => { - assert(err instanceof Error); + client.testIamPermissions(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); assert(typeof response === 'undefined'); done(); }); }); }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', done => { + describe('searchCatalog', () => { + it('invokes searchCatalog without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedResource = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const permissions = []; - const request = { - resource: formattedResource, - permissions: permissions, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest = {}; // Mock response const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.testIamPermissions(request, (err, response) => { + client._innerApiCalls.searchCatalog = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.searchCatalog(request, (err: FakeError, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - - it('invokes testIamPermissions with error', done => { + }); + describe('searchCatalogStream', () => { + it('invokes searchCatalogStream without error', done => { const client = new datacatalogModule.v1beta1.DataCatalogClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - // Mock request - const formattedResource = client.tagTemplatePath( - '[PROJECT]', - '[LOCATION]', - '[TAG_TEMPLATE]' - ); - const permissions = []; - const request = { - resource: formattedResource, - permissions: permissions, - }; - + const request: protosTypes.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest = {}; + // Mock response + const expectedResponse = {}; // Mock Grpc layer - client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.testIamPermissions(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); + client._innerApiCalls.searchCatalog = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .searchCatalogStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); + describe('listTags', () => { + it('invokes listTags without error', done => { + const client = new datacatalogModule.v1beta1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listTags = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listTags(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); done(); }); }); }); + describe('listTagsStream', () => { + it('invokes listTagsStream without error', done => { + const client = new datacatalogModule.v1beta1.DataCatalogClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IListTagsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listTags = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listTagsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); }); - -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} diff --git a/packages/google-cloud-datacatalog/test/gapic-policy_tag_manager-v1beta1.ts b/packages/google-cloud-datacatalog/test/gapic-policy_tag_manager-v1beta1.ts new file mode 100644 index 00000000000..091b1d9aafa --- /dev/null +++ b/packages/google-cloud-datacatalog/test/gapic-policy_tag_manager-v1beta1.ts @@ -0,0 +1,714 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +const policytagmanagerModule = require('../src'); + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} + +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('PolicyTagManagerClient', () => { + it('has servicePath', () => { + const servicePath = + policytagmanagerModule.v1beta1.PolicyTagManagerClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + policytagmanagerModule.v1beta1.PolicyTagManagerClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = policytagmanagerModule.v1beta1.PolicyTagManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); + assert(client); + }); + it('should create a client with gRPC option', () => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + fallback: true, + }); + assert(client); + }); + describe('createTaxonomy', () => { + it('invokes createTaxonomy without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createTaxonomy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createTaxonomy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createTaxonomy with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createTaxonomy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createTaxonomy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteTaxonomy', () => { + it('invokes deleteTaxonomy without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteTaxonomy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteTaxonomy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteTaxonomy with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteTaxonomy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteTaxonomy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateTaxonomy', () => { + it('invokes updateTaxonomy without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest = {}; + request.taxonomy = {}; + request.taxonomy.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateTaxonomy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateTaxonomy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateTaxonomy with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest = {}; + request.taxonomy = {}; + request.taxonomy.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateTaxonomy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateTaxonomy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getTaxonomy', () => { + it('invokes getTaxonomy without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getTaxonomy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getTaxonomy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getTaxonomy with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getTaxonomy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getTaxonomy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createPolicyTag', () => { + it('invokes createPolicyTag without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createPolicyTag = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createPolicyTag(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createPolicyTag with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createPolicyTag = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createPolicyTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deletePolicyTag', () => { + it('invokes deletePolicyTag without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deletePolicyTag = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deletePolicyTag(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deletePolicyTag with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deletePolicyTag = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deletePolicyTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updatePolicyTag', () => { + it('invokes updatePolicyTag without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest = {}; + request.policyTag = {}; + request.policyTag.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updatePolicyTag = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updatePolicyTag(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updatePolicyTag with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest = {}; + request.policyTag = {}; + request.policyTag.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updatePolicyTag = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updatePolicyTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getPolicyTag', () => { + it('invokes getPolicyTag without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getPolicyTag = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getPolicyTag(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getPolicyTag with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getPolicyTag = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getPolicyTag(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getIamPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getIamPolicy with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.IGetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getIamPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getIamPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.setIamPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes setIamPolicy with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ISetIamPolicyRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.setIamPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.setIamPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.testIamPermissions(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes testIamPermissions with error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.iam.v1.ITestIamPermissionsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.testIamPermissions = mockSimpleGrpcMethod( + request, + null, + error + ); + client.testIamPermissions(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listTaxonomies', () => { + it('invokes listTaxonomies without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listTaxonomies = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listTaxonomies(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listTaxonomiesStream', () => { + it('invokes listTaxonomiesStream without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listTaxonomies = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listTaxonomiesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); + describe('listPolicyTags', () => { + it('invokes listPolicyTags without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listPolicyTags = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listPolicyTags(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listPolicyTagsStream', () => { + it('invokes listPolicyTagsStream without error', done => { + const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listPolicyTags = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listPolicyTagsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); +}); diff --git a/packages/google-cloud-datacatalog/test/gapic-policy_tag_manager_serialization-v1beta1.ts b/packages/google-cloud-datacatalog/test/gapic-policy_tag_manager_serialization-v1beta1.ts new file mode 100644 index 00000000000..77b85dcd0e8 --- /dev/null +++ b/packages/google-cloud-datacatalog/test/gapic-policy_tag_manager_serialization-v1beta1.ts @@ -0,0 +1,192 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protosTypes from '../protos/protos'; +import * as assert from 'assert'; +const policytagmanagerserializationModule = require('../src'); + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} + +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('PolicyTagManagerSerializationClient', () => { + it('has servicePath', () => { + const servicePath = + policytagmanagerserializationModule.v1beta1 + .PolicyTagManagerSerializationClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + policytagmanagerserializationModule.v1beta1 + .PolicyTagManagerSerializationClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = + policytagmanagerserializationModule.v1beta1 + .PolicyTagManagerSerializationClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); + assert(client); + }); + it('should create a client with gRPC option', () => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( + { + fallback: true, + } + ); + assert(client); + }); + describe('importTaxonomies', () => { + it('invokes importTaxonomies without error', done => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.importTaxonomies = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.importTaxonomies(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes importTaxonomies with error', done => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.importTaxonomies = mockSimpleGrpcMethod( + request, + null, + error + ); + client.importTaxonomies(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('exportTaxonomies', () => { + it('invokes exportTaxonomies without error', done => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportTaxonomies = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.exportTaxonomies(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes exportTaxonomies with error', done => { + const client = new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.exportTaxonomies = mockSimpleGrpcMethod( + request, + null, + error + ); + client.exportTaxonomies(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); +}); diff --git a/packages/google-cloud-datacatalog/tsconfig.json b/packages/google-cloud-datacatalog/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-cloud-datacatalog/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-datacatalog/tslint.json b/packages/google-cloud-datacatalog/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/packages/google-cloud-datacatalog/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} diff --git a/packages/google-cloud-datacatalog/webpack.config.js b/packages/google-cloud-datacatalog/webpack.config.js index c20944364f4..813ce0a48bb 100644 --- a/packages/google-cloud-datacatalog/webpack.config.js +++ b/packages/google-cloud-datacatalog/webpack.config.js @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +const path = require('path'); + module.exports = { - entry: './src/browser.js', + entry: './src/index.ts', output: { - library: 'datacatalog', - filename: './datacatalog.js', + library: 'PolicyTagManagerSerialization', + filename: './policy-tag-manager-serialization.js', }, node: { child_process: 'empty', @@ -24,20 +26,36 @@ module.exports = { crypto: 'empty', }, resolve: { - extensions: ['.js', '.json'], + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], }, module: { rules: [ { - test: /node_modules[\\/]retry-request[\\/]/, + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, use: 'null-loader', }, { - test: /node_modules[\\/]https-proxy-agent[\\/]/, + test: /node_modules[\\/]https-proxy-agent/, use: 'null-loader', }, { - test: /node_modules[\\/]gtoken[\\/]/, + test: /node_modules[\\/]gtoken/, use: 'null-loader', }, ],